Hello community,

here is the log from the commit of package perl-Class-Method-Modifiers for 
openSUSE:Factory checked in at 2012-05-03 10:59:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Class-Method-Modifiers (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Class-Method-Modifiers.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Class-Method-Modifiers", Maintainer is ""

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Class-Method-Modifiers/perl-Class-Method-Modifiers.changes
  2011-10-27 19:24:21.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Class-Method-Modifiers.new/perl-Class-Method-Modifiers.changes
     2012-05-03 10:59:36.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Apr 19 13:17:11 UTC 2012 - tabra...@novell.com
+
+- updated to 1.09
+  - Install modified subs in the proper namespace [#74569]
+    (Karen Etheridge)
+
+-------------------------------------------------------------------

Old:
----
  Class-Method-Modifiers-1.08.tar.gz

New:
----
  Class-Method-Modifiers-1.09.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Class-Method-Modifiers.spec ++++++
--- /var/tmp/diff_new_pack.wAjNfI/_old  2012-05-03 10:59:37.000000000 +0200
+++ /var/tmp/diff_new_pack.wAjNfI/_new  2012-05-03 10:59:37.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Class-Method-Modifiers
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,48 +16,29 @@
 #
 
 
-
 Name:           perl-Class-Method-Modifiers
-Version:        1.08
-Release:        1
-License:        GPL-1.0+ or Artistic-1.0
+Version:        1.09
+Release:        0
 %define cpan_name Class-Method-Modifiers
-Summary:        provides Moose-like method modifiers
-Url:            http://search.cpan.org/dist/Class-Method-Modifiers/
+Summary:        Provides Moose-like method modifiers
+License:        GPL-1.0+ or Artistic-1.0
 Group:          Development/Libraries/Perl
+Url:            http://search.cpan.org/dist/Class-Method-Modifiers/
 Source:         
http://www.cpan.org/authors/id/S/SA/SARTAK/%{cpan_name}-%{version}.tar.gz
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
-BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.42
+BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.36
 BuildRequires:  perl(Test::Fatal)
-#BuildRequires: perl(Carp)
+BuildRequires:  perl(Test::More)
 #BuildRequires: perl(Class::Method::Modifiers)
-#BuildRequires: perl(Config)
-#BuildRequires: perl(Cwd)
-#BuildRequires: perl(Exporter)
-#BuildRequires: perl(ExtUtils::Manifest)
-#BuildRequires: perl(ExtUtils::MM_Cygwin)
-#BuildRequires: perl(ExtUtils::MM_Unix)
-#BuildRequires: perl(ExtUtils::MM_Win32)
-#BuildRequires: perl(Fcntl)
-#BuildRequires: perl(File::Basename)
-#BuildRequires: perl(File::Find)
-#BuildRequires: perl(FileHandle)
-#BuildRequires: perl(File::Path)
-#BuildRequires: perl(File::Spec)
-#BuildRequires: perl(FindBin)
 #BuildRequires: perl(inc::Module::Install)
 #BuildRequires: perl(JSON)
 #BuildRequires: perl(LWP::Simple)
 #BuildRequires: perl(Module::Build)
 #BuildRequires: perl(Module::Install::Base)
-#BuildRequires: perl(Net::FTP)
 #BuildRequires: perl(Parse::CPAN::Meta)
-#BuildRequires: perl(Socket)
-#BuildRequires: perl(Test::More)
-#BuildRequires: perl(vars)
 #BuildRequires: perl(YAML::Tiny)
 %{perl_requires}
 

++++++ Class-Method-Modifiers-1.08.tar.gz -> Class-Method-Modifiers-1.09.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Class-Method-Modifiers-1.08/Changes 
new/Class-Method-Modifiers-1.09/Changes
--- old/Class-Method-Modifiers-1.08/Changes     2011-10-15 17:05:22.000000000 
+0200
+++ new/Class-Method-Modifiers-1.09/Changes     2012-04-03 02:09:22.000000000 
+0200
@@ -1,5 +1,9 @@
 Revision history for Class-Method-Modifiers
 
+1.09    2012-04-02
+        Install modified subs in the proper namespace [#74569]
+        (Karen Etheridge)
+
 1.08    Sun Oct 16 2011
         Document install_modifier (requested by Tokuhiro Matsuno)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Class-Method-Modifiers-1.08/MANIFEST 
new/Class-Method-Modifiers-1.09/MANIFEST
--- old/Class-Method-Modifiers-1.08/MANIFEST    2011-02-24 05:55:38.000000000 
+0100
+++ new/Class-Method-Modifiers-1.09/MANIFEST    2012-04-03 02:11:41.000000000 
+0200
@@ -1,5 +1,6 @@
 Changes
 inc/Module/Install.pm
+inc/Module/Install/AuthorRequires.pm
 inc/Module/Install/Base.pm
 inc/Module/Install/Can.pm
 inc/Module/Install/Fetch.pm
@@ -36,3 +37,4 @@
 t/081-sub-and-modifier.t
 t/090-diamond.t
 t/100-class-mop-method-modifiers.t
+t/110-namespace-clean.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Class-Method-Modifiers-1.08/META.yml 
new/Class-Method-Modifiers-1.09/META.yml
--- old/Class-Method-Modifiers-1.08/META.yml    2011-10-15 17:05:37.000000000 
+0200
+++ new/Class-Method-Modifiers-1.09/META.yml    2012-04-03 02:09:58.000000000 
+0200
@@ -3,12 +3,14 @@
 author:
   - 'Shawn M Moore, C<sar...@gmail.com>'
 build_requires:
-  ExtUtils::MakeMaker: 6.42
+  ExtUtils::MakeMaker: 6.36
   Test::Fatal: 0
+  Test::More: 0
 configure_requires:
-  ExtUtils::MakeMaker: 6.42
+  ExtUtils::MakeMaker: 6.36
 distribution_type: module
-generated_by: 'Module::Install version 1.02'
+dynamic_config: 1
+generated_by: 'Module::Install version 1.06'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -25,4 +27,4 @@
     type: git
     url: git://github.com/sartak/Class-Method-Modifiers.git
     web: https://github.com/sartak/Class-Method-Modifiers/tree
-version: 1.08
+version: 1.09
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Class-Method-Modifiers-1.08/Makefile.PL 
new/Class-Method-Modifiers-1.09/Makefile.PL
--- old/Class-Method-Modifiers-1.08/Makefile.PL 2011-02-24 05:50:59.000000000 
+0100
+++ new/Class-Method-Modifiers-1.09/Makefile.PL 2012-04-03 02:08:40.000000000 
+0200
@@ -6,7 +6,10 @@
 all_from       'lib/Class/Method/Modifiers.pm';
 githubmeta;
 
-build_requires 'Test::Fatal';
+test_requires 'Test::Fatal';
+test_requires 'Test::More';
+
+author_requires 'Class::MOP';
 
 WriteAll;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Class-Method-Modifiers-1.08/inc/Module/Install/AuthorRequires.pm 
new/Class-Method-Modifiers-1.09/inc/Module/Install/AuthorRequires.pm
--- old/Class-Method-Modifiers-1.08/inc/Module/Install/AuthorRequires.pm        
1970-01-01 01:00:00.000000000 +0100
+++ new/Class-Method-Modifiers-1.09/inc/Module/Install/AuthorRequires.pm        
2012-04-03 02:09:57.000000000 +0200
@@ -0,0 +1,38 @@
+#line 1
+use strict;
+use warnings;
+
+package Module::Install::AuthorRequires;
+
+use base 'Module::Install::Base';
+
+# cargo cult
+BEGIN {
+    our $VERSION = '0.02';
+    our $ISCORE  = 1;
+}
+
+sub author_requires {
+    my $self = shift;
+
+    return $self->{values}->{author_requires}
+        unless @_;
+
+    my @added;
+    while (@_) {
+        my $mod = shift or last;
+        my $version = shift || 0;
+        push @added, [$mod => $version];
+    }
+
+    push @{ $self->{values}->{author_requires} }, @added;
+    $self->admin->author_requires(@added);
+
+    return map { @$_ } @added;
+}
+
+1;
+
+__END__
+
+#line 92
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Class-Method-Modifiers-1.08/inc/Module/Install/Base.pm 
new/Class-Method-Modifiers-1.09/inc/Module/Install/Base.pm
--- old/Class-Method-Modifiers-1.08/inc/Module/Install/Base.pm  2011-10-15 
17:05:37.000000000 +0200
+++ new/Class-Method-Modifiers-1.09/inc/Module/Install/Base.pm  2012-04-03 
02:09:57.000000000 +0200
@@ -4,7 +4,7 @@
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-       $VERSION = '1.02';
+       $VERSION = '1.06';
 }
 
 # Suspend handler for "redefined" warnings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Class-Method-Modifiers-1.08/inc/Module/Install/Can.pm 
new/Class-Method-Modifiers-1.09/inc/Module/Install/Can.pm
--- old/Class-Method-Modifiers-1.08/inc/Module/Install/Can.pm   2011-10-15 
17:05:37.000000000 +0200
+++ new/Class-Method-Modifiers-1.09/inc/Module/Install/Can.pm   2012-04-03 
02:09:57.000000000 +0200
@@ -3,13 +3,12 @@
 
 use strict;
 use Config                ();
-use File::Spec            ();
 use ExtUtils::MakeMaker   ();
 use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.02';
+       $VERSION = '1.06';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
@@ -29,7 +28,7 @@
        eval { require $mod; $pkg->VERSION($ver || 0); 1 };
 }
 
-# check if we can run some command
+# Check if we can run some command
 sub can_run {
        my ($self, $cmd) = @_;
 
@@ -38,14 +37,88 @@
 
        for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
                next if $dir eq '';
-               my $abs = File::Spec->catfile($dir, $_[1]);
+               require File::Spec;
+               my $abs = File::Spec->catfile($dir, $cmd);
                return $abs if (-x $abs or $abs = MM->maybe_command($abs));
        }
 
        return;
 }
 
