r30458 - in /trunk/libmoosex-emulate-class-accessor-fast-perl: ./ debian/ inc/Module/ inc/Module/Install/ lib/MooseX/Emulate/Class/Accessor/ lib/MooseX/Emulate/Class/Accessor/Fast/ t/

eloy at users.alioth.debian.org eloy at users.alioth.debian.org
Wed Feb 4 09:32:03 UTC 2009


Author: eloy
Date: Wed Feb  4 09:31:59 2009
New Revision: 30458

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=30458
Log:
new upstream version

Added:
    trunk/libmoosex-emulate-class-accessor-fast-perl/lib/MooseX/Emulate/Class/Accessor/Fast/
      - copied from r30457, branches/upstream/libmoosex-emulate-class-accessor-fast-perl/current/lib/MooseX/Emulate/Class/Accessor/Fast/
    trunk/libmoosex-emulate-class-accessor-fast-perl/t/class_accessor_chained_fast.t
      - copied unchanged from r30457, branches/upstream/libmoosex-emulate-class-accessor-fast-perl/current/t/class_accessor_chained_fast.t
    trunk/libmoosex-emulate-class-accessor-fast-perl/t/list_assign.t
      - copied unchanged from r30457, branches/upstream/libmoosex-emulate-class-accessor-fast-perl/current/t/list_assign.t
