Has semantics similar to the following subroutine: sub require { my($filename) = @_; return 1 if $INC{$filename}; my($realfilename,$result); ITER: { foreach $prefix (@INC) { $realfilename = "$prefix/$filename"; if (-f $realfilename) { $INC{$filename} = $realfilename; $result = do $realfilename; last ITER; } } die "Can't find $filename in \@INC"; } delete $INC{$filename} if $@ || !$result; die $@ if $@; die "$filename did not return true value" unless $result; return $result; }
-dlc
In reply to RE: RE: Detecting modules in use?
by dchetlin
in thread Detecting modules in use?
by BBQ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |