diff options
-rwxr-xr-x | Porting/Maintainers.pl | 2 | ||||
-rw-r--r-- | cpan/Object-Accessor/lib/Object/Accessor.pm | 16 |
2 files changed, 8 insertions, 10 deletions
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index ba8488bac1..8d6bd6dd96 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1318,7 +1318,7 @@ use File::Glob qw(:case); 'Object::Accessor' => { 'MAINTAINER' => 'kane', - 'DISTRIBUTION' => 'BINGOS/Object-Accessor-0.42.tar.gz', + 'DISTRIBUTION' => 'BINGOS/Object-Accessor-0.44.tar.gz', 'FILES' => q[cpan/Object-Accessor], 'UPSTREAM' => 'cpan', }, diff --git a/cpan/Object-Accessor/lib/Object/Accessor.pm b/cpan/Object-Accessor/lib/Object/Accessor.pm index edee181d07..106e70e762 100644 --- a/cpan/Object-Accessor/lib/Object/Accessor.pm +++ b/cpan/Object-Accessor/lib/Object/Accessor.pm @@ -4,13 +4,12 @@ use strict; use Carp qw[carp croak]; use vars qw[$FATAL $DEBUG $AUTOLOAD $VERSION]; use Params::Check qw[allow]; -use Data::Dumper; ### some objects might have overload enabled, we'll need to ### disable string overloading for callbacks require overload; -$VERSION = '0.42'; +$VERSION = '0.44'; $FATAL = 0; $DEBUG = 0; @@ -430,19 +429,20 @@ sub can { my($self, $method) = @_; ### it's one of our regular methods - if( $self->UNIVERSAL::can($method) ) { - __PACKAGE__->___debug( "Can '$method' -- provided by package" ); - return $self->UNIVERSAL::can($method); + my $code = $self->UNIVERSAL::can($method); + if( $code ) { + carp( "Can '$method' -- provided by package" ) if $DEBUG; + return $code; } ### it's an accessor we provide; if( UNIVERSAL::isa( $self, 'HASH' ) and exists $self->{$method} ) { - __PACKAGE__->___debug( "Can '$method' -- provided by object" ); + carp( "Can '$method' -- provided by object" ) if $DEBUG; return sub { $self->$method(@_); } } ### we don't support it - __PACKAGE__->___debug( "Cannot '$method'" ); + carp( "Cannot '$method'" ) if $DEBUG; return; } @@ -611,7 +611,6 @@ sub ___debug { my $self = shift; my $msg = shift; - my $lvl = shift || 0; local $Carp::CarpLevel += 1; @@ -741,7 +740,6 @@ See C<perldoc perlsub> for details. ### standard tie class for bound attributes { package Object::Accessor::TIE; use Tie::Scalar; - use Data::Dumper; use base 'Tie::StdScalar'; my %local = (); |