Permalink
Browse files

deal with Package::Stash changing its API

  • Loading branch information...
1 parent 0bfb836 commit 176b6297dd8ba93b941c1858fc8a5f22479883a1 @scrottie scrottie committed Jan 7, 2014
Showing with 9 additions and 9 deletions.
  1. +3 −3 lib/WebGUI/Deprecate.pm
  2. +5 −5 lib/WebGUI/Test/MockAsset.pm
  3. +1 −1 sbin/testEnvironment.pl
View
@@ -71,15 +71,15 @@ sub deprecate ($$) {
my %deep;
# keep a copy since it will be replaced
- my $new_sub = $stash->get_package_symbol('&'.$new_method);
+ my $new_sub = $stash->get_symbol('&'.$new_method);
# call new method instead. if
- $stash->add_package_symbol('&'.$old_method, sub {
+ $stash->add_symbol('&'.$old_method, sub {
my $self = shift;
derp "$package\::$old_method is deprecated and should be replaced with $new_method";
local $deep{1} = 1;
$self->$new_method(@_);
});
- $stash->add_package_symbol('&'.$new_method, sub {
+ $stash->add_symbol('&'.$new_method, sub {
my $self = $_[0];
if (!$deep{1}) {
my $old_sub = $self->can($old_method);
@@ -120,7 +120,7 @@ sub new {
};
my $stash = Package::Stash->new(ref $mock);
- $stash->add_package_symbol('&DESTROY', sub {
+ $stash->add_symbol('&DESTROY', sub {
my $self = shift;
$self->unmock_id;
$self->unmock_url;
@@ -134,7 +134,7 @@ sub new {
# remove our namespace
delete $ns_root->{ $ns_last };
});
- $stash->add_package_symbol('&mock_id', sub {
+ $stash->add_symbol('&mock_id', sub {
my $self = shift;
$self->unmock_id;
$mocked_id = shift;
@@ -145,14 +145,14 @@ sub new {
return $self;
});
- $stash->add_package_symbol('&unmock_id', sub {
+ $stash->add_symbol('&unmock_id', sub {
my $self = shift;
if ($mocked_id) {
$CLASS->unmock_id($mocked_id);
}
return $self;
});
- $stash->add_package_symbol('&mock_url', sub {
+ $stash->add_symbol('&mock_url', sub {
my $self = shift;
$self->unmock_url;
$mocked_url = shift;
@@ -162,7 +162,7 @@ sub new {
return $self;
});
- $stash->add_package_symbol('&unmock_url', sub {
+ $stash->add_symbol('&unmock_url', sub {
my $self = shift;
if ($mocked_url) {
$CLASS->unmock_url($mocked_url);
View
@@ -166,7 +166,7 @@ BEGIN
checkModule("Test::Log::Dispatch", "0" );
checkModule("CHI", "0.34" );
checkModule('IO::Socket::SSL', );
-checkModule('Package::Stash', "0.33" );
+checkModule('Package::Stash', "0.36" );
checkModule('HTTP::Exception', );
checkModule('Net::Twitter', "3.13006" );
checkModule('PerlIO::eol', "0.14" );

0 comments on commit 176b629

Please sign in to comment.