r50446 - in /branches/upstream/libaspect-perl/current: ./ lib/ lib/Aspect/ lib/Aspect/Advice/ lib/Aspect/Library/ lib/Aspect/Library/Listenable/ lib/Aspect/Pointcut/ t/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Thu Jan 7 10:36:39 UTC 2010
Author: gregoa
Date: Thu Jan 7 10:35:01 2010
New Revision: 50446
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=50446
Log:
[svn-upgrade] Integrating new upstream version, libaspect-perl (0.32)
Modified:
branches/upstream/libaspect-perl/current/Changes
branches/upstream/libaspect-perl/current/META.yml
branches/upstream/libaspect-perl/current/README
branches/upstream/libaspect-perl/current/lib/Aspect.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Advice.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Advice/After.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Advice/Around.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Advice/Before.pm
branches/upstream/libaspect-perl/current/lib/Aspect/AdviceContext.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Library/Listenable.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Library/Listenable/Event.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Library/Singleton.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Library/Wormhole.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Modular.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/AndOp.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/Call.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/Cflow.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/NotOp.pm
branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/OrOp.pm
branches/upstream/libaspect-perl/current/t/singleton.t
Modified: branches/upstream/libaspect-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/Changes?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/Changes (original)
+++ branches/upstream/libaspect-perl/current/Changes Thu Jan 7 10:35:01 2010
@@ -1,4 +1,8 @@
Revision history for Perl extension Aspect
+
+0.32 Thu 7 Jan 2010 - Adam Kennedy
+ - The actual term "forever" is meaningless. Reversed the flag to
+ be used as "lexical" instead.
0.31 Thu 7 Jan 2010 - Adam Kennedy
- Removed the loading of Aspect::Library::Memoize and
Modified: branches/upstream/libaspect-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/META.yml?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/META.yml (original)
+++ branches/upstream/libaspect-perl/current/META.yml Thu Jan 7 10:35:01 2010
@@ -32,4 +32,4 @@
ChangeLog: http://fisheye2.atlassian.com/changelog/cpan/trunk/Aspect
license: http://dev.perl.org/licenses/
repository: http://svn.ali.as/cpan/trunk/Aspect
-version: 0.31
+version: 0.32
Modified: branches/upstream/libaspect-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/README?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/README (original)
+++ branches/upstream/libaspect-perl/current/README Thu Jan 7 10:35:01 2010
@@ -32,7 +32,7 @@
print "g/set will soon be called";
} $pointcut;
- # Advice will live forever, because it is created in void context
+ # Advice will live lexical, because it is created in void context
after {
print "g/set has just been called";
} $pointcut;
Modified: branches/upstream/libaspect-perl/current/lib/Aspect.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect.pm Thu Jan 7 10:35:01 2010
@@ -29,7 +29,7 @@
use Aspect::Pointcut::OrOp ();
use Aspect::Pointcut::NotOp ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
our @ISA = 'Exporter';
our @EXPORT = qw{ aspect around before after call cflow };
@@ -46,7 +46,7 @@
sub aspect {
my $class = _LOAD('Aspect::Library::' . shift);
my $aspect = $class->new(
- forever => ! defined wantarray,
+ lexical => defined wantarray,
params => [ @_ ],
);
@@ -60,7 +60,7 @@
Aspect::Advice::Around->new(
code => $_[0],
pointcut => $_[1],
- forever => ! defined wantarray,
+ lexical => defined wantarray,
);
}
@@ -68,7 +68,7 @@
Aspect::Advice::Before->new(
code => $_[0],
pointcut => $_[1],
- forever => ! defined wantarray,
+ lexical => defined wantarray,
);
}
@@ -76,7 +76,7 @@
Aspect::Advice::After->new(
code => $_[0],
pointcut => $_[1],
- forever => ! defined wantarray,
+ lexical => defined wantarray,
);
}
@@ -147,7 +147,7 @@
print "g/set will soon be called";
} $pointcut;
- # Advice will live forever, because it is created in void context
+ # Advice will live lexical, because it is created in void context
after {
print "g/set has just been called";
} $pointcut;
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Advice.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Advice.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Advice.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Advice.pm Thu Jan 7 10:35:01 2010
@@ -3,7 +3,7 @@
use strict;
use warnings;
-our $VERSION = '0.31';
+our $VERSION = '0.32';
sub new {
my $class = shift;
@@ -23,8 +23,8 @@
$_[0]->{pointcut};
}
-sub forever {
- $_[0]->{forever};
+sub lexical {
+ $_[0]->{lexical};
}
sub DESTROY {
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Advice/After.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Advice/After.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Advice/After.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Advice/After.pm Thu Jan 7 10:35:01 2010
@@ -11,7 +11,7 @@
use Aspect::Advice ();
use Aspect::AdviceContext ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
our @ISA = 'Aspect::Advice';
# NOTE: To simplify debugging of the generated code, all injected string
@@ -21,7 +21,7 @@
my $self = shift;
my $pointcut = $self->pointcut;
my $code = $self->code;
- my $forever = $self->forever;
+ my $lexical = $self->lexical;
# Get the curried version of the pointcut we will use for the
# runtime checks instead of the original.
@@ -38,10 +38,10 @@
# past the hook as quickely as possible.
# This flag is shared between all the generated hooks for each
# installed Aspect.
- # If the advice is going to last forever then we don't need to
+ # If the advice is going to last lexical then we don't need to
# check or use the $out_of_scope variable.
- my $out_of_scope = undef;
- my $MATCH_DISABLED = $forever ? '0' : '$out_of_scope';
+ my $out_of_scope = undef;
+ my $MATCH_DISABLED = $lexical ? '$out_of_scope' : '0';
# Find all pointcuts that are statically matched
# wrap the method with advice code and install the wrapper
@@ -147,8 +147,8 @@
END_PERL
}
- # If this will run forever we don't need a descoping hook
- return if $forever;
+ # If this will run lexical we don't need a descoping hook
+ return unless $lexical;
# Return the lexical descoping hook.
# This MUST be stored and run at DESTROY-time by the
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Advice/Around.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Advice/Around.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Advice/Around.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Advice/Around.pm Thu Jan 7 10:35:01 2010
@@ -10,14 +10,14 @@
use Aspect::Advice ();
use Aspect::AdviceContext ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
our @ISA = 'Aspect::Advice';
sub _install {
my $self = shift;
my $pointcut = $self->pointcut;
my $code = $self->code;
- my $forever = $self->forever;
+ my $lexical = $self->lexical;
# Get the curried version of the pointcut we will use for the
# runtime checks instead of the original.
@@ -34,10 +34,10 @@
# past the hook as quickely as possible.
# This flag is shared between all the generated hooks for each
# installed Aspect.
- # If the advice is going to last forever then we don't need to
+ # If the advice is going to last lexical then we don't need to
# check or use the $out_of_scope variable.
my $out_of_scope = undef;
- my $MATCH_DISABLED = $forever ? '0' : '$out_of_scope';
+ my $MATCH_DISABLED = $lexical ? '$out_of_scope' : '0';
# Find all pointcuts that are statically matched
# wrap the method with advice code and install the wrapper
@@ -105,8 +105,8 @@
END_PERL
}
- # If this will run forever we don't need a descoping hook
- return if $forever;
+ # If this will run lexical we don't need a descoping hook
+ return unless $lexical;
# Return the lexical descoping hook.
# This MUST be stored and run at DESTROY-time by the
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Advice/Before.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Advice/Before.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Advice/Before.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Advice/Before.pm Thu Jan 7 10:35:01 2010
@@ -10,14 +10,14 @@
use Aspect::Advice ();
use Aspect::AdviceContext ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
our @ISA = 'Aspect::Advice';
sub _install {
my $self = shift;
my $pointcut = $self->pointcut;
my $code = $self->code;
- my $forever = $self->forever;
+ my $lexical = $self->lexical;
# Get the curried version of the pointcut we will use for the
# runtime checks instead of the original.
@@ -34,10 +34,10 @@
# past the hook as quickely as possible.
# This flag is shared between all the generated hooks for each
# installed Aspect.
- # If the advice is going to last forever then we don't need to
+ # If the advice is going to last lexical then we don't need to
# check or use the $out_of_scope variable.
my $out_of_scope = undef;
- my $MATCH_DISABLED = $forever ? '0' : '$out_of_scope';
+ my $MATCH_DISABLED = $lexical ? '$out_of_scope' : '0';
# Find all pointcuts that are statically matched
# wrap the method with advice code and install the wrapper
@@ -117,8 +117,8 @@
END_PERL
}
- # If this will run forever we don't need a descoping hook
- return if $forever;
+ # If this will run lexical we don't need a descoping hook
+ return unless $lexical;
# Return the lexical descoping hook.
# This MUST be stored and run at DESTROY-time by the
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/AdviceContext.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/AdviceContext.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/AdviceContext.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/AdviceContext.pm Thu Jan 7 10:35:01 2010
@@ -4,7 +4,7 @@
use warnings;
use Carp ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Library/Listenable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Library/Listenable.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Library/Listenable.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Library/Listenable.pm Thu Jan 7 10:35:01 2010
@@ -12,14 +12,14 @@
use Aspect::Advice::Before ();
use Aspect::Library::Listenable::Event ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
our @ISA = qw{ Aspect::Modular Exporter };
our @EXPORT = qw{ add_listener remove_listener };
sub get_advice {
my ($self, $event_name, $pointcut, %event_params) = @_;
Aspect::Advice::Before->new(
- forever => $self->forever,
+ lexical => $self->lexical,
pointcut => $pointcut,
code => sub {
local $_;
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Library/Listenable/Event.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Library/Listenable/Event.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Library/Listenable/Event.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Library/Listenable/Event.pm Thu Jan 7 10:35:01 2010
@@ -3,7 +3,7 @@
use strict;
use warnings;
-our $VERSION = '0.31';
+our $VERSION = '0.32';
sub new {
my $class = shift;
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Library/Singleton.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Library/Singleton.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Library/Singleton.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Library/Singleton.pm Thu Jan 7 10:35:01 2010
@@ -6,7 +6,7 @@
use Aspect::Advice::Before ();
use Aspect::Pointcut::Call ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
our @ISA = 'Aspect::Modular';
my %CACHE = ();
@@ -14,7 +14,7 @@
sub get_advice {
my $self = shift;
Aspect::Advice::Before->new(
- forever => $self->forever,
+ lexical => $self->lexical,
pointcut => Aspect::Pointcut::Call->new($_[0]),
code => sub {
my $context = shift;
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Library/Wormhole.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Library/Wormhole.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Library/Wormhole.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Library/Wormhole.pm Thu Jan 7 10:35:01 2010
@@ -8,13 +8,13 @@
use Aspect::Pointcut::Cflow ();
use Aspect::Pointcut::AndOp ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
our @ISA = 'Aspect::Modular';
sub get_advice {
my $self = shift;
Aspect::Advice::Before->new(
- forever => $self->forever,
+ lexical => $self->lexical,
pointcut => Aspect::Pointcut::AndOp->new(
Aspect::Pointcut::Call->new( $_[1] ),
Aspect::Pointcut::Cflow->new( source => $_[0] ),
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Modular.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Modular.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Modular.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Modular.pm Thu Jan 7 10:35:01 2010
@@ -3,7 +3,7 @@
use strict;
use warnings;
-our $VERSION = '0.31';
+our $VERSION = '0.32';
sub new {
my $class = shift;
@@ -16,12 +16,12 @@
# Warn if the aspect is supposed to be permanent,
# but the advice isn't created as permanent.
- if ( $self->forever ) {
- if ( grep { not $_->forever } @{$self->{advice}} ) {
+ if ( $self->lexical ) {
+ if ( grep { not $_->lexical } @{$self->{advice}} ) {
warn("$class creates lexical advice for global aspects");
}
} else {
- if ( grep { $_->forever } @{$self->{advice}} ) {
+ if ( grep { $_->lexical } @{$self->{advice}} ) {
warn("$class creates global advice for lexical aspects");
}
}
@@ -33,8 +33,8 @@
@{$_[0]->{params}};
}
-sub forever {
- $_[0]->{forever};
+sub lexical {
+ $_[0]->{lexical};
}
sub get_advice {
@@ -65,7 +65,7 @@
my $self = shift;
my $pointcut = shift;
return Aspect::Advice::After->new(
- forever => $self->forever,
+ lexical => $self->lexical,
pointcut => $pointcut,
code => sub {
print 'Created object: ' . shift->return_value . "\n";
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut.pm Thu Jan 7 10:35:01 2010
@@ -7,7 +7,7 @@
use Aspect::Pointcut::AndOp ();
use Aspect::Pointcut::NotOp ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
use overload (
# Keep traditional boolification and stringification
@@ -73,7 +73,7 @@
foreach my $package ( Devel::Symdump->rnew->packages, 'main' ) {
next if $UNTOUCHABLE{$package};
- next if $package =~ /^Aspect::/;
+ next if $package =~ /^Aspect\b/;
foreach my $name ( Devel::Symdump->new($package)->functions ) {
# TODO: Need to filter Aspect exportable functions!
push @matches, $name if $self->match_define($name);
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/AndOp.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/AndOp.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/AndOp.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/AndOp.pm Thu Jan 7 10:35:01 2010
@@ -4,7 +4,7 @@
use warnings;
use Aspect::Pointcut ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
our @ISA = 'Aspect::Pointcut';
sub new {
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/Call.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/Call.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/Call.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/Call.pm Thu Jan 7 10:35:01 2010
@@ -5,7 +5,7 @@
use Carp;
use Aspect::Pointcut ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
our @ISA = 'Aspect::Pointcut';
sub new {
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/Cflow.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/Cflow.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/Cflow.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/Cflow.pm Thu Jan 7 10:35:01 2010
@@ -6,7 +6,7 @@
use Aspect::Pointcut ();
use Aspect::AdviceContext ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
our @ISA = 'Aspect::Pointcut';
sub new {
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/NotOp.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/NotOp.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/NotOp.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/NotOp.pm Thu Jan 7 10:35:01 2010
@@ -4,7 +4,7 @@
use warnings;
use Aspect::Pointcut ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
our @ISA = 'Aspect::Pointcut';
sub new {
Modified: branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/OrOp.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/OrOp.pm?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/OrOp.pm (original)
+++ branches/upstream/libaspect-perl/current/lib/Aspect/Pointcut/OrOp.pm Thu Jan 7 10:35:01 2010
@@ -4,7 +4,7 @@
use warnings;
use Aspect::Pointcut ();
-our $VERSION = '0.31';
+our $VERSION = '0.32';
our @ISA = 'Aspect::Pointcut';
sub new {
Modified: branches/upstream/libaspect-perl/current/t/singleton.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaspect-perl/current/t/singleton.t?rev=50446&op=diff
==============================================================================
--- branches/upstream/libaspect-perl/current/t/singleton.t (original)
+++ branches/upstream/libaspect-perl/current/t/singleton.t Thu Jan 7 10:35:01 2010
@@ -14,7 +14,7 @@
my $foo1 = Foo->new;
my $foo2 = Foo->new;
-is( ref($foo1), ref($foo2), 'there can only be one' );
+is( "$foo1", "$foo2", 'there can only be one' );
# Create a lexical singleton to ensure it handles global vs lexical properly
SCOPE: {
More information about the Pkg-perl-cvs-commits
mailing list