From: Gurusamy Sarathy Date: Tue, 11 Jul 2000 18:57:00 +0000 (+0000) Subject: delete new accidentally branched file X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5e5f20b507b6c3b7749b1f2f6cfd8a156eca9deb;p=p5sagit%2Fp5-mst-13.2.git delete new accidentally branched file p4raw-id: //depot/perl@6365 --- diff --git a/t/op/method2entersub.t b/t/op/method2entersub.t deleted file mode 100644 index 5e9b924..0000000 --- a/t/op/method2entersub.t +++ /dev/null @@ -1,66 +0,0 @@ -#!./perl - -BEGIN { - package BaseClass; #forward package declaration for base.pm - - chdir 't' if -d 't'; - unshift @INC, '../lib' if -d '../lib'; -} - -{ - package BaseClass; - - sub method { - } -} - -{ - package Class; - use base qw(BaseClass +readonly); - - sub mtest { - Class->method; - - my Class $obj = bless {}; - - $obj->method; - } - -} - -{ - package Class2; - use base qw(BaseClass); - - sub mtest { - Class2->method; - - my Class2 $obj = bless {}; - - $obj->method; - } -} - -use Test; - -plan tests => 2; - -use B (); - -sub cv_root { - B::svref_2object(shift)->ROOT; -} - -sub method_in_tree { - my $op = shift; - if ($$op && ($op->flags & B::OPf_KIDS)) { - for (my $kid = $op->first; $$kid; $kid = $kid->sibling) { - return 1 if $kid->ppaddr =~ /method/i; - return 1 if method_in_tree($kid); - } - } - return 0; -} - -ok ! method_in_tree(cv_root(\&Class::mtest)); -ok method_in_tree(cv_root(\&Class2::mtest));