-# can we locate a (the) C compiler
+# Can our C compiler environment build XS files
+sub can_xs {
+       my $self = shift;
+
+       # Ensure we have the CBuilder module
+       $self->configure_requires( 'ExtUtils::CBuilder' => 0.27 );
+
+       # Do we have the configure_requires checker?
+       local $@;
+       eval "require ExtUtils::CBuilder;";
+       if ( $@ ) {
+               # They don't obey configure_requires, so it is
+               # someone old and delicate. Try to avoid hurting
+               # them by falling back to an older simpler test.
+               return $self->can_cc();
+       }
+
+       # Do we have a working C compiler
+       my $builder = ExtUtils::CBuilder->new(
+               quiet => 1,
+       );
+       unless ( $builder->have_compiler ) {
+               # No working C compiler
+               return 0;
+       }
+
+       # Write a C file representative of what XS becomes
+       require File::Temp;
+       my ( $FH, $tmpfile ) = File::Temp::tempfile(
+               "compilexs-XXXXX",
+               SUFFIX => '.c',
+       );
+       binmode $FH;
+       print $FH <<'END_C';
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+int main(int argc, char **argv) {
+    return 0;
+}
+
+int boot_sanexs() {
+    return 1;
+}
+
+END_C
+       close $FH;
+
+       # Can the C compiler access the same headers XS does
+       my @libs   = ();
+       my $object = undef;
+       eval {
+               local $^W = 0;
+               $object = $builder->compile(
+                       source => $tmpfile,
+               );
+               @libs = $builder->link(
+                       objects     => $object,
+                       module_name => 'sanexs',
+               );
+       };
+       my $result = $@ ? 0 : 1;
+
+       # Clean up all the build files
+       foreach ( $tmpfile, $object, @libs ) {
+               next unless defined $_;
+               1 while unlink;
+       }
+
+       return $result;
+}
+
+# Can we locate a (the) C compiler
 sub can_cc {
        my $self   = shift;
        my @chunks = split(/ /, $Config::Config{cc}) or return;
@@ -78,4 +151,4 @@
 
 __END__
 
-#line 156
+#line 236
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Class-Method-Modifiers-1.08/inc/Module/Install/Fetch.pm 
new/Class-Method-Modifiers-1.09/inc/Module/Install/Fetch.pm
--- old/Class-Method-Modifiers-1.08/inc/Module/Install/Fetch.pm 2011-10-15 
17:05:37.000000000 +0200
+++ new/Class-Method-Modifiers-1.09/inc/Module/Install/Fetch.pm 2012-04-03 
02:09:58.000000000 +0200
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.02';
+       $VERSION = '1.06';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Class-Method-Modifiers-1.08/inc/Module/Install/GithubMeta.pm 
new/Class-Method-Modifiers-1.09/inc/Module/Install/GithubMeta.pm
--- old/Class-Method-Modifiers-1.08/inc/Module/Install/GithubMeta.pm    
2011-10-15 17:05:37.000000000 +0200
+++ new/Class-Method-Modifiers-1.09/inc/Module/Install/GithubMeta.pm    
2012-04-03 02:09:57.000000000 +0200
@@ -7,14 +7,15 @@
 use base qw(Module::Install::Base);
 use vars qw($VERSION);
 
-$VERSION = '0.14';
+$VERSION = '0.16';
 
 sub githubmeta {
   my $self = shift;
   return unless $Module::Install::AUTHOR;
   return unless _under_git();
   return unless $self->can_run('git');
-  return unless my ($git_url) = `git remote show -n origin` =~ /URL: (.*)$/m;
+  my $remote = shift || 'origin';
+  return unless my ($git_url) = `git remote show -n $remote` =~ /URL: (.*)$/m;
   return unless $git_url =~ /github\.com/; # Not a Github repository
   my $http_url = $git_url;
   $git_url =~ s![\w\-]+\@([^:]+):!git://$1/!;
@@ -53,4 +54,4 @@
 'Github';
 __END__
 
-#line 114
+#line 117
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Class-Method-Modifiers-1.08/inc/Module/Install/Makefile.pm 
new/Class-Method-Modifiers-1.09/inc/Module/Install/Makefile.pm
--- old/Class-Method-Modifiers-1.08/inc/Module/Install/Makefile.pm      
2011-10-15 17:05:37.000000000 +0200
+++ new/Class-Method-Modifiers-1.09/inc/Module/Install/Makefile.pm      
2012-04-03 02:09:57.000000000 +0200
@@ -8,7 +8,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.02';
+       $VERSION = '1.06';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
@@ -215,18 +215,22 @@
        require ExtUtils::MakeMaker;
 
        if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) {
-               # MakeMaker can complain about module versions that include
-               # an underscore, even though its own version may contain one!
-               # Hence the funny regexp to get rid of it.  See RT #35800
-               # for details.
-               my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
-               $self->build_requires(     'ExtUtils::MakeMaker' => $v );
-               $self->configure_requires( 'ExtUtils::MakeMaker' => $v );
+               # This previous attempted to inherit the version of
+               # ExtUtils::MakeMaker in use by the module author, but this
+               # was found to be untenable as some authors build releases
+               # using future dev versions of EU:MM that nobody else has.
+               # Instead, #toolchain suggests we use 6.59 which is the most
+               # stable version on CPAN at time of writing and is, to quote
+               # ribasushi, "not terminally fucked, > and tested enough".
+               # TODO: We will now need to maintain this over time to push
+               # the version up as new versions are released.
+               $self->build_requires(     'ExtUtils::MakeMaker' => 6.59 );
+               $self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 );
        } else {
                # Allow legacy-compatibility with 5.005 by depending on the
                # most recent EU:MM that supported 5.005.
-               $self->build_requires(     'ExtUtils::MakeMaker' => 6.42 );
-               $self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
+               $self->build_requires(     'ExtUtils::MakeMaker' => 6.36 );
+               $self->configure_requires( 'ExtUtils::MakeMaker' => 6.36 );
        }
 
        # Generate the MakeMaker params
