From: Jerry D. Hedden Date: Tue, 25 Mar 2008 11:51:00 +0000 (-0400) Subject: Re: Change 33556: [PATCH] borg parent.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c05290799fe650da776e2abcfd6f8da9ec7b5d50;p=p5sagit%2Fp5-mst-13.2.git Re: Change 33556: [PATCH] borg parent.pm From: "Jerry D. Hedden" Message-ID: <1ff86f510803250851w52ea0c84n9876834d8e8b79e3@mail.gmail.com> p4raw-id: //depot/perl@33565 --- diff --git a/lib/Devel/SelfStubber.t b/lib/Devel/SelfStubber.t index b5deb14..245517a 100644 --- a/lib/Devel/SelfStubber.t +++ b/lib/Devel/SelfStubber.t @@ -48,7 +48,7 @@ close FH; push @cleanup, $file; open FH, ">$file" or die $!; select FH; - Devel::SelfStubber->stub('Child', $inlib); + Devel::SelfStubber->stub('xChild', $inlib); select STDOUT; print "ok 1\n"; close FH or die $!; @@ -56,7 +56,7 @@ close FH; open FH, $file or die $!; my @A = ; - if (@A == 1 && $A[0] =~ /^\s*sub\s+Child::foo\s*;\s*$/) { + if (@A == 1 && $A[0] =~ /^\s*sub\s+xChild::foo\s*;\s*$/) { print "ok 2\n"; } else { print "not ok 2\n"; @@ -112,14 +112,14 @@ close FH; } # "wrong" and "right" may change if SelfLoader is changed. -my %wrong = ( Parent => 'Parent', Child => 'Parent' ); -my %right = ( Parent => 'Parent', Child => 'Child' ); +my %wrong = ( xParent => 'xParent', xChild => 'xParent' ); +my %right = ( xParent => 'xParent', xChild => 'xChild' ); if ($^O eq 'VMS') { # extra line feeds for MBX IPC - %wrong = ( Parent => "Parent\n", Child => "Parent\n" ); - %right = ( Parent => "Parent\n", Child => "Child\n" ); + %wrong = ( xParent => "xParent\n", xChild => "xParent\n" ); + %right = ( xParent => "xParent\n", xChild => "xChild\n" ); } -my @module = qw(Parent Child) +my @module = qw(xParent xChild) ; sub fail { my ($left, $right) = @_; @@ -225,18 +225,18 @@ if (/Did the documentation here survive\?/) { } __DATA__ -################ Parent.pm -package Parent; +################ xParent.pm +package xParent; sub foo { return __PACKAGE__; } 1; __END__ -################ Child.pm -package Child; -require Parent; -@ISA = 'Parent'; +################ xChild.pm +package xChild; +require xParent; +@ISA = 'xParent'; use SelfLoader; 1;