From: Stevan Little Date: Mon, 31 Dec 2007 16:53:20 +0000 (+0000) Subject: copyright date changes on Class::MOP X-Git-Tag: 0_51~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=69e3ab0a5a391925610bbb917d81da8d53fd1b91;p=gitmo%2FClass-MOP.git copyright date changes on Class::MOP --- diff --git a/Changes b/Changes index ffa661b..0eaf9d9 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Perl extension Class-MOP. +0.51 + ~~~ some misc. doc. fixes ~~~ + ~~ updated copyright dates ~~ + 0.50 Fri. Dec. 21, 2007 * Class::MOP::Class - fixed bug in immutable to make sure that diff --git a/README b/README index 1ef6ed5..6454563 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Class::MOP version 0.50 +Class::MOP version 0.51 =========================== See the individual module documentation for more information @@ -23,7 +23,7 @@ This module requires these other modules and libraries: COPYRIGHT AND LICENCE -Copyright (C) 2006, 2007 Infinity Interactive, Inc. +Copyright (C) 2006-2008 Infinity Interactive, Inc. http://www.iinteractive.com diff --git a/examples/ArrayBasedStorage.pod b/examples/ArrayBasedStorage.pod index daf2eed..e4c2cee 100644 --- a/examples/ArrayBasedStorage.pod +++ b/examples/ArrayBasedStorage.pod @@ -121,7 +121,7 @@ Yuval Kogman Enothingmuch@woobling.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/examples/AttributesWithHistory.pod b/examples/AttributesWithHistory.pod index 5a91923..9d2c4b5 100644 --- a/examples/AttributesWithHistory.pod +++ b/examples/AttributesWithHistory.pod @@ -126,7 +126,7 @@ Yuval Kogman Enothingmuch@woobling.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/examples/C3MethodDispatchOrder.pod b/examples/C3MethodDispatchOrder.pod index 5623137..f6156d5 100644 --- a/examples/C3MethodDispatchOrder.pod +++ b/examples/C3MethodDispatchOrder.pod @@ -129,7 +129,7 @@ Yuval Kogman Enothingmuch@woobling.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/examples/ClassEncapsulatedAttributes.pod b/examples/ClassEncapsulatedAttributes.pod index c3c71eb..c1ddae8 100644 --- a/examples/ClassEncapsulatedAttributes.pod +++ b/examples/ClassEncapsulatedAttributes.pod @@ -141,7 +141,7 @@ Yuval Kogman Enothingmuch@woobling.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/examples/InsideOutClass.pod b/examples/InsideOutClass.pod index 1018c0b..5f94a25 100644 --- a/examples/InsideOutClass.pod +++ b/examples/InsideOutClass.pod @@ -185,7 +185,7 @@ Yuval Kogman Enothingmuch@woobling.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/examples/InstanceCountingClass.pod b/examples/InstanceCountingClass.pod index b3fbac5..d6a4f31 100644 --- a/examples/InstanceCountingClass.pod +++ b/examples/InstanceCountingClass.pod @@ -63,7 +63,7 @@ Yuval Kogman Enothingmuch@woobling.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/examples/LazyClass.pod b/examples/LazyClass.pod index 839b609..560c074 100644 --- a/examples/LazyClass.pod +++ b/examples/LazyClass.pod @@ -153,7 +153,7 @@ Yuval Kogman Enothingmuch@woobling.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/examples/Perl6Attribute.pod b/examples/Perl6Attribute.pod index a5bc8fd..e03eb71 100644 --- a/examples/Perl6Attribute.pod +++ b/examples/Perl6Attribute.pod @@ -73,7 +73,7 @@ Yuval Kogman Enothingmuch@woobling.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index 9d0c16e..cfb9503 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -14,7 +14,7 @@ use Class::MOP::Method; use Class::MOP::Immutable; BEGIN { - our $VERSION = '0.50'; + our $VERSION = '0.51'; our $AUTHORITY = 'cpan:STEVAN'; use XSLoader; @@ -899,7 +899,7 @@ Scott (konobi) McWhirter =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/Class/MOP/Attribute.pm b/lib/Class/MOP/Attribute.pm index f8054c3..55b1518 100644 --- a/lib/Class/MOP/Attribute.pm +++ b/lib/Class/MOP/Attribute.pm @@ -9,7 +9,7 @@ use Class::MOP::Method::Accessor; use Carp 'confess'; use Scalar::Util 'blessed', 'reftype', 'weaken'; -our $VERSION = '0.21'; +our $VERSION = '0.22'; our $AUTHORITY = 'cpan:STEVAN'; use base 'Class::MOP::Object'; @@ -736,7 +736,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index 652a827..e50ee9a 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -1449,7 +1449,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/Class/MOP/Immutable.pm b/lib/Class/MOP/Immutable.pm index fb52bd6..8ee7567 100644 --- a/lib/Class/MOP/Immutable.pm +++ b/lib/Class/MOP/Immutable.pm @@ -337,7 +337,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/Class/MOP/Instance.pm b/lib/Class/MOP/Instance.pm index 008815e..ea3d124 100644 --- a/lib/Class/MOP/Instance.pm +++ b/lib/Class/MOP/Instance.pm @@ -108,13 +108,13 @@ sub is_slot_initialized { } sub weaken_slot_value { - my ($self, $instance, $slot_name) = @_; - weaken $instance->{$slot_name}; + my ($self, $instance, $slot_name) = @_; + weaken $instance->{$slot_name}; } sub strengthen_slot_value { - my ($self, $instance, $slot_name) = @_; - $self->set_slot_value($instance, $slot_name, $self->get_slot_value($instance, $slot_name)); + my ($self, $instance, $slot_name) = @_; + $self->set_slot_value($instance, $slot_name, $self->get_slot_value($instance, $slot_name)); } # inlinable operation snippets @@ -329,7 +329,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/Class/MOP/Method.pm b/lib/Class/MOP/Method.pm index 4c0a083..6878ba7 100644 --- a/lib/Class/MOP/Method.pm +++ b/lib/Class/MOP/Method.pm @@ -131,7 +131,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/Class/MOP/Method/Accessor.pm b/lib/Class/MOP/Method/Accessor.pm index 6d4f5d5..62eaab8 100644 --- a/lib/Class/MOP/Method/Accessor.pm +++ b/lib/Class/MOP/Method/Accessor.pm @@ -288,7 +288,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/Class/MOP/Method/Constructor.pm b/lib/Class/MOP/Method/Constructor.pm index 1f5cae0..a05ebac 100644 --- a/lib/Class/MOP/Method/Constructor.pm +++ b/lib/Class/MOP/Method/Constructor.pm @@ -224,7 +224,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/Class/MOP/Method/Generated.pm b/lib/Class/MOP/Method/Generated.pm index afbc391..0b3456a 100644 --- a/lib/Class/MOP/Method/Generated.pm +++ b/lib/Class/MOP/Method/Generated.pm @@ -86,7 +86,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/Class/MOP/Method/Wrapped.pm b/lib/Class/MOP/Method/Wrapped.pm index 3c02017..0055265 100644 --- a/lib/Class/MOP/Method/Wrapped.pm +++ b/lib/Class/MOP/Method/Wrapped.pm @@ -20,119 +20,119 @@ use base 'Class::MOP::Method'; # At this point it's "fast enough", after all # you can't get something for nothing :) my $_build_wrapped_method = sub { - my $modifier_table = shift; - my ($before, $after, $around) = ( - $modifier_table->{before}, - $modifier_table->{after}, - $modifier_table->{around}, - ); - if (@$before && @$after) { - $modifier_table->{cache} = sub { - $_->(@_) for @{$before}; - my @rval; - ((defined wantarray) ? - ((wantarray) ? - (@rval = $around->{cache}->(@_)) - : - ($rval[0] = $around->{cache}->(@_))) - : - $around->{cache}->(@_)); - $_->(@_) for @{$after}; - return unless defined wantarray; - return wantarray ? @rval : $rval[0]; - } - } - elsif (@$before && !@$after) { - $modifier_table->{cache} = sub { - $_->(@_) for @{$before}; - return $around->{cache}->(@_); - } - } - elsif (@$after && !@$before) { - $modifier_table->{cache} = sub { - my @rval; - ((defined wantarray) ? - ((wantarray) ? - (@rval = $around->{cache}->(@_)) - : - ($rval[0] = $around->{cache}->(@_))) - : - $around->{cache}->(@_)); - $_->(@_) for @{$after}; - return unless defined wantarray; - return wantarray ? @rval : $rval[0]; - } - } - else { - $modifier_table->{cache} = $around->{cache}; - } + my $modifier_table = shift; + my ($before, $after, $around) = ( + $modifier_table->{before}, + $modifier_table->{after}, + $modifier_table->{around}, + ); + if (@$before && @$after) { + $modifier_table->{cache} = sub { + $_->(@_) for @{$before}; + my @rval; + ((defined wantarray) ? + ((wantarray) ? + (@rval = $around->{cache}->(@_)) + : + ($rval[0] = $around->{cache}->(@_))) + : + $around->{cache}->(@_)); + $_->(@_) for @{$after}; + return unless defined wantarray; + return wantarray ? @rval : $rval[0]; + } + } + elsif (@$before && !@$after) { + $modifier_table->{cache} = sub { + $_->(@_) for @{$before}; + return $around->{cache}->(@_); + } + } + elsif (@$after && !@$before) { + $modifier_table->{cache} = sub { + my @rval; + ((defined wantarray) ? + ((wantarray) ? + (@rval = $around->{cache}->(@_)) + : + ($rval[0] = $around->{cache}->(@_))) + : + $around->{cache}->(@_)); + $_->(@_) for @{$after}; + return unless defined wantarray; + return wantarray ? @rval : $rval[0]; + } + } + else { + $modifier_table->{cache} = $around->{cache}; + } }; sub wrap { - my $class = shift; - my $code = shift; - (blessed($code) && $code->isa('Class::MOP::Method')) - || confess "Can only wrap blessed CODE"; - my $modifier_table = { - cache => undef, - orig => $code, - before => [], - after => [], - around => { - cache => $code->body, - methods => [], - }, - }; - $_build_wrapped_method->($modifier_table); - my $method = $class->SUPER::wrap(sub { $modifier_table->{cache}->(@_) }); - $method->{'%!modifier_table'} = $modifier_table; - $method; + my $class = shift; + my $code = shift; + (blessed($code) && $code->isa('Class::MOP::Method')) + || confess "Can only wrap blessed CODE"; + my $modifier_table = { + cache => undef, + orig => $code, + before => [], + after => [], + around => { + cache => $code->body, + methods => [], + }, + }; + $_build_wrapped_method->($modifier_table); + my $method = $class->SUPER::wrap(sub { $modifier_table->{cache}->(@_) }); + $method->{'%!modifier_table'} = $modifier_table; + $method; } sub get_original_method { - my $code = shift; + my $code = shift; $code->{'%!modifier_table'}->{orig}; } sub add_before_modifier { - my $code = shift; - my $modifier = shift; - unshift @{$code->{'%!modifier_table'}->{before}} => $modifier; - $_build_wrapped_method->($code->{'%!modifier_table'}); + my $code = shift; + my $modifier = shift; + unshift @{$code->{'%!modifier_table'}->{before}} => $modifier; + $_build_wrapped_method->($code->{'%!modifier_table'}); } sub add_after_modifier { - my $code = shift; - my $modifier = shift; - push @{$code->{'%!modifier_table'}->{after}} => $modifier; - $_build_wrapped_method->($code->{'%!modifier_table'}); + my $code = shift; + my $modifier = shift; + push @{$code->{'%!modifier_table'}->{after}} => $modifier; + $_build_wrapped_method->($code->{'%!modifier_table'}); } { - # NOTE: - # this is another possible candidate for - # optimization as well. There is an overhead - # associated with the currying that, if - # eliminated might make around modifiers - # more manageable. - my $compile_around_method = sub {{ - my $f1 = pop; - return $f1 unless @_; - my $f2 = pop; - push @_, sub { $f2->( $f1, @_ ) }; - redo; - }}; - - sub add_around_modifier { - my $code = shift; - my $modifier = shift; - unshift @{$code->{'%!modifier_table'}->{around}->{methods}} => $modifier; - $code->{'%!modifier_table'}->{around}->{cache} = $compile_around_method->( - @{$code->{'%!modifier_table'}->{around}->{methods}}, - $code->{'%!modifier_table'}->{orig}->body - ); - $_build_wrapped_method->($code->{'%!modifier_table'}); - } + # NOTE: + # this is another possible candidate for + # optimization as well. There is an overhead + # associated with the currying that, if + # eliminated might make around modifiers + # more manageable. + my $compile_around_method = sub {{ + my $f1 = pop; + return $f1 unless @_; + my $f2 = pop; + push @_, sub { $f2->( $f1, @_ ) }; + redo; + }}; + + sub add_around_modifier { + my $code = shift; + my $modifier = shift; + unshift @{$code->{'%!modifier_table'}->{around}->{methods}} => $modifier; + $code->{'%!modifier_table'}->{around}->{cache} = $compile_around_method->( + @{$code->{'%!modifier_table'}->{around}->{methods}}, + $code->{'%!modifier_table'}->{orig}->body + ); + $_build_wrapped_method->($code->{'%!modifier_table'}); + } } 1; @@ -181,7 +181,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/Class/MOP/Module.pm b/lib/Class/MOP/Module.pm index 10aa614..2a743a0 100644 --- a/lib/Class/MOP/Module.pm +++ b/lib/Class/MOP/Module.pm @@ -79,7 +79,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/Class/MOP/Object.pm b/lib/Class/MOP/Object.pm index 49ae865..4bf6e46 100644 --- a/lib/Class/MOP/Object.pm +++ b/lib/Class/MOP/Object.pm @@ -93,7 +93,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/Class/MOP/Package.pm b/lib/Class/MOP/Package.pm index 0fa340a..d403f20 100644 --- a/lib/Class/MOP/Package.pm +++ b/lib/Class/MOP/Package.pm @@ -292,7 +292,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L diff --git a/lib/metaclass.pm b/lib/metaclass.pm index 1d6575e..2b048db 100644 --- a/lib/metaclass.pm +++ b/lib/metaclass.pm @@ -91,7 +91,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006, 2007 by Infinity Interactive, Inc. +Copyright 2006-2008 by Infinity Interactive, Inc. L