2 package Moose::Meta::Role;
8 use Scalar::Util 'blessed';
11 our $VERSION = '0.75_01';
12 $VERSION = eval $VERSION;
13 our $AUTHORITY = 'cpan:STEVAN';
15 use Moose::Meta::Class;
16 use Moose::Meta::Role::Method;
17 use Moose::Meta::Role::Method::Required;
19 use base 'Class::MOP::Module';
21 ## ------------------------------------------------------------------
23 ## I normally don't do this, but I am doing
24 ## a whole bunch of meta-programmin in this
25 ## module, so it just makes sense. For a clearer
26 ## picture of what is going on in the next
27 ## several lines of code, look at the really
28 ## big comment at the end of this file (right
31 ## ------------------------------------------------------------------
33 my $META = __PACKAGE__->meta;
35 ## ------------------------------------------------------------------
39 # since roles are lazy, we hold all the attributes
40 # of the individual role in 'statis' until which
41 # time when it is applied to a class. This means
42 # keeping a lot of things in hash maps, so we are
43 # using a little of that meta-programmin' magic
44 # here an saving lots of extra typin. And since
45 # many of these attributes above require similar
46 # functionality to support them, so we again use
47 # the wonders of meta-programmin' to deliver a
48 # very compact solution to this normally verbose
54 name => 'excluded_roles_map',
55 attr_reader => 'get_excluded_roles_map' ,
57 add => 'add_excluded_roles',
58 get_list => 'get_excluded_roles_list',
59 existence => 'excludes_role',
63 name => 'required_methods',
64 attr_reader => 'get_required_methods_map',
66 add => 'add_required_methods',
67 remove => 'remove_required_methods',
68 get_list => 'get_required_method_list',
69 existence => 'requires_method',
73 name => 'attribute_map',
74 attr_reader => 'get_attribute_map',
76 get => 'get_attribute',
77 get_list => 'get_attribute_list',
78 existence => 'has_attribute',
79 remove => 'remove_attribute',
84 my $attr_reader = $action->{attr_reader};
85 my $methods = $action->{methods};
87 # create the attribute
88 $META->add_attribute($action->{name} => (
89 reader => $attr_reader,
93 # create some helper methods
94 $META->add_method($methods->{add} => sub {
95 my ($self, @values) = @_;
96 $self->$attr_reader->{$_} = undef foreach @values;
97 }) if exists $methods->{add};
99 $META->add_method($methods->{get_list} => sub {
101 keys %{$self->$attr_reader};
102 }) if exists $methods->{get_list};
104 $META->add_method($methods->{get} => sub {
105 my ($self, $name) = @_;
106 $self->$attr_reader->{$name}
107 }) if exists $methods->{get};
109 $META->add_method($methods->{existence} => sub {
110 my ($self, $name) = @_;
111 exists $self->$attr_reader->{$name} ? 1 : 0;
112 }) if exists $methods->{existence};
114 $META->add_method($methods->{remove} => sub {
115 my ($self, @values) = @_;
116 delete $self->$attr_reader->{$_} foreach @values;
117 }) if exists $methods->{remove};
120 $META->add_attribute(
122 reader => 'method_metaclass',
123 default => 'Moose::Meta::Role::Method',
126 ## some things don't always fit, so they go here ...
131 unless ( defined $name && $name ) {
133 Moose->throw_error("You must provide a name for the attribute");
136 if (scalar @_ == 1 && ref($_[0]) eq 'HASH') {
142 $self->get_attribute_map->{$name} = $attr_desc;
145 ## ------------------------------------------------------------------
149 # the before/around/after method modifiers are
150 # stored by name, but there can be many methods
151 # then associated with that name. So again we have
152 # lots of similar functionality, so we can do some
153 # meta-programmin' and save some time.
156 foreach my $modifier_type (qw[ before around after ]) {
158 my $attr_reader = "get_${modifier_type}_method_modifiers_map";
160 # create the attribute ...
161 $META->add_attribute("${modifier_type}_method_modifiers" => (
162 reader => $attr_reader,
163 default => sub { {} }
166 # and some helper methods ...
167 $META->add_method("get_${modifier_type}_method_modifiers" => sub {
168 my ($self, $method_name) = @_;
169 #return () unless exists $self->$attr_reader->{$method_name};
170 @{$self->$attr_reader->{$method_name}};
173 $META->add_method("has_${modifier_type}_method_modifiers" => sub {
174 my ($self, $method_name) = @_;
176 # for now we assume that if it exists,..
177 # it has at least one modifier in it
178 (exists $self->$attr_reader->{$method_name}) ? 1 : 0;
181 $META->add_method("add_${modifier_type}_method_modifier" => sub {
182 my ($self, $method_name, $method) = @_;
184 $self->$attr_reader->{$method_name} = []
185 unless exists $self->$attr_reader->{$method_name};
187 my $modifiers = $self->$attr_reader->{$method_name};
190 # check to see that we aren't adding the
191 # same code twice. We err in favor of the
192 # first on here, this may not be as expected
193 foreach my $modifier (@{$modifiers}) {
194 return if $modifier == $method;
197 push @{$modifiers} => $method;
202 ## ------------------------------------------------------------------
203 ## override method mofidiers
205 $META->add_attribute('override_method_modifiers' => (
206 reader => 'get_override_method_modifiers_map',
207 default => sub { {} }
211 # these are a little different because there
212 # can only be one per name, whereas the other
213 # method modifiers can have multiples.
216 sub add_override_method_modifier {
217 my ($self, $method_name, $method) = @_;
218 (!$self->has_method($method_name))
219 || Moose->throw_error("Cannot add an override of method '$method_name' " .
220 "because there is a local version of '$method_name'");
221 $self->get_override_method_modifiers_map->{$method_name} = $method;
224 sub has_override_method_modifier {
225 my ($self, $method_name) = @_;
227 # for now we assume that if it exists,..
228 # it has at least one modifier in it
229 (exists $self->get_override_method_modifiers_map->{$method_name}) ? 1 : 0;
232 sub get_override_method_modifier {
233 my ($self, $method_name) = @_;
234 $self->get_override_method_modifiers_map->{$method_name};
237 ## general list accessor ...
239 sub get_method_modifier_list {
240 my ($self, $modifier_type) = @_;
241 my $accessor = "get_${modifier_type}_method_modifiers_map";
242 keys %{$self->$accessor};
245 sub reset_package_cache_flag { (shift)->{'_package_cache_flag'} = undef }
246 sub update_package_cache_flag {
248 $self->{'_package_cache_flag'} = Class::MOP::check_package_cache_flag($self->name);
253 ## ------------------------------------------------------------------
256 $META->add_attribute('roles' => (
257 reader => 'get_roles',
258 default => sub { [] }
262 my ($self, $role) = @_;
263 (blessed($role) && $role->isa('Moose::Meta::Role'))
264 || Moose->throw_error("Roles must be instances of Moose::Meta::Role");
265 push @{$self->get_roles} => $role;
266 $self->reset_package_cache_flag;
269 sub calculate_all_roles {
275 $_->calculate_all_roles
276 } @{ $self->get_roles });
280 my ($self, $role_name) = @_;
282 || Moose->throw_error("You must supply a role name to look for");
283 # if we are it,.. then return true
284 return 1 if $role_name eq $self->name;
285 # otherwise.. check our children
286 foreach my $role (@{$self->get_roles}) {
287 return 1 if $role->does_role($role_name);
292 ## ------------------------------------------------------------------
298 my $current = Class::MOP::check_package_cache_flag($self->name);
300 if (defined $self->{'_package_cache_flag'} && $self->{'_package_cache_flag'} == $current) {
301 return $self->{'methods'} ||= {};
304 $self->{_package_cache_flag} = $current;
306 my $map = $self->{'methods'} ||= {};
308 my $role_name = $self->name;
309 my $method_metaclass = $self->method_metaclass;
311 my $all_code = $self->get_all_package_symbols('CODE');
313 foreach my $symbol (keys %{ $all_code }) {
314 my $code = $all_code->{$symbol};
316 next if exists $map->{$symbol} &&
317 defined $map->{$symbol} &&
318 $map->{$symbol}->body == $code;
320 my ($pkg, $name) = Class::MOP::get_code_info($code);
321 my $meta = Class::MOP::class_of($pkg);
323 if ($meta && $meta->isa('Moose::Meta::Role')) {
324 my $role = $meta->name;
325 next unless $self->does_role($role);
329 # in 5.10 constant.pm the constants show up
330 # as being in the right package, but in pre-5.10
331 # they show up as constant::__ANON__ so we
332 # make an exception here to be sure that things
333 # work as expected in both.
335 unless ($pkg eq 'constant' && $name eq '__ANON__') {
336 next if ($pkg || '') ne $role_name ||
337 (($name || '') ne '__ANON__' && ($pkg || '') ne $role_name);
341 $map->{$symbol} = $method_metaclass->wrap(
343 package_name => $role_name,
352 my ($self, $name) = @_;
353 $self->get_method_map->{$name};
357 my ($self, $name) = @_;
358 exists $self->get_method_map->{$name} ? 1 : 0
361 # FIXME this is copy-pasted from Class::MOP::Class
362 # refactor to inherit from some common base
363 sub wrap_method_body {
364 my ( $self, %args ) = @_;
366 ('CODE' eq ref $args{body})
367 || Moose->throw_error("Your code block must be a CODE reference");
369 $self->method_metaclass->wrap(
370 package_name => $self->name,
376 my ($self, $method_name, $method) = @_;
377 (defined $method_name && $method_name)
378 || Moose->throw_error("You must define a method name");
381 if (blessed($method)) {
382 $body = $method->body;
383 if ($method->package_name ne $self->name) {
384 $method = $method->clone(
385 package_name => $self->name,
387 ) if $method->can('clone');
392 $method = $self->wrap_method_body( body => $body, name => $method_name );
395 $method->attach_to_class($self);
397 $self->get_method_map->{$method_name} = $method;
399 my $full_method_name = ($self->name . '::' . $method_name);
400 $self->add_package_symbol(
401 { sigil => '&', type => 'CODE', name => $method_name },
402 Class::MOP::subname($full_method_name => $body)
405 $self->update_package_cache_flag; # still valid, since we just added the method to the map, and if it was invalid before that then get_method_map updated it
408 sub find_method_by_name { (shift)->get_method(@_) }
410 sub get_method_list {
412 grep { !/^meta$/ } keys %{$self->get_method_map};
416 Carp::cluck("The alias_method method is deprecated. Use add_method instead.\n");
420 $self->add_method(@_);
423 ## ------------------------------------------------------------------
425 ## ------------------------------------------------------------------
428 my ($self, $other, @args) = @_;
431 || Moose->throw_error("You must pass in an blessed instance");
433 if ($other->isa('Moose::Meta::Role')) {
434 require Moose::Meta::Role::Application::ToRole;
435 return Moose::Meta::Role::Application::ToRole->new(@args)->apply($self, $other);
437 elsif ($other->isa('Moose::Meta::Class')) {
438 require Moose::Meta::Role::Application::ToClass;
439 return Moose::Meta::Role::Application::ToClass->new(@args)->apply($self, $other);
442 require Moose::Meta::Role::Application::ToInstance;
443 return Moose::Meta::Role::Application::ToInstance->new(@args)->apply($self, $other);
448 my ($class, @role_specs) = @_;
450 require Moose::Meta::Role::Application::RoleSummation;
451 require Moose::Meta::Role::Composite;
453 my (@roles, %role_params);
454 while (@role_specs) {
455 my ($role, $params) = @{ splice @role_specs, 0, 1 };
456 push @roles => Class::MOP::class_of($role);
457 next unless defined $params;
458 $role_params{$role} = $params;
461 my $c = Moose::Meta::Role::Composite->new(roles => \@roles);
462 Moose::Meta::Role::Application::RoleSummation->new(
463 role_params => \%role_params
470 my ( $role, $package_name, %options ) = @_;
472 $options{package} = $package_name;
474 (ref $options{attributes} eq 'HASH')
475 || confess "You must pass a HASH ref of attributes"
476 if exists $options{attributes};
478 (ref $options{methods} eq 'HASH')
479 || confess "You must pass a HASH ref of methods"
480 if exists $options{methods};
482 my (%initialize_options) = %options;
483 delete @initialize_options{qw(
491 my $meta = $role->initialize( $package_name => %initialize_options );
493 $meta->_instantiate_module( $options{version}, $options{authority} );
496 $meta->add_method('meta' => sub {
497 $role->initialize(ref($_[0]) || $_[0]);
500 if (exists $options{attributes}) {
501 foreach my $attribute_name (keys %{$options{attributes}}) {
502 my $attr = $options{attributes}->{$attribute_name};
503 $meta->add_attribute($attribute_name => $attr);
507 if (exists $options{methods}) {
508 foreach my $method_name (keys %{$options{methods}}) {
509 $meta->add_method($method_name, $options{methods}->{$method_name});
513 Class::MOP::weaken_metaclass($meta->name)
514 if $meta->is_anon_role;
519 # anonymous roles. most of it is copied straight out of Class::MOP::Class.
520 # an intrepid hacker might find great riches if he unifies this code with that
521 # code in Class::MOP::Module or Class::MOP::Package
524 # this should be sufficient, if you have a
525 # use case where it is not, write a test and
527 my $ANON_ROLE_SERIAL = 0;
530 # we need a sufficiently annoying prefix
531 # this should suffice for now, this is
532 # used in a couple of places below, so
533 # need to put it up here for now.
534 my $ANON_ROLE_PREFIX = 'Moose::Meta::Role::__ANON__::SERIAL::';
538 no warnings 'uninitialized';
539 $self->name =~ /^$ANON_ROLE_PREFIX/;
542 sub create_anon_role {
543 my ($role, %options) = @_;
544 my $package_name = $ANON_ROLE_PREFIX . ++$ANON_ROLE_SERIAL;
545 return $role->create($package_name, %options);
549 # this will only get called for
550 # anon-roles, all other calls
551 # are assumed to occur during
552 # global destruction and so don't
553 # really need to be handled explicitly
557 return if Class::MOP::in_global_destruction(); # it'll happen soon anyway and this just makes things more complicated
559 no warnings 'uninitialized';
560 return unless $self->name =~ /^$ANON_ROLE_PREFIX/;
562 # XXX: is this necessary for us? I don't understand what it's doing
565 # Moose does a weird thing where it replaces the metaclass for
566 # class when fixing metaclass incompatibility. In that case,
567 # we don't want to clean out the namespace now. We can detect
568 # that because Moose will explicitly update the singleton
569 # cache in Class::MOP.
570 #my $current_meta = Class::MOP::get_metaclass_by_name($self->name);
571 #return if $current_meta ne $self;
573 my ($serial_id) = ($self->name =~ /^$ANON_ROLE_PREFIX(\d+)/);
575 foreach my $key (keys %{$ANON_ROLE_PREFIX . $serial_id}) {
576 delete ${$ANON_ROLE_PREFIX . $serial_id}{$key};
578 delete ${'main::' . $ANON_ROLE_PREFIX}{$serial_id . '::'};
582 #####################################################################
584 ## This is Moose::Meta::Role as defined by Moose (plus the use of
585 ## MooseX::AttributeHelpers module). It is here as a reference to
586 ## make it easier to see what is happening above with all the meta
588 #####################################################################
591 # metaclass => 'Collection::Array',
592 # reader => 'get_roles',
593 # isa => 'ArrayRef[Moose::Meta::Roles]',
594 # default => sub { [] },
596 # 'push' => 'add_role',
600 # has 'excluded_roles_map' => (
601 # metaclass => 'Collection::Hash',
602 # reader => 'get_excluded_roles_map',
603 # isa => 'HashRef[Str]',
605 # # Not exactly set, cause it sets multiple
606 # 'set' => 'add_excluded_roles',
607 # 'keys' => 'get_excluded_roles_list',
608 # 'exists' => 'excludes_role',
612 # has 'attribute_map' => (
613 # metaclass => 'Collection::Hash',
614 # reader => 'get_attribute_map',
615 # isa => 'HashRef[Str]',
617 # # 'set' => 'add_attribute' # has some special crap in it
618 # 'get' => 'get_attribute',
619 # 'keys' => 'get_attribute_list',
620 # 'exists' => 'has_attribute',
621 # # Not exactly delete, cause it sets multiple
622 # 'delete' => 'remove_attribute',
626 # has 'required_methods' => (
627 # metaclass => 'Collection::Hash',
628 # reader => 'get_required_methods_map',
629 # isa => 'HashRef[Str]',
631 # # not exactly set, or delete since it works for multiple
632 # 'set' => 'add_required_methods',
633 # 'delete' => 'remove_required_methods',
634 # 'keys' => 'get_required_method_list',
635 # 'exists' => 'requires_method',
639 # # the before, around and after modifiers are
640 # # HASH keyed by method-name, with ARRAY of
641 # # CODE refs to apply in that order
643 # has 'before_method_modifiers' => (
644 # metaclass => 'Collection::Hash',
645 # reader => 'get_before_method_modifiers_map',
646 # isa => 'HashRef[ArrayRef[CodeRef]]',
648 # 'keys' => 'get_before_method_modifiers',
649 # 'exists' => 'has_before_method_modifiers',
650 # # This actually makes sure there is an
651 # # ARRAY at the given key, and pushed onto
652 # # it. It also checks for duplicates as well
653 # # 'add' => 'add_before_method_modifier'
657 # has 'after_method_modifiers' => (
658 # metaclass => 'Collection::Hash',
659 # reader =>'get_after_method_modifiers_map',
660 # isa => 'HashRef[ArrayRef[CodeRef]]',
662 # 'keys' => 'get_after_method_modifiers',
663 # 'exists' => 'has_after_method_modifiers',
664 # # This actually makes sure there is an
665 # # ARRAY at the given key, and pushed onto
666 # # it. It also checks for duplicates as well
667 # # 'add' => 'add_after_method_modifier'
671 # has 'around_method_modifiers' => (
672 # metaclass => 'Collection::Hash',
673 # reader =>'get_around_method_modifiers_map',
674 # isa => 'HashRef[ArrayRef[CodeRef]]',
676 # 'keys' => 'get_around_method_modifiers',
677 # 'exists' => 'has_around_method_modifiers',
678 # # This actually makes sure there is an
679 # # ARRAY at the given key, and pushed onto
680 # # it. It also checks for duplicates as well
681 # # 'add' => 'add_around_method_modifier'
685 # # override is similar to the other modifiers
686 # # except that it is not an ARRAY of code refs
687 # # but instead just a single name->code mapping
689 # has 'override_method_modifiers' => (
690 # metaclass => 'Collection::Hash',
691 # reader =>'get_override_method_modifiers_map',
692 # isa => 'HashRef[CodeRef]',
694 # 'keys' => 'get_override_method_modifier',
695 # 'exists' => 'has_override_method_modifier',
696 # 'add' => 'add_override_method_modifier', # checks for local method ..
700 #####################################################################
711 Moose::Meta::Role - The Moose Role metaclass
715 This class is a subclass of L<Class::MOP::Module> that provides
716 additional Moose-specific functionality.
718 It's API looks a lot like L<Moose::Meta::Class>, but internally it
719 implements many things differently. This may change in the future.
723 C<Moose::Meta::Role> is a subclass of L<Class::MOP::Module>.
731 =item B<< Moose::Meta::Role->initialize($role_name) >>
733 This method creates a new role object with the provided name.
735 =item B<< Moose::Meta::Role->combine( [ $role => { ... } ], [ $role ], ... ) >>
737 This method accepts a list of array references. Each array reference
738 should contain a role name as its first element. The second element is
739 an optional hash reference. The hash reference can contain C<exclude>
740 and C<alias> keys to control how methods are composed from the role.
742 The return value is a new L<Moose::Meta::Role::Composite> that
743 represents the combined roles.
745 =item B<< Moose::Meta::Role->create($name, %options) >>
747 This method is identical to the L<Moose::Meta::Class> C<create>
750 =item B<< Moose::Meta::Role->create_anon_role >>
752 This method is identical to the L<Moose::Meta::Class>
753 C<create_anon_class> method.
755 =item B<< $metarole->is_anon_role >>
757 Returns true if the role is an anonymous role.
761 =head2 Role application
765 =item B<< $metarole->apply( $thing, @options ) >>
767 This method applies a role to the given C<$thing>. That can be another
768 L<Moose::Meta::Role>, object, a L<Moose::Meta::Class> object, or a
769 (non-meta) object instance.
771 The options are passed directly to the constructor for the appropriate
772 L<Moose::Meta::Role::Application> subclass.
774 Note that this will apply the role even if the C<$thing> in question already
775 C<does> this role. L<Moose::Util/does_role> is a convenient wrapper for
776 finding out if role application is necessary.
780 =head2 Roles and other roles
784 =item B<< $metarole->get_roles >>
786 This returns an array reference of roles which this role does. This
787 list may include duplicates.
789 =item B<< $metarole->calculate_all_roles >>
791 This returns a I<unique> list of all roles that this role does, and
792 all the roles that its roles do.
794 =item B<< $metarole->does_role($role_name) >>
796 Given a role I<name>, returns true if this role does the given
799 =item B<< $metarole->add_role($role) >>
801 Given a L<Moose::Meta::Role> object, this adds the role to the list of
802 roles that the role does.
804 =item B<< $metarole->get_excluded_roles_list >>
806 Returns a list of role names which this role excludes.
808 =item B<< $metarole->excludes_role($role_name) >>
810 Given a role I<name>, returns true if this role excludes the named
813 =item B<< $metarole->add_excluded_roles(@role_names) >>
815 Given one or more role names, adds those roles to the list of excluded
822 The methods for dealing with a role's methods are all identical in API
823 and behavior to the same methods in L<Class::MOP::Class>.
827 =item B<< $metarole->method_metaclass >>
829 Returns the method metaclass name for the role. This defaults to
830 L<Moose::Meta::Role::Method>.
832 =item B<< $metarole->get_method($name) >>
834 =item B<< $metarole->has_method($name) >>
836 =item B<< $metarole->add_method( $name, $body ) >>
838 =item B<< $metarole->get_method_list >>
840 =item B<< $metarole->get_method_map >>
842 =item B<< $metarole->find_method_by_name($name) >>
844 These methods are all identical to the methods of the same name in
851 As with methods, the methods for dealing with a role's attribute are
852 all identical in API and behavior to the same methods in
853 L<Class::MOP::Class>.
855 However, attributes stored in this class are I<not> stored as
856 objects. Rather, the attribute definition is stored as a hash
857 reference. When a role is composed into a class, this hash reference
858 is passed directly to the metaclass's C<add_attribute> method.
860 This is quite likely to change in the future.
864 =item B<< $metarole->get_attribute($attribute_name) >>
866 =item B<< $metarole->has_attribute($attribute_name) >>
868 =item B<< $metarole->get_attribute_map >>
870 =item B<< $metarole->get_attribute_list >>
872 =item B<< $metarole->add_attribute($name, %options) >>
874 =item B<< $metarole->remove_attribute($attribute_name) >>
878 =head2 Required methods
882 =item B<< $metarole->get_required_method_list >>
884 Returns the list of methods required by the role.
886 =item B<< $metarole->requires_method($name) >>
888 Returns true if the role requires the named method.
890 =item B<< $metarole->add_required_methods(@names >>
892 Adds the named methods to the roles list of required methods.
894 =item B<< $metarole->remove_required_methods(@names) >>
896 Removes the named methods to the roles list of required methods.
900 =head2 Method modifiers
902 These methods act like their counterparts in L<Class::Mop::Class> and
903 L<Moose::Meta::Class>.
905 However, method modifiers are simply stored internally, and are not
906 applied until the role itself is applied to a class.
910 =item B<< $metarole->add_after_method_modifier($method_name, $method) >>
912 =item B<< $metarole->add_around_method_modifier($method_name, $method) >>
914 =item B<< $metarole->add_before_method_modifier($method_name, $method) >>
916 =item B<< $metarole->add_override_method_modifier($method_name, $method) >>
918 These methods all add an appropriate modifier to the internal list of
921 =item B<< $metarole->has_after_method_modifiers >>
923 =item B<< $metarole->has_around_method_modifiers >>
925 =item B<< $metarole->has_before_method_modifiers >>
927 =item B<< $metarole->has_override_method_modifier >>
929 Return true if the role has any modifiers of the given type.
931 =item B<< $metarole->get_after_method_modifiers($method_name) >>
933 =item B<< $metarole->get_around_method_modifiers($method_name) >>
935 =item B<< $metarole->get_before_method_modifiers($method_name) >>
937 Given a method name, returns a list of the appropriate modifiers for
940 =item B<< $metarole->get_override_method_modifier($method_name) >>
942 Given a method name, returns the override method modifier for that
943 method, if it has one.
951 =item B<< Moose::Meta::Role->meta >>
953 This will return a L<Class::MOP::Class> instance for this class.
959 All complex software has bugs lurking in it, and this module is no
960 exception. If you find a bug please either email me, or add the bug
965 Stevan Little E<lt>stevan@iinteractive.comE<gt>
967 =head1 COPYRIGHT AND LICENSE
969 Copyright 2006-2009 by Infinity Interactive, Inc.
971 L<http://www.iinteractive.com>
973 This library is free software; you can redistribute it and/or modify
974 it under the same terms as Perl itself.