@@ -241,7 +245,6 @@
 'all_from' if you prefer) in Makefile.PL.
 EOT
 
-       $DB::single = 1;
        if ( $self->tests ) {
                my @tests = split ' ', $self->tests;
                my %seen;
@@ -412,4 +415,4 @@
 
 __END__
 
-#line 541
+#line 544
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Class-Method-Modifiers-1.08/inc/Module/Install/Metadata.pm 
new/Class-Method-Modifiers-1.09/inc/Module/Install/Metadata.pm
--- old/Class-Method-Modifiers-1.08/inc/Module/Install/Metadata.pm      
2011-10-15 17:05:37.000000000 +0200
+++ new/Class-Method-Modifiers-1.09/inc/Module/Install/Metadata.pm      
2012-04-03 02:09:57.000000000 +0200
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.02';
+       $VERSION = '1.06';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
@@ -151,15 +151,21 @@
 sub install_as_vendor { $_[0]->installdirs('vendor') }
 
 sub dynamic_config {
-       my $self = shift;
-       unless ( @_ ) {
-               warn "You MUST provide an explicit true/false value to 
dynamic_config\n";
-               return $self;
+       my $self  = shift;
+       my $value = @_ ? shift : 1;
+       if ( $self->{values}->{dynamic_config} ) {
+               # Once dynamic we never change to static, for safety
+               return 0;
        }
-       $self->{values}->{dynamic_config} = $_[0] ? 1 : 0;
+       $self->{values}->{dynamic_config} = $value ? 1 : 0;
        return 1;
 }
 
+# Convenience command
+sub static_config {
+       shift->dynamic_config(0);
+}
+
 sub perl_version {
        my $self = shift;
        return $self->{values}->{perl_version} unless @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Class-Method-Modifiers-1.08/inc/Module/Install/Win32.pm 
new/Class-Method-Modifiers-1.09/inc/Module/Install/Win32.pm
--- old/Class-Method-Modifiers-1.08/inc/Module/Install/Win32.pm 2011-10-15 
17:05:37.000000000 +0200
+++ new/Class-Method-Modifiers-1.09/inc/Module/Install/Win32.pm 2012-04-03 
02:09:58.000000000 +0200
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.02';
+       $VERSION = '1.06';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Class-Method-Modifiers-1.08/inc/Module/Install/WriteAll.pm 
new/Class-Method-Modifiers-1.09/inc/Module/Install/WriteAll.pm
--- old/Class-Method-Modifiers-1.08/inc/Module/Install/WriteAll.pm      
2011-10-15 17:05:37.000000000 +0200
+++ new/Class-Method-Modifiers-1.09/inc/Module/Install/WriteAll.pm      
2012-04-03 02:09:58.000000000 +0200
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.02';
+       $VERSION = '1.06';
        @ISA     = qw{Module::Install::Base};
        $ISCORE  = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Class-Method-Modifiers-1.08/inc/Module/Install.pm 
new/Class-Method-Modifiers-1.09/inc/Module/Install.pm
--- old/Class-Method-Modifiers-1.08/inc/Module/Install.pm       2011-10-15 
17:05:37.000000000 +0200
+++ new/Class-Method-Modifiers-1.09/inc/Module/Install.pm       2012-04-03 
02:09:57.000000000 +0200
@@ -31,7 +31,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 = '1.02';
+       $VERSION = '1.06';
 
        # Storage for the pseudo-singleton
        $MAIN    = undef;
@@ -451,7 +451,7 @@
 }
 
 sub _cmp ($$) {
-       _version($_[0]) <=> _version($_[1]);
+       _version($_[1]) <=> _version($_[2]);
 }
 
 # Cloned from Params::Util::_CLASS
@@ -467,4 +467,4 @@
 
 1;
 
-# Copyright 2008 - 2011 Adam Kennedy.
+# Copyright 2008 - 2012 Adam Kennedy.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Class-Method-Modifiers-1.08/lib/Class/Method/Modifiers.pm 
new/Class-Method-Modifiers-1.09/lib/Class/Method/Modifiers.pm
--- old/Class-Method-Modifiers-1.08/lib/Class/Method/Modifiers.pm       
2011-10-15 17:04:36.000000000 +0200
+++ new/Class-Method-Modifiers-1.09/lib/Class/Method/Modifiers.pm       
2012-04-03 02:09:05.000000000 +0200
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '1.08';
+our $VERSION = '1.09';
 
 use base 'Exporter';
 our @EXPORT = qw(before after around);
@@ -72,9 +72,7 @@
         # the Moose equivalent. :)
         if ($type eq 'around') {
             my $method = $cache->{wrapped};
-            $cache->{wrapped} = sub {
-                $code->($method, @_);
-            };
+            $cache->{wrapped} = eval "package $into; sub { \$code->(\$method, 
\@_); };";
         }
 
         # install our new method which dispatches the modifiers, but only
