Hello community,

here is the log from the commit of package perl-aliased for openSUSE:Factory 
checked in at 2013-07-07 22:21:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-aliased (Old)
 and      /work/SRC/openSUSE:Factory/.perl-aliased.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-aliased"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-aliased/perl-aliased.changes        
2011-11-18 15:46:35.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-aliased.new/perl-aliased.changes   
2013-07-07 22:21:23.000000000 +0200
@@ -1,0 +2,8 @@
+Wed Jul  3 08:33:19 UTC 2013 - [email protected]
+
+- updated to 0.31
+      Added prefix() function. [rt#48289]
+      Moved Test::More to build_requires [rt#48926]
+      Moved author tests to xt/author
+
+-------------------------------------------------------------------

Old:
----
  aliased-0.30.tar.gz

New:
----
  aliased-0.31.tar.gz

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

Other differences:
------------------
++++++ perl-aliased.spec ++++++
--- /var/tmp/diff_new_pack.Brnya8/_old  2013-07-07 22:21:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Brnya8/_new  2013-07-07 22:21:24.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-aliased
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 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,22 +16,20 @@
 #
 
 
-
 Name:           perl-aliased
-Version:        0.30
-Release:        1
-License:        GPL-1.0+ or Artistic-1.0
+Version:        0.31
+Release:        0
 %define cpan_name aliased
-Summary:        Use shorter versions of class names.
-Url:            http://search.cpan.org/dist/aliased/
+Summary:        Use shorter versions of class names
+License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
+Url:            http://search.cpan.org/dist/aliased/
 Source:         
http://www.cpan.org/authors/id/O/OV/OVID/%{cpan_name}-%{version}.tar.gz
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
 BuildRequires:  perl(Module::Build)
-#BuildRequires: perl(aliased)
 %{perl_requires}
 
 %description
@@ -64,6 +62,7 @@
 
 %prep
 %setup -q -n %{cpan_name}-%{version}
+find . -type f -print0 | xargs -0 chmod 644
 
 %build
 %{__perl} Build.PL installdirs=vendor
@@ -78,6 +77,6 @@
 
 %files -f %{name}.files
 %defattr(-,root,root,755)
-%doc Changes README
+%doc Changes README xt
 
 %changelog

++++++ aliased-0.30.tar.gz -> aliased-0.31.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/Build.PL new/aliased-0.31/Build.PL
--- old/aliased-0.30/Build.PL   2009-08-05 13:43:33.000000000 +0200
+++ new/aliased-0.31/Build.PL   2013-02-18 21:10:30.000000000 +0100
@@ -7,7 +7,8 @@
     license             => 'perl',
     dist_author         => 'Curtis "Ovid" Poe <[email protected]>',
     dist_version_from   => 'lib/aliased.pm',
-    requires => {
+    requires => {},
+    build_requires => {
         'Test::More' => 0,
     },
     add_to_cleanup      => [ 'aliased-*' ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/Changes new/aliased-0.31/Changes
--- old/aliased-0.30/Changes    2009-08-05 13:43:33.000000000 +0200
+++ new/aliased-0.31/Changes    2013-02-18 21:10:30.000000000 +0100
@@ -1,5 +1,13 @@
 Revision history for Perl extension aka.
 
+0.21  February 18, 2013
+      Bumped the number for a production release.
+
+0.30_01 January 3, 2010
+      Added prefix() function. [rt#48289]
+      Moved Test::More to build_requires [rt#48926]
+      Moved author tests to xt/author
+
 0.30  5 August, 2009
       Applied changes from Florian Ragwitz to ensure that we preserve the 
       name of the package the alias is defined in.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/MANIFEST new/aliased-0.31/MANIFEST
--- old/aliased-0.30/MANIFEST   2009-08-05 13:43:33.000000000 +0200
+++ new/aliased-0.31/MANIFEST   2013-02-18 21:10:30.000000000 +0100
@@ -5,9 +5,11 @@
 MANIFEST
 META.yml                       Module meta-data (added by MakeMaker)
 README
-t/10aliased.t
-t/20import.t
-t/30sigdie.t
+t/aliased.t
+t/import.t
+t/sigdie.t
+t/export.t
+t/prefix.t
 t/lib/HasSigDie.pm
 t/lib/BadSigDie.pm
 t/lib/NoSigDie.pm
@@ -15,5 +17,6 @@
 t/lib/Really/Long/Module/Name.pm
 t/lib/Really/Long/Name.pm
 t/lib/Really/Long/PackageName.pm
-t/pod-coverage.t
-t/pod.t
+xt/author/pod-coverage.t
+xt/author/pod.t
+META.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/META.json new/aliased-0.31/META.json
--- old/aliased-0.30/META.json  1970-01-01 01:00:00.000000000 +0100
+++ new/aliased-0.31/META.json  2013-02-18 21:10:30.000000000 +0100
@@ -0,0 +1,41 @@
+{
+   "abstract" : "Use shorter versions of class names.",
+   "author" : [
+      "Curtis \"Ovid\" Poe <[email protected]>"
+   ],
+   "dynamic_config" : 1,
+   "generated_by" : "Module::Build version 0.4003, CPAN::Meta::Converter 
version 2.120630",
+   "license" : [
+      "perl_5"
+   ],
+   "meta-spec" : {
+      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec";,
+      "version" : "2"
+   },
+   "name" : "aliased",
+   "prereqs" : {
+      "build" : {
+         "requires" : {
+            "Test::More" : "0"
+         }
+      },
+      "configure" : {
+         "requires" : {
+            "Module::Build" : "0.40"
+         }
+      }
+   },
+   "provides" : {
+      "aliased" : {
+         "file" : "lib/aliased.pm",
+         "version" : "0.31"
+      }
+   },
+   "release_status" : "stable",
+   "resources" : {
+      "license" : [
+         "http://dev.perl.org/licenses/";
+      ]
+   },
+   "version" : "0.31"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/META.yml new/aliased-0.31/META.yml
--- old/aliased-0.30/META.yml   2009-08-05 13:43:33.000000000 +0200
+++ new/aliased-0.31/META.yml   2013-02-18 21:10:30.000000000 +0100
@@ -1,19 +1,22 @@
 ---
-name: aliased
-version: 0.30
+abstract: 'Use shorter versions of class names.'
 author:
-  - 'Curtis "Ovid" Poe <[email protected]>'
-abstract: Use shorter versions of class names.
-license: perl
-resources:
-  license: ~
-requires:
+  - "Curtis \"Ovid\" Poe <[email protected]>"
+build_requires:
   Test::More: 0
+configure_requires:
+  Module::Build: 0.40
+dynamic_config: 1
+generated_by: 'Module::Build version 0.4003, CPAN::Meta::Converter version 
2.120630'
+license: perl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: aliased
 provides:
   aliased:
     file: lib/aliased.pm
-    version: 0.30
-generated_by: Module::Build version 0.32
-meta-spec:
-  url: http://module-build.sourceforge.net/META-spec-v1.2.html
-  version: 1.2
+    version: 0.31
+resources:
+  license: http://dev.perl.org/licenses/
+version: 0.31
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/Makefile.PL new/aliased-0.31/Makefile.PL
--- old/aliased-0.30/Makefile.PL        2009-08-05 13:43:33.000000000 +0200
+++ new/aliased-0.31/Makefile.PL        2013-02-18 21:10:30.000000000 +0100
@@ -1,13 +1,14 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.32
+# Note: this file was auto-generated by Module::Build::Compat version 0.4003
 use ExtUtils::MakeMaker;
 WriteMakefile
 (
-          'INSTALLDIRS' => 'site',
-          'NAME' => 'aliased',
-          'EXE_FILES' => [],
-          'VERSION_FROM' => 'lib/aliased.pm',
-          'PREREQ_PM' => {
-                           'Test::More' => 0
-                         }
-        )
+  'NAME' => 'aliased',
+  'VERSION_FROM' => 'lib/aliased.pm',
+  'PREREQ_PM' => {
+                   'Test::More' => 0
+                 },
+  'INSTALLDIRS' => 'site',
+  'EXE_FILES' => [],
+  'PL_FILES' => {}
+)
 ;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/lib/aliased.pm 
new/aliased-0.31/lib/aliased.pm
--- old/aliased-0.30/lib/aliased.pm     2009-08-05 13:43:33.000000000 +0200
+++ new/aliased-0.31/lib/aliased.pm     2013-02-18 21:10:30.000000000 +0100
@@ -1,12 +1,19 @@
 package aliased;
-$VERSION = '0.30';
+
+our $VERSION = '0.31';
+$VERSION = eval $VERSION;
 
 require Exporter;
 @ISA    = qw(Exporter);
-@EXPORT = qw(alias);
+@EXPORT = qw(alias prefix);
 
 use strict;
 
+sub _croak {
+    require Carp;
+    Carp::croak(@_);
+}
+
 sub import {
     my ( $class, $package, $alias, @import ) = @_;
 
@@ -16,7 +23,6 @@
     }
 
     my $callpack = caller(0);
-
     _load_alias( $package, $callpack, @import );
     _make_alias( $package, $callpack, $alias );
 }
@@ -32,8 +38,12 @@
 
     $alias ||= _get_alias($package);
 
+    my $destination = $alias =~ /::/
+      ? $alias
+      : "$callpack\::$alias";
+
     no strict 'refs';
-    *{ join q{::} => $callpack, $alias } = sub () { $package };
+    *{ $destination } = sub () { $package };
 }
 
 sub _load_alias {
@@ -50,7 +60,7 @@
         eval $code;
         if ( my $error = $@ ) {
             $SIG{__DIE__} = $sigdie;
-            die $error;
+            _croak($error);
         }
         $sigdie = $SIG{__DIE__}
           if defined $SIG{__DIE__};
@@ -58,15 +68,31 @@
 
     # Make sure a global $SIG{__DIE__} makes it out of the localization.
     $SIG{__DIE__} = $sigdie if defined $sigdie;
+    return $package;
 }
 
 sub alias {
     my ( $package, @import ) = @_;
 
     my $callpack = scalar caller(0);
-    _load_alias( $package, $callpack, @import );
+    return _load_alias( $package, $callpack, @import );
+}
 
-    return $package;
+sub prefix {
+    my ($class) = @_;
+    return sub {
+        my ($name) = @_;
+        my $callpack = caller(0);
+        if ( not @_ ) {
+            return _load_alias( $class, $callpack );
+        }
+        elsif ( @_ == 1 && defined $name ) {
+            return _load_alias( "${class}::$name", $callpack );
+        }
+        else {
+            _croak("Too many arguments to prefix('$class')");
+        }
+    };
 }
 
 1;
@@ -78,7 +104,7 @@
 
 =head1 VERSION
 
-0.30
+0.31
 
 =head1 SYNOPSIS
 
@@ -198,6 +224,10 @@
 
 =head2 alias()
 
+This function is only exported if you specify C<use aliased> with no import
+list.
+
+    use aliased;
     my $alias = alias($class);
     my $alias = alias($class, @imports);
 
@@ -230,6 +260,22 @@
 
 However, since OO classes rarely export this should not be necessary.
 
+=head2 prefix() (experimental)
+
+This function is only exported if you specify C<use aliased> with no import
+list.
+
+    use aliased;
+
+Sometimes you find you have a ton of packages in the same top-level namespace
+and you want to alias them, but only use them on demand.  For example:
+
+    # instead of:
+    MailVerwaltung::Client::Exception::REST::Response->throw()
+
+    my $error = prefix('MailVerwaltung::Client::Exception');
+    $error->('REST::Response')->throw();   # same as above
+    $error->()->throw; # same as MailVerwaltung::Client::Exception->throw
 
 =head2 Why OO Only?
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/t/10aliased.t 
new/aliased-0.31/t/10aliased.t
--- old/aliased-0.30/t/10aliased.t      2009-08-05 13:43:33.000000000 +0200
+++ new/aliased-0.31/t/10aliased.t      1970-01-01 01:00:00.000000000 +0100
@@ -1,48 +0,0 @@
-#!/usr/bin/perl -w
-use warnings;
-use strict;
-
-use Test::More tests => 16;
-
-#use Test::More qw/no_plan/;
-
-BEGIN {
-    chdir 't' if -d 't';
-    unshift @INC => '../lib', 'lib/';
-    require_ok 'aliased' or die;
-    ok !defined &main::echo,
-      '... and exported functions should not (yet) be in our namespace';
-}
-
-ok !defined &alias, 'aliased() should not be exported by default';
-eval "use aliased";
-is $@, '', '... trying to use aliased without a package name should not fail';
-can_ok __PACKAGE__, 'alias';
-
-eval "use aliased 'No::Such::Module'";
-ok $@,   'Trying to use aliased with a module it cannot load should fail';
-like $@, qr{Can't locate No/Such/Module.pm in \@INC},
-  '... and it should have an appropriate error message';
-
-use aliased 'Really::Long::Module::Name';
-my $name = Name->new;
-isa_ok $name, 'Really::Long::Module::Name', '... and the object it returns';
-
-use aliased 'Really::Long::Module::Conflicting::Name' => 'C::Name', "echo";
-ok defined &main::echo, '... and import items should be handled correctly';
-is_deeply [ echo( [ 1, 2 ], 3 ) ], [ [ 1, 2 ], 3 ],
-  '... and exhibit the correct behavior';
-ok $name = C::Name->new,
-'We should be able to alias to different packages, even though that is really 
stupid';
-isa_ok $name, 'Really::Long::Module::Conflicting::Name',
-  '... and the object returned';
-
-use aliased 'Really::Long::PackageName' => 'PackageName', qw/foo bar baz/;
-
-ok defined &PackageName,
-  'We should be able to pass an array ref as an import list';
-foreach my $method (qw/foo bar baz/) {
-    no strict 'refs';
-    is &$method, $method, '... and it should behave as expected';
-}
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/t/20import.t 
new/aliased-0.31/t/20import.t
--- old/aliased-0.30/t/20import.t       2009-08-05 13:43:33.000000000 +0200
+++ new/aliased-0.31/t/20import.t       1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-#!/usr/bin/perl -w
-use warnings;
-use strict;
-
-use Test::More tests => 5;
-#use Test::More qw/no_plan/;
-
-BEGIN {
-    chdir 't' if -d 't';
-    unshift @INC => '../lib', 'lib/';
-    use_ok 'aliased' or die "Could not use aliased";
-}
-ok defined &alias, 'alias() should be imported into our namespace';
-
-ok my $alias = alias("Really::Long::Name"),
-  'aliasing to a scalar should succeed';
-is $alias->thing(2), 4, '... and it should return the correct results';
-
-{
-
-    package Foo::Bar;
-    ::alias( "Really::Long::Module::Conflicting::Name", "echo" );
-    ::is_deeply [ echo("foo") ], ["foo"],
-      '... and it should still allow importing';
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/t/30sigdie.t 
new/aliased-0.31/t/30sigdie.t
--- old/aliased-0.30/t/30sigdie.t       2009-08-05 13:43:33.000000000 +0200
+++ new/aliased-0.31/t/30sigdie.t       1970-01-01 01:00:00.000000000 +0100
@@ -1,52 +0,0 @@
-#!/usr/bin/perl -w
-use warnings;
-use strict;
-
-use lib "t/lib";
-
-BEGIN {
-    # Ensure nothing else has loaded a $SIG{__DIE__}
-    die if $SIG{__DIE__};
-}
-
-# Test::Builder might have a $SIG{__DIE__}, too so we
-# make sure it is effected by any aliased bug, too.
-use aliased "Test::More";
-use aliased "HasSigDie";
-
-plan(tests => 9);
-
-is ref $SIG{__DIE__}, "CODE",
-  '$SIG{__DIE__} handlers should not be destroyed';
-
-is $SIG{__DIE__}->(), 'whee!',
-  '... and should behave as expected';
-
-eval "use aliased 'BadSigDie'";
-is ref $SIG{__DIE__}, "CODE",
-  'A bad load should not break $SIG{__DIE__} handlers';
-
-is $SIG{__DIE__}->(), 'whee!',
-  '... and they should retain their value';
-
-eval "use aliased 'NoSigDie'";
-is ref $SIG{__DIE__}, "CODE",
-  'Loading code without sigdie handlers should succeed';
-
-is $SIG{__DIE__}->(), 'whee!',
-  '... and the sigdie handlers should retain their value';
-
-{
-    local $SIG{__DIE__};
-    delete $INC{'NoSigDie.pm'};
-    eval "use aliased 'NoSigDie' => 'NoSigDie2'";
-    ok ! ref $SIG{__DIE__},
-      'Loading code without sigdie handlers should succeed';
-    delete $INC{'HasSigDie.pm'};
-    eval "use aliased 'HasSigDie' => 'HasSigDie2'";
-    is ref $SIG{__DIE__}, "CODE",
-      'New $SIG{__DIE__} handlers should be loaded';
-
-    is $SIG{__DIE__}->(), 'whee!',
-      '... and should behave as expected';
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/t/aliased.t new/aliased-0.31/t/aliased.t
--- old/aliased-0.30/t/aliased.t        1970-01-01 01:00:00.000000000 +0100
+++ new/aliased-0.31/t/aliased.t        2013-02-18 21:10:30.000000000 +0100
@@ -0,0 +1,58 @@
+#!/usr/bin/perl -w
+use warnings;
+use strict;
+
+use Test::More tests => 18;
+
+BEGIN {
+    chdir 't' if -d 't';
+    unshift @INC => '../lib', 'lib/';
+    require_ok 'aliased' or die;
+    ok !defined &main::echo,
+      '... and exported functions should not (yet) be in our namespace';
+}
+
+ok !defined &alias, 'aliased() should not be exported by default';
+eval "use aliased";
+is $@, '', '... trying to use aliased without a package name should not fail';
+can_ok __PACKAGE__, 'alias';
+
+eval "use aliased 'No::Such::Module'";
+ok $@,   'Trying to use aliased with a module it cannot load should fail';
+like $@, qr{Can't locate No/Such/Module.pm in \@INC},
+  '... and it should have an appropriate error message';
+
+use aliased 'Really::Long::Module::Name';
+my $name = Name->new;
+isa_ok $name, 'Really::Long::Module::Name', '... and the object it returns';
+
+use aliased 'Really::Long::Module::Conflicting::Name' => 'C::Name', "echo";
+ok defined &main::echo, '... and import items should be handled correctly';
+is_deeply [ echo( [ 1, 2 ], 3 ) ], [ [ 1, 2 ], 3 ],
+  '... and exhibit the correct behavior';
+ok $name = C::Name->new,
+'We should be able to alias to different packages, even though that is really 
stupid';
+isa_ok $name, 'Really::Long::Module::Conflicting::Name',
+  '... and the object returned';
+
+use aliased 'Really::Long::PackageName' => 'PackageName', qw/foo bar baz/;
+
+ok defined &PackageName,
+  'We should be able to pass an array ref as an import list';
+foreach my $method (qw/foo bar baz/) {
+    no strict 'refs';
+    is &$method, $method, '... and it should behave as expected';
+}
+
+{
+  package My::Package;
+  use Test::More;
+
+  use aliased 'Really::Long::Module::Name';
+  my $name = Name->new;
+  isa_ok $name, 'Really::Long::Module::Name', '... a short alias works in a 
package';
+
+  use aliased 'Really::Long::Module::Name' => 'A::Name';
+  $name = A::Name->new;
+  isa_ok $name, 'Really::Long::Module::Name', '... a long alias works in a 
package';
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/t/export.t new/aliased-0.31/t/export.t
--- old/aliased-0.30/t/export.t 1970-01-01 01:00:00.000000000 +0100
+++ new/aliased-0.31/t/export.t 2013-02-18 21:10:30.000000000 +0100
@@ -0,0 +1,14 @@
+#!/usr/bin/perl -w
+use warnings;
+use strict;
+
+use Test::More;
+use B;
+use lib "t/lib";
+
+use aliased 'Really::Long::Module::Name';
+
+my $cv = B::svref_2object(\&Name);
+is($cv->GV->STASH->NAME, 'aliased', 'installed symbol was compiled in the 
aliased package');
+
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/t/import.t new/aliased-0.31/t/import.t
--- old/aliased-0.30/t/import.t 1970-01-01 01:00:00.000000000 +0100
+++ new/aliased-0.31/t/import.t 2013-02-18 21:10:30.000000000 +0100
@@ -0,0 +1,25 @@
+#!/usr/bin/perl -w
+use warnings;
+use strict;
+
+use Test::More tests => 5;
+#use Test::More qw/no_plan/;
+
+BEGIN {
+    chdir 't' if -d 't';
+    unshift @INC => '../lib', 'lib/';
+    use_ok 'aliased' or die "Could not use aliased";
+}
+ok defined &alias, 'alias() should be imported into our namespace';
+
+ok my $alias = alias("Really::Long::Name"),
+  'aliasing to a scalar should succeed';
+is $alias->thing(2), 4, '... and it should return the correct results';
+
+{
+
+    package Foo::Bar;
+    ::alias( "Really::Long::Module::Conflicting::Name", "echo" );
+    ::is_deeply [ echo("foo") ], ["foo"],
+      '... and it should still allow importing';
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/t/pod-coverage.t 
new/aliased-0.31/t/pod-coverage.t
--- old/aliased-0.30/t/pod-coverage.t   2009-08-05 13:43:33.000000000 +0200
+++ new/aliased-0.31/t/pod-coverage.t   1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-#!perl -T
-
-use Test::More;
-eval "use Test::Pod::Coverage 1.04";
-plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" 
if $@;
-all_pod_coverage_ok();
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/t/pod.t new/aliased-0.31/t/pod.t
--- old/aliased-0.30/t/pod.t    2009-08-05 13:43:33.000000000 +0200
+++ new/aliased-0.31/t/pod.t    1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-#!perl -T
-
-use Test::More;
-eval "use Test::Pod 1.14";
-plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
-all_pod_files_ok();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/t/prefix.t new/aliased-0.31/t/prefix.t
--- old/aliased-0.30/t/prefix.t 1970-01-01 01:00:00.000000000 +0100
+++ new/aliased-0.31/t/prefix.t 2013-02-18 21:10:30.000000000 +0100
@@ -0,0 +1,26 @@
+#!/usr/bin/perl -w
+use warnings;
+use strict;
+
+use Test::More tests => 6;
+use aliased;
+
+ok defined &prefix, 'prefix() should be in our namespace if we ask for it';
+ok defined &alias,  'alias() should be in our namespace if we ask for it';
+
+{
+    package Foo;
+    sub checkit { 'foo checkit' }
+}
+{
+    package Foo::Bar;
+    sub checkit { 'foobar checkit' }
+}
+BEGIN {
+    @INC{qw<Foo.pm Foo/Bar.pm>} = (1,1);
+}
+ok my $foo = prefix('Foo'), 'Calling prefix should succeed';
+is ref $foo, 'CODE', '... returning a code ref';
+is $foo->()->checkit, 'foo checkit', '... and called directly, returns the 
correct class';
+is $foo->('Bar')->checkit, 'foobar checkit',
+    '... and if called with a subpackage name, should also return the correct 
class';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/t/sigdie.t new/aliased-0.31/t/sigdie.t
--- old/aliased-0.30/t/sigdie.t 1970-01-01 01:00:00.000000000 +0100
+++ new/aliased-0.31/t/sigdie.t 2013-02-18 21:10:30.000000000 +0100
@@ -0,0 +1,52 @@
+#!/usr/bin/perl -w
+use warnings;
+use strict;
+
+use lib "t/lib";
+
+BEGIN {
+    # Ensure nothing else has loaded a $SIG{__DIE__}
+    die if $SIG{__DIE__};
+}
+
+# Test::Builder might have a $SIG{__DIE__}, too so we
+# make sure it is effected by any aliased bug, too.
+use aliased "Test::More";
+use aliased "HasSigDie";
+
+plan(tests => 9);
+
+is ref $SIG{__DIE__}, "CODE",
+  '$SIG{__DIE__} handlers should not be destroyed';
+
+is $SIG{__DIE__}->(), 'whee!',
+  '... and should behave as expected';
+
+eval "use aliased 'BadSigDie'";
+is ref $SIG{__DIE__}, "CODE",
+  'A bad load should not break $SIG{__DIE__} handlers';
+
+is $SIG{__DIE__}->(), 'whee!',
+  '... and they should retain their value';
+
+eval "use aliased 'NoSigDie'";
+is ref $SIG{__DIE__}, "CODE",
+  'Loading code without sigdie handlers should succeed';
+
+is $SIG{__DIE__}->(), 'whee!',
+  '... and the sigdie handlers should retain their value';
+
+{
+    local $SIG{__DIE__};
+    delete $INC{'NoSigDie.pm'};
+    eval "use aliased 'NoSigDie' => 'NoSigDie2'";
+    ok ! ref $SIG{__DIE__},
+      'Loading code without sigdie handlers should succeed';
+    delete $INC{'HasSigDie.pm'};
+    eval "use aliased 'HasSigDie' => 'HasSigDie2'";
+    is ref $SIG{__DIE__}, "CODE",
+      'New $SIG{__DIE__} handlers should be loaded';
+
+    is $SIG{__DIE__}->(), 'whee!',
+      '... and should behave as expected';
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/xt/author/pod-coverage.t 
new/aliased-0.31/xt/author/pod-coverage.t
--- old/aliased-0.30/xt/author/pod-coverage.t   1970-01-01 01:00:00.000000000 
+0100
+++ new/aliased-0.31/xt/author/pod-coverage.t   2013-02-18 21:10:30.000000000 
+0100
@@ -0,0 +1,7 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" 
if $@;
+all_pod_coverage_ok();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aliased-0.30/xt/author/pod.t 
new/aliased-0.31/xt/author/pod.t
--- old/aliased-0.30/xt/author/pod.t    1970-01-01 01:00:00.000000000 +0100
+++ new/aliased-0.31/xt/author/pod.t    2013-02-18 21:10:30.000000000 +0100
@@ -0,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+all_pod_files_ok();

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to