This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
move back to a stable Test-Simple, v1.001014
[perl5.git] / cpan / Test-Simple / lib / Test / Tester / Delegate.pm
index f25070e..7ddb921 100644 (file)
@@ -1,19 +1,32 @@
 use strict;
 use warnings;
+
 package Test::Tester::Delegate;
 
-warn "Test::Tester::Delegate is deprecated";
+use vars '$AUTOLOAD';
 
-1;
+sub new
+{
+       my $pkg = shift;
 
-__END__
+       my $obj = shift;
+       my $self = bless {}, $pkg;
 
-=head1 NAME
+       return $self;
+}
 
-Test::Tester::Delegate - Deprecated
+sub AUTOLOAD
+{
+       my ($sub) = $AUTOLOAD =~ /.*::(.*?)$/;
 
-=head1 DESCRIPTION
+       return if $sub eq "DESTROY";
 
-DEPRECATED. This package is now just a stub.
+       my $obj = $_[0]->{Object};
 
-=cut
+       my $ref = $obj->can($sub);
+       shift(@_);
+       unshift(@_, $obj);
+       goto &$ref;
+}
+
+1;