nayakgi / perl-compiler

Automatically exported from code.google.com/p/perl-compiler
Other
0 stars 0 forks source link

test 44 in B, C, CC: Scalar::Util "weaken" not imported #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
# perl #72922 (5.11.4 fails with magic_killbackrefs)
use Scalar::Util "weaken";my $re1=qr/foo/;my $re2=$re1;weaken($re2);print "ok" 
if $re3=qr/$re1/;
>>>
ok 

Problem:
Undefined subroutine &main::weaken called
weaken not imported correctly.

Original issue reported on code.google.com by reini.urban on 28 Dec 2010 at 5:58

GoogleCodeExporter commented 9 years ago
Hacked workaround with r918, which hardcodes Scalar::Util => 
&List::Util::bootstrap

bootstrapping did not detect List::Util, since it is not in its ISA, only 
required. require does not help. (fixed test 44)

Same workaround also needed for 'Sub::Exporter' => 'Params::Util' and probably 
many more.

TODO better strategy for compile-time added and required packages:
  loop savecv and check pkg cache for new pkgs.
  if so loop again with those new pkgs only, until the list of new pkgs is empty

Original comment by reini.urban on 3 Mar 2011 at 12:29

GoogleCodeExporter commented 9 years ago
Fixed for now, but need
TODO better strategy for compile-time added and required packages:
  loop savecv and check pkg cache for new pkgs.
  if so loop again with those new pkgs only, until the list of new pkgs is empty

Original comment by reini.urban on 6 Jun 2011 at 8:43