@@ -89,7 +87,8 @@
             # to take a reference to it. better a deref than a hash lookup
             my $wrapped = \$cache->{"wrapped"};
 
-            my $generated = 'sub {';
+            my $generated = "package $into;\n";
+            $generated .= "sub $name {";
 
             # before is easy, it doesn't affect the return value(s)
             $generated .= '$_->(@_) for @$before;' if @$before;
@@ -120,7 +119,7 @@
 
             no strict 'refs';
             no warnings 'redefine';
-            *$qualified = eval $generated;
+            eval $generated;
         };
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Class-Method-Modifiers-1.08/t/110-namespace-clean.t 
new/Class-Method-Modifiers-1.09/t/110-namespace-clean.t
--- old/Class-Method-Modifiers-1.08/t/110-namespace-clean.t     1970-01-01 
01:00:00.000000000 +0100
+++ new/Class-Method-Modifiers-1.09/t/110-namespace-clean.t     2012-04-03 
02:07:47.000000000 +0200
@@ -0,0 +1,62 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+BEGIN {
+    eval "require Class::MOP"
+        or plan skip_all => $!;
+}
+
+# code for this sub is taken directly from
+# Test::CleanNamespaces::build_namespaces_clean
+sub imports
+{
+    my $ns = shift;
+    my $meta = Class::MOP::class_of($ns) || Class::MOP::Class->initialize($ns);
+    my %methods = map { ($_ => 1) } $meta->get_method_list;
+    my @symbols = keys %{ $meta->get_all_package_symbols('CODE') || {} };
+    my @imports = grep { !$methods{$_} } @symbols;
+}
+
+{
+    package Foo;
+    sub foo { print "normal Foo::foo sub\n"; }
+    sub bar { print "normal Foo::bar sub\n"; }
+    sub baz { print "normal Foo::baz sub\n"; }
+}
+
+ok(
+    !(grep { $_ eq 'foo' || $_ eq 'bar' || $_ eq 'baz' } imports('Foo')),
+    "original subs are not in Foo's list of imports",
+)
+    or note('Foo has imports: ' . join(', ', imports('Foo')));
+
+# this should also pass:
+# namespaces_clean('Foo');
+
+eval {
+    package Foo;
+    use Class::Method::Modifiers;
+    Test::More::note 'redefining Foo::foo';
+
+    around foo => sub {
+        my $orig = shift;
+        my $ret = $orig->(@_);
+        print "wrapped foo sub\n"
+    };
+    around bar => sub { print "wrapped bar sub\n" };
+    around baz => sub { print "wrapped baz sub\n" };
+};
+
+ok(
+    !(grep { $_ eq 'foo' || $_ eq 'bar' || $_ eq 'baz' } imports('Foo')),
+    "modified subs are not in Foo's list of imports",
+)
+    or note('Foo has imports: ' . join(', ', imports('Foo')));
+
+# this should also still pass, except for the 'before', 'around' and 'after'
+# subs that CMM itself imported which should be cleaned:
+# namespaces_clean('Foo');
+
+done_testing;

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to