Modified:
    trunk/libmoosex-emulate-class-accessor-fast-perl/Changes
    trunk/libmoosex-emulate-class-accessor-fast-perl/MANIFEST
    trunk/libmoosex-emulate-class-accessor-fast-perl/META.yml
    trunk/libmoosex-emulate-class-accessor-fast-perl/debian/changelog
    trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install.pm
    trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Base.pm
    trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Can.pm
    trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Fetch.pm
    trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Makefile.pm
    trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Metadata.pm
    trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Win32.pm
    trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/WriteAll.pm
    trunk/libmoosex-emulate-class-accessor-fast-perl/lib/MooseX/Emulate/Class/Accessor/Fast.pm
    trunk/libmoosex-emulate-class-accessor-fast-perl/t/recreated_accessors.t

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/Changes?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/Changes (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/Changes Wed Feb  4 09:31:59 2009
@@ -1,11 +1,16 @@
-0.00701    Jan 02, 2008
+0.00800    Feb 03, 2009
+          - Fix assigning a list to an accessor stores a list ref
+             - tests
+          - TODO test for Class::Accessor::Chained::Fast compatibility
+0.00701    Jan 02, 2009
           - Better errors when trying to modify an immutable class
           - Fix typo in Makefile.PL description
           - Missing dep in Makefile.PL (rafl)
 0.00700    Dec 29, 2008
-          - Creating a new accessor with the same name as an old one would result in
-            a new attribute with no reader/writer/accessor. Reported by t0m
-             - tests (t0m) 
+          - Creating a new accessor with the same name as an old one would 
+            result in a new attribute with no reader/writer/accessor. 
+            Reported by t0m
+             - tests (t0m)
 0.00600    Dec 17, 2008
           - Add test for a 'meta' accessor, which we need to treat as a 
             special case (t0m)
@@ -13,7 +18,8 @@
             which is behavior we don't want to lose (t0m)
           - Don't use ->meta
           - Don't use ->can
-          - Attempt to support attrs named meta with no success. test marked as todo.
+          - Attempt to support attrs named meta with no success. test marked 
+            as todo.
 0.00500    Dec 9, 2008
           - make_accessor, make_ro_accessor, make_rw_accessor
             - tests

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/MANIFEST?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/MANIFEST (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/MANIFEST Wed Feb  4 09:31:59 2009
@@ -9,6 +9,8 @@
 inc/Module/Install/WriteAll.pm
 lib/MooseX/Adopt/Class/Accessor/Fast.pm
 lib/MooseX/Emulate/Class/Accessor/Fast.pm
+lib/MooseX/Emulate/Class/Accessor/Fast/Meta/Accessor.pm
+lib/MooseX/Emulate/Class/Accessor/Fast/Meta/Role/Attribute.pm
 Makefile.PL
 MANIFEST			This list of files
 META.yml
@@ -16,8 +18,10 @@
 t/accessors.t
 t/adopt.t
 t/attr_named_meta.t
+t/class_accessor_chained_fast.t
 t/construction.t
 t/getset.t
 t/lib/TestAdoptCAF.pm
+t/list_assign.t
 t/no_replace_existing_symbols.t
 t/recreated_accessors.t

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/META.yml?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/META.yml (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/META.yml Wed Feb  4 09:31:59 2009
@@ -5,7 +5,7 @@
 build_requires:
   Test::More: 0
 distribution_type: module
-generated_by: 'Module::Install version 0.76'
+generated_by: 'Module::Install version 0.78'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -20,4 +20,4 @@
   namespace::clean: 0
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.00701
+version: 0.00800

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/debian/changelog?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/debian/changelog (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/debian/changelog Wed Feb  4 09:31:59 2009
@@ -1,3 +1,9 @@
+libmoosex-emulate-class-accessor-fast-perl (0.00800-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org>  Wed, 04 Feb 2009 10:29:24 +0100
+
 libmoosex-emulate-class-accessor-fast-perl (0.00701-1) unstable; urgency=low
 
   * New upstream release.

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install.pm?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install.pm (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install.pm Wed Feb  4 09:31:59 2009
@@ -30,7 +30,7 @@
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '0.76';
+	$VERSION = '0.78';
 
 	*inc::Module::Install::VERSION = *VERSION;
 	@inc::Module::Install::ISA     = __PACKAGE__;
@@ -125,8 +125,10 @@
 			goto &$code unless $cwd eq $pwd;
 		}
 		$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
-		unshift @_, ( $self, $1 );
-		goto &{$self->can('call')} unless uc($1) eq $1;
+		unless ( uc($1) eq $1 ) {
+			unshift @_, ( $self, $1 );
+			goto &{$self->can('call')};
+		}
 	};
 }
 
@@ -248,7 +250,7 @@
 sub load_extensions {
 	my ($self, $path, $top) = @_;
 
-	unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
+	unless ( grep { !ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
 		unshift @INC, $self->{prefix};
 	}
 
@@ -339,6 +341,9 @@
 	close FH or die "close($_[0]): $!";
 }
 
+# _version is for processing module versions (eg, 1.03_05) not
+# Perl versions (eg, 5.8.1).
+
 sub _version ($) {
 	my $s = shift || 0;
 	   $s =~ s/^(\d+)\.?//;
@@ -361,4 +366,4 @@
 
 1;
 
-# Copyright 2008 Adam Kennedy.
+# Copyright 2008 - 2009 Adam Kennedy.

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Base.pm?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Base.pm (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Base.pm Wed Feb  4 09:31:59 2009
@@ -1,7 +1,7 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.76';
+$VERSION = '0.78';
 
 # Suspend handler for "redefined" warnings
 BEGIN {

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Can.pm?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Can.pm (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Can.pm Wed Feb  4 09:31:59 2009
@@ -11,7 +11,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.76';
+	$VERSION = '0.78';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -39,6 +39,7 @@
 	return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
 
 	for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
+		next if $dir eq '';
 		my $abs = File::Spec->catfile($dir, $_[1]);
 		return $abs if (-x $abs or $abs = MM->maybe_command($abs));
 	}
@@ -79,4 +80,4 @@
 
 __END__
 
-#line 157
+#line 158

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Fetch.pm?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Fetch.pm (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Fetch.pm Wed Feb  4 09:31:59 2009
@@ -6,20 +6,20 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.76';
+	$VERSION = '0.78';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
 
 sub get_file {
     my ($self, %args) = @_;
-    my ($scheme, $host, $path, $file) = 
+    my ($scheme, $host, $path, $file) =
         $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
 
     if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) {
         $args{url} = $args{ftp_url}
             or (warn("LWP support unavailable!\n"), return);
-        ($scheme, $host, $path, $file) = 
+        ($scheme, $host, $path, $file) =
             $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
     }
 

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Makefile.pm?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Makefile.pm (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Makefile.pm Wed Feb  4 09:31:59 2009
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.76';
+	$VERSION = '0.78';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -64,7 +64,7 @@
 	my $self  = shift;
 	my $clean = $self->makemaker_args->{clean} ||= {};
 	  %$clean = (
-		%$clean, 
+		%$clean,
 		FILES => join ' ', grep { length $_ } ($clean->{FILES} || (), @_),
 	);
 }
@@ -73,7 +73,7 @@
 	my $self      = shift;
 	my $realclean = $self->makemaker_args->{realclean} ||= {};
 	  %$realclean = (
-		%$realclean, 
+		%$realclean,
 		FILES => join ' ', grep { length $_ } ($realclean->{FILES} || (), @_),
 	);
 }
@@ -124,7 +124,7 @@
 
 	$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
 
-	# Generate the 
+	# Generate the
 	my $args = $self->makemaker_args;
 	$args->{DISTNAME} = $self->name;
 	$args->{NAME}     = $self->module_name || $self->name;
@@ -181,7 +181,9 @@
 
 	my $user_preop = delete $args{dist}->{PREOP};
 	if (my $preop = $self->admin->preop($user_preop)) {
-		$args{dist} = $preop;
+		foreach my $key ( keys %$preop ) {
+			$args{dist}->{$key} = $preop->{$key};
+		}
 	}
 
 	my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
@@ -194,7 +196,7 @@
 	my $top_class     = ref($self->_top) || '';
 	my $top_version   = $self->_top->VERSION || '';
 
-	my $preamble = $self->preamble 
+	my $preamble = $self->preamble
 		? "# Preamble by $top_class $top_version\n"
 			. $self->preamble
 		: '';
@@ -248,4 +250,4 @@
 
 __END__
 
-#line 377
+#line 379

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Metadata.pm?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Metadata.pm (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Metadata.pm Wed Feb  4 09:31:59 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.76';
+	$VERSION = '0.78';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -175,6 +175,13 @@
 	my $version = shift or die(
 		"Did not provide a value to perl_version()"
 	);
+
+	# Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
+	# numbers (eg, 5.006001 or 5.008009).
+	# Also, convert double-part versions (eg, 5.8)
+
+	$version =~ s/^(\d+)\.(\d+)(?:\.(\d+))?$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e;
+
 	$version =~ s/_.+$//;
 	$version = $version + 0; # Numify
 	unless ( $version >= 5.005 ) {
@@ -212,6 +219,9 @@
 		unless ( -e $file ) {
 			die("all_from cannot find $file from $name");
 		}
+	}
+	unless ( -f $file ) {
+		die("The path '$file' does not exist, or is not a file");
 	}
 
 	# Some methods pull from POD instead of code.
@@ -424,8 +434,12 @@
 		my $license_text = $1;
 		my @phrases      = (
 			'under the same (?:terms|license) as perl itself' => 'perl',        1,
+			'GNU general public license'                      => 'gpl',         1,
 			'GNU public license'                              => 'gpl',         1,
+			'GNU lesser general public license'               => 'lgpl',        1,
 			'GNU lesser public license'                       => 'lgpl',        1,
+			'GNU library general public license'              => 'lgpl',        1,
+			'GNU library public license'                      => 'lgpl',        1,
 			'BSD license'                                     => 'bsd',         1,
 			'Artistic license'                                => 'artistic',    1,
 			'GPL'                                             => 'gpl',         1,
@@ -438,9 +452,6 @@
 		while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
 			$pattern =~ s{\s+}{\\s+}g;
 			if ( $license_text =~ /\b$pattern\b/i ) {
-				if ( $osi and $license_text =~ /All rights reserved/i ) {
-					print "WARNING: 'All rights reserved' in copyright may invalidate Open Source license.\n";
-				}
 				$self->license($license);
 				return 1;
 			}
@@ -469,19 +480,4 @@
 	return 1;
 }
 
-sub install_script {
-	my $self = shift;
-	my $args = $self->makemaker_args;
-	my $exe  = $args->{EXE_FILES} ||= [];
-        foreach ( @_ ) {
-		if ( -f $_ ) {
-			push @$exe, $_;
-		} elsif ( -d 'script' and -f "script/$_" ) {
-			push @$exe, "script/$_";
-		} else {
-			die("Cannot find script '$_'");
-		}
-	}
-}
-
 1;

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Win32.pm?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Win32.pm (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/Win32.pm Wed Feb  4 09:31:59 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.76';
+	$VERSION = '0.78';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/WriteAll.pm?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/WriteAll.pm (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/inc/Module/Install/WriteAll.pm Wed Feb  4 09:31:59 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.76';
+	$VERSION = '0.78';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/lib/MooseX/Emulate/Class/Accessor/Fast.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/lib/MooseX/Emulate/Class/Accessor/Fast.pm?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/lib/MooseX/Emulate/Class/Accessor/Fast.pm (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/lib/MooseX/Emulate/Class/Accessor/Fast.pm Wed Feb  4 09:31:59 2009
@@ -4,7 +4,9 @@
 use Class::MOP ();
 use Scalar::Util ();
 
-our $VERSION = '0.00701';
+use MooseX::Emulate::Class::Accessor::Fast::Meta::Accessor ();
+
+our $VERSION = '0.00800';
 
 =head1 NAME
 
@@ -116,7 +118,9 @@
     #dont overwrite existing methods
     if($reader eq $writer){
       my %opts = ( $meta->has_method($reader) ? () : (accessor => $reader) );
-      my $attr = $meta->add_attribute($attr_name, %opts);
+      my $attr = $meta->find_attribute_by_name($attr_name) || $meta->add_attribute($attr_name, %opts,
+        traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute']
+      );
       if($attr_name eq $reader){
         my $alias = "_${attr_name}_accessor";
         next if $meta->has_method($alias);
@@ -126,7 +130,9 @@
     } else {
       my @opts = ( $meta->has_method($writer) ? () : (writer => $writer) );
       push(@opts, (reader => $reader)) unless $meta->has_method($reader);
-      $meta->add_attribute($attr_name, @opts);
+      my $attr = $meta->find_attribute_by_name($attr_name) || $meta->add_attribute($attr_name, @opts,
+        traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute']
+      );
     }
   }
 }
@@ -149,7 +155,9 @@
       if $meta->find_attribute_by_name($attr_name);
     my $reader = $self->accessor_name_for($attr_name);
     my @opts = ($meta->has_method($reader) ? () : (reader => $reader) );
-    my $attr = $meta->add_attribute($attr_name, @opts);
+    my $attr = $meta->add_attribute($attr_name, @opts,
+      traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute']
+    ) if scalar(@opts);
     if($reader eq $attr_name && $reader eq $self->mutator_name_for($attr_name)){
       $meta->add_method("_${attr_name}_accessor" => $attr->get_read_method_ref)
         unless $meta->has_method("_${attr_name}_accessor");
@@ -176,7 +184,9 @@
       if $meta->find_attribute_by_name($attr_name);
     my $writer = $self->mutator_name_for($attr_name);
     my @opts = ($meta->has_method($writer) ? () : (writer => $writer) );
-    my $attr = $meta->add_attribute($attr_name, @opts);
+    my $attr = $meta->add_attribute($attr_name, @opts,
+      traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute']
+    ) if scalar(@opts);
     if($writer eq $attr_name && $writer eq $self->accessor_name_for($attr_name)){
       $meta->add_method("_${attr_name}_accessor" => $attr->get_write_method_ref)
         unless $meta->has_method("_${attr_name}_accessor");
@@ -255,7 +265,9 @@
 sub make_accessor {
   my($class, $field) = @_;
   my $meta = $locate_metaclass->($class);
-  my $attr = $meta->find_attribute_by_name($field) || $meta->add_attribute($field); 
+  my $attr = $meta->find_attribute_by_name($field) || $meta->add_attribute($field,
+      traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute']
+  );
   my $reader = $attr->get_read_method_ref;
   my $writer = $attr->get_write_method_ref;
   return sub {
@@ -269,7 +281,9 @@
 sub make_ro_accessor {
   my($class, $field) = @_;
   my $meta = $locate_metaclass->($class);
-  my $attr = $meta->find_attribute_by_name($field) || $meta->add_attribute($field); 
+  my $attr = $meta->find_attribute_by_name($field) || $meta->add_attribute($field,
+      traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute']
+  );
   return $attr->get_read_method_ref;
 }
 
@@ -277,7 +291,9 @@
 sub make_wo_accessor {
   my($class, $field) = @_;
   my $meta = $locate_metaclass->($class);
-  my $attr = $meta->find_attribute_by_name($field) || $meta->add_attribute($field); 
+  my $attr = $meta->find_attribute_by_name($field) || $meta->add_attribute($field,
+      traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute']
+  );
   return $attr->get_write_method_ref;
 }
 
@@ -302,7 +318,9 @@
 
 =over 4
 
-=item Tomas Doran E<lt>bobtfish at bobtfish.netE<gt>
+=item Tomas Doran (t0m) E<lt>bobtfish at bobtfish.netE<gt>
+
+=item Florian Ragwitz (rafl) E<lt>rafl at debian.orgE<gt>
 
 =back
 

Modified: trunk/libmoosex-emulate-class-accessor-fast-perl/t/recreated_accessors.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-emulate-class-accessor-fast-perl/t/recreated_accessors.t?rev=30458&op=diff
==============================================================================
--- trunk/libmoosex-emulate-class-accessor-fast-perl/t/recreated_accessors.t (original)
+++ trunk/libmoosex-emulate-class-accessor-fast-perl/t/recreated_accessors.t Wed Feb  4 09:31:59 2009
@@ -2,7 +2,7 @@
 
 use strict;
 use warnings;
-use Test::More tests => 4;
+use Test::More tests => 5;
 use Test::Exception;
 
 # 1
@@ -25,8 +25,9 @@
   $i->foo('foo');
   $i->baz('baz');
 
-  # 3-4
+  # 3-5
   is($i->foo, 'foo');
   is($i->bar, 'bar');
+  is($i->{baz}, 'baz');
 } 'No exception';
 




More information about the Pkg-perl-cvs-commits mailing list