On Aug 7, 10:12am, Nathan Torkington wrote:
> Is there any reason you couldn't use "die" instead?

This isn't an objection to the proposal, but one example of where I'm
relying on the value returned by require() for a reason other than
error reporting.

I'm building Perl sub-routines (from templates) and writing them to
a file as:

   sub {
        # blah blah blah
   }

And then I can

  eval { $mysub = require $filename };

Of course, I should point out that I've already been burnt by this.
If the file has already been required then require() returns 1 instead
of the subref.  So I have to delete $INC{ $file } before I require it.
There are other ways I could easily do the same thing (the Data::Dumper
approach for one).


A

-- 
Andy Wardley <[EMAIL PROTECTED]>   Signature regenerating.  Please remain seated.
     <[EMAIL PROTECTED]>   For a good time: http://www.kfs.org/~abw/

Reply via email to