in reply to New Problem?
in thread require $package?
My bet is that you will get the same error. And the problem is that E:/Perl/lib/Carp/Heavy.pm probably has a syntax error in it. (Did someone edit it?) When you load Carp you don't see this error because the bulk of the module is autoloaded upon use. (This started with Perl 5.6, which is why I knew what version of Perl you had.)use Carp; croak("Test croak");
But even if you fix that, you should work on your error handling. Using eval will trap errors, but if you are using eval, you should include $@ in your error message instead of guessing at what is wrong. Alternately you can use the file naming version of require. But as your code stands if your module doesn't return a true value, you will get an error that is confusing and counterproductive because it is wrong. (require is failing on a false return, but you will think it can't be found.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 1: New Problem?
by Flame (Deacon) on Oct 17, 2001 at 06:47 UTC | |
by tilly (Archbishop) on Oct 17, 2001 at 18:50 UTC | |
by Flame (Deacon) on Oct 17, 2001 at 23:45 UTC |