X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=lib%2Findirect.pm;h=ff3d34e02b2e8ad8f608f9b22d715a3dcfcad414;hp=c2854689ada8bd83045ebd52c063c230dabb9690;hb=c88f53009246bbc1af1789f746acc5d841fc0ae8;hpb=d34f50c40cce04c745a116755c566e4c4e3a516d diff --git a/lib/indirect.pm b/lib/indirect.pm index c285468..ff3d34e 100644 --- a/lib/indirect.pm +++ b/lib/indirect.pm @@ -29,8 +29,11 @@ BEGIN { use indirect; my $y = new Pear; # ok { - no indirect hook => sub { die "You really wanted $_[0]\->$_[1] at $_[2]:$_[3]" }; - my $z = new Pineapple 'fresh'; # croaks 'You really wanted Pineapple->new at blurp.pm:13' + no indirect hook => sub { + die "You really wanted $_[0]\->$_[1] at $_[2]:$_[3]" + }; + # croaks 'You really wanted Pineapple->new at blurp.pm:13' + my $z = new Pineapple 'fresh'; } } try { ... }; # warns @@ -145,7 +148,7 @@ sub unimport { $^H{+(__PACKAGE__)} = _tag($hook); } - (); + return; } =head2 C @@ -157,8 +160,10 @@ As explained in L's description, an C statement will le =cut sub import { + $^H |= 0x00020000; $^H{+(__PACKAGE__)} = _tag(undef); - (); + + return; } =head1 FUNCTIONS