From ef21a0ac590775dcbd929339827408922046c7d3 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 2 Jun 2009 00:22:31 -0500 Subject: convert traits over to use the new exporter --- lib/Bot/Games/Trait/Attribute/Command.pm | 4 ++-- lib/Bot/Games/Trait/Attribute/Formatted.pm | 4 ++-- lib/Bot/Games/Trait/Class/Command.pm | 4 ++-- lib/Bot/Games/Trait/Class/Formatted.pm | 5 ++--- lib/Bot/Games/Trait/Method/Command.pm | 4 ++-- lib/Bot/Games/Trait/Method/Formatted.pm | 4 ++-- 6 files changed, 12 insertions(+), 13 deletions(-) (limited to 'lib/Bot') diff --git a/lib/Bot/Games/Trait/Attribute/Command.pm b/lib/Bot/Games/Trait/Attribute/Command.pm index 9b51b13..ee6e732 100644 --- a/lib/Bot/Games/Trait/Attribute/Command.pm +++ b/lib/Bot/Games/Trait/Attribute/Command.pm @@ -1,5 +1,5 @@ package Bot::Games::Trait::Attribute::Command; -use Moose::Role; +use Bot::Games::OO::Role; has command => ( is => 'rw', @@ -40,6 +40,6 @@ after install_accessors => sub { $method_meta->needs_init($self->needs_init); }; -no Moose::Role; +no Bot::Games::OO::Role; 1; diff --git a/lib/Bot/Games/Trait/Attribute/Formatted.pm b/lib/Bot/Games/Trait/Attribute/Formatted.pm index 303c1bc..00db707 100644 --- a/lib/Bot/Games/Trait/Attribute/Formatted.pm +++ b/lib/Bot/Games/Trait/Attribute/Formatted.pm @@ -1,5 +1,5 @@ package Bot::Games::Trait::Attribute::Formatted; -use Moose::Role; +use Bot::Games::OO::Role; # when the attribute is being constructed, the accessor methods haven't been # generated yet, so we need to store the formatter here, and then apply it @@ -53,6 +53,6 @@ after install_accessors => sub { } }; -no Moose::Role; +no Bot::Games::OO::Role; 1; diff --git a/lib/Bot/Games/Trait/Class/Command.pm b/lib/Bot/Games/Trait/Class/Command.pm index 462b9ea..8e70200 100644 --- a/lib/Bot/Games/Trait/Class/Command.pm +++ b/lib/Bot/Games/Trait/Class/Command.pm @@ -1,5 +1,5 @@ package Bot::Games::Trait::Class::Command; -use Moose::Role; +use Bot::Games::OO::Role; after ((map { "add_${_}_method_modifier" } qw/before after around/) => sub { my $self = shift; @@ -28,6 +28,6 @@ sub get_command { && $method_meta->meta->does_role('Bot::Games::Trait::Method::Command'); } -no Moose::Role; +no Bot::Games::OO::Role; 1; diff --git a/lib/Bot/Games/Trait/Class/Formatted.pm b/lib/Bot/Games/Trait/Class/Formatted.pm index 403bba6..6c3092a 100644 --- a/lib/Bot/Games/Trait/Class/Formatted.pm +++ b/lib/Bot/Games/Trait/Class/Formatted.pm @@ -1,6 +1,5 @@ package Bot::Games::Trait::Class::Formatted; -use Moose::Role; -use MooseX::AttributeHelpers; +use Bot::Games::OO::Role; has default_formatters => ( metaclass => 'Collection::ImmutableHash', @@ -22,6 +21,6 @@ sub _build_default_formatters { } } -no Moose::Role; +no Bot::Games::OO::Role; 1; diff --git a/lib/Bot/Games/Trait/Method/Command.pm b/lib/Bot/Games/Trait/Method/Command.pm index e00cb43..25bd2ff 100644 --- a/lib/Bot/Games/Trait/Method/Command.pm +++ b/lib/Bot/Games/Trait/Method/Command.pm @@ -1,5 +1,5 @@ package Bot::Games::Trait::Method::Command; -use Moose::Role; +use Bot::Games::OO::Role; has pass_args => ( is => 'rw', @@ -19,6 +19,6 @@ around execute => sub { return $self->pass_args ? $self->$orig(@_) : $self->$orig($_[0]); }; -no Moose::Role; +no Bot::Games::OO::Role; 1; diff --git a/lib/Bot/Games/Trait/Method/Formatted.pm b/lib/Bot/Games/Trait/Method/Formatted.pm index 7e0b986..cdd4c60 100644 --- a/lib/Bot/Games/Trait/Method/Formatted.pm +++ b/lib/Bot/Games/Trait/Method/Formatted.pm @@ -1,5 +1,5 @@ package Bot::Games::Trait::Method::Formatted; -use Moose::Role; +use Bot::Games::OO::Role; has formatter => ( is => 'rw', @@ -17,6 +17,6 @@ sub _munge_formatter { return $self->associated_metaclass->formatter_for($format); } -no Moose::Role; +no Bot::Games::OO::Role; 1; -- cgit v1.2.3-54-g00ecf