r36007 - in /trunk/libnamespace-autoclean-perl: Changes MANIFEST META.yml Makefile.PL README debian/changelog dist.ini lib/namespace/autoclean.pm t/cleanee.t
ryan52-guest at users.alioth.debian.org
ryan52-guest at users.alioth.debian.org
Thu May 21 00:18:18 UTC 2009
Author: ryan52-guest
Date: Thu May 21 00:18:12 2009
New Revision: 36007
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=36007
Log:
New upstream release
Added:
trunk/libnamespace-autoclean-perl/t/cleanee.t
- copied unchanged from r36006, branches/upstream/libnamespace-autoclean-perl/current/t/cleanee.t
Modified:
trunk/libnamespace-autoclean-perl/Changes
trunk/libnamespace-autoclean-perl/MANIFEST
trunk/libnamespace-autoclean-perl/META.yml
trunk/libnamespace-autoclean-perl/Makefile.PL
trunk/libnamespace-autoclean-perl/README
trunk/libnamespace-autoclean-perl/debian/changelog
trunk/libnamespace-autoclean-perl/dist.ini
trunk/libnamespace-autoclean-perl/lib/namespace/autoclean.pm
Modified: trunk/libnamespace-autoclean-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnamespace-autoclean-perl/Changes?rev=36007&op=diff
==============================================================================
--- trunk/libnamespace-autoclean-perl/Changes (original)
+++ trunk/libnamespace-autoclean-perl/Changes Thu May 21 00:18:12 2009
@@ -1,3 +1,6 @@
+0.06 Wed, 20 May 2009 15:14:36 +0200
+ * Allow selection of explicit cleanee (Shawn M Moore).
+
0.05 Fri, 01 May 2009 12:44:25 +0200
* Don't clean the 'meta' method for Moose roles, even if it's not
included in get_method_list.
Modified: trunk/libnamespace-autoclean-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnamespace-autoclean-perl/MANIFEST?rev=36007&op=diff
==============================================================================
--- trunk/libnamespace-autoclean-perl/MANIFEST (original)
+++ trunk/libnamespace-autoclean-perl/MANIFEST Thu May 21 00:18:12 2009
@@ -8,4 +8,5 @@
lib/namespace/autoclean.pm
t/also.t
t/basic.t
+t/cleanee.t
t/role.t
Modified: trunk/libnamespace-autoclean-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnamespace-autoclean-perl/META.yml?rev=36007&op=diff
==============================================================================
--- trunk/libnamespace-autoclean-perl/META.yml (original)
+++ trunk/libnamespace-autoclean-perl/META.yml Thu May 21 00:18:12 2009
@@ -2,11 +2,11 @@
abstract: Keep imports out of your namespace
author:
- Florian Ragwitz <rafl at debian.org>
-generated_by: Dist::Zilla::Plugin::MetaYaml version 1.007
+generated_by: Dist::Zilla::Plugin::MetaYaml version 1.091260
license: perl
name: namespace-autoclean
requires:
B::Hooks::EndOfScope: '0.07'
Class::MOP: '0.80'
namespace::clean: '0.11'
-version: '0.05'
+version: '0.06'
Modified: trunk/libnamespace-autoclean-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnamespace-autoclean-perl/Makefile.PL?rev=36007&op=diff
==============================================================================
--- trunk/libnamespace-autoclean-perl/Makefile.PL (original)
+++ trunk/libnamespace-autoclean-perl/Makefile.PL Thu May 21 00:18:12 2009
@@ -9,7 +9,7 @@
NAME => 'namespace::autoclean',
AUTHOR => 'Florian\ Ragwitz\ \<rafl\@debian\.org\>',
ABSTRACT => 'Keep imports out of your namespace',
- VERSION => '0.05',
+ VERSION => '0.06',
EXE_FILES => [ qw() ],
(eval { ExtUtils::MakeMaker->VERSION(6.21) } ? (LICENSE => 'perl') : ()),
PREREQ_PM => {
Modified: trunk/libnamespace-autoclean-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnamespace-autoclean-perl/README?rev=36007&op=diff
==============================================================================
--- trunk/libnamespace-autoclean-perl/README (original)
+++ trunk/libnamespace-autoclean-perl/README Thu May 21 00:18:12 2009
@@ -1,7 +1,7 @@
This archive contains the distribution namespace-autoclean, version
-0.05:
+0.06:
Keep imports out of your namespace
Modified: trunk/libnamespace-autoclean-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnamespace-autoclean-perl/debian/changelog?rev=36007&op=diff
==============================================================================
--- trunk/libnamespace-autoclean-perl/debian/changelog (original)
+++ trunk/libnamespace-autoclean-perl/debian/changelog Thu May 21 00:18:12 2009
@@ -1,3 +1,9 @@
+libnamespace-autoclean-perl (0.06-1) UNRELEASED; urgency=low
+
+ * New upstream release
+
+ -- Ryan Niebur <ryanryan52 at gmail.com> Wed, 20 May 2009 17:18:04 -0700
+
libnamespace-autoclean-perl (0.05-1) unstable; urgency=low
* Initial Release. (Closes: #529242)
Modified: trunk/libnamespace-autoclean-perl/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnamespace-autoclean-perl/dist.ini?rev=36007&op=diff
==============================================================================
--- trunk/libnamespace-autoclean-perl/dist.ini (original)
+++ trunk/libnamespace-autoclean-perl/dist.ini Thu May 21 00:18:12 2009
@@ -1,5 +1,5 @@
name = namespace-autoclean
-version = 0.05
+version = 0.06
author = Florian Ragwitz <rafl at debian.org>
license = Perl_5
copyright_holder = Florian Ragwitz
Modified: trunk/libnamespace-autoclean-perl/lib/namespace/autoclean.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnamespace-autoclean-perl/lib/namespace/autoclean.pm?rev=36007&op=diff
==============================================================================
--- trunk/libnamespace-autoclean-perl/lib/namespace/autoclean.pm (original)
+++ trunk/libnamespace-autoclean-perl/lib/namespace/autoclean.pm Thu May 21 00:18:12 2009
@@ -2,7 +2,7 @@
use warnings;
package namespace::autoclean;
-our $VERSION = '0.05';
+our $VERSION = '0.06';
# ABSTRACT: Keep imports out of your namespace
@@ -13,15 +13,17 @@
sub import {
my ($class, %args) = @_;
- my $caller = caller();
+
+ my $cleanee = exists $args{-cleanee} ? $args{-cleanee} : scalar caller;
+
my @also = exists $args{-also}
? (ref $args{-also} eq 'ARRAY' ? @{ $args{-also} } : $args{-also})
: ();
on_scope_end {
- my $meta = Class::MOP::class_of($caller) || Class::MOP::Class->initialize($caller);
+ my $meta = Class::MOP::class_of($cleanee) || Class::MOP::Class->initialize($cleanee);
my %methods = map { ($_ => 1) } keys %{$meta->get_method_map};
my @symbols = keys %{ $meta->get_all_package_symbols('CODE') };
- namespace::clean->clean_subroutines($caller, @also, grep { !$methods{$_} } @symbols);
+ namespace::clean->clean_subroutines($cleanee, @also, grep { !$methods{$_} } @symbols);
};
}
@@ -34,7 +36,7 @@
=head1 VERSION
-version 0.05
+version 0.06
=head1 SYNOPSIS
@@ -74,6 +76,20 @@
use namespace::autoclean -also => 'some_function';
+If you're writing an exporter and you want to clean up after yourself (and your
+peers), you can use the C<-cleanee> switch to specify what package to clean:
+
+ package My::MooseX::namespace::autoclean;
+ use strict;
+
+ use namespace::autocleanclean (); # no cleanup, just load
+
+ sub import {
+ namespace::autoclean->import(
+ -cleanee => scalar(caller),
+ );
+ }
+
=head1 AUTHOR
Florian Ragwitz <rafl at debian.org>
More information about the Pkg-perl-cvs-commits
mailing list