This was *real fun* to track down. Here's a minimal test case of what
was happening:
#!/usr/bin/perl
use strict;
use warnings;
use HTML::TokeParser qw;
print "here";
I run that and it prints 'here', even though HTML::TokeParser does not
export 'no_such_function'. No errors or warn
In article <[EMAIL PROTECTED]>, Ovid
<[EMAIL PROTECTED]> wrote:
> Note that the following does not trigger this:
>
> use UNIVERSAL::require;
> use CGI qw;
CGI has the nifty feature of auto-generating functions from its import
list to turn them into HTML generating functions:
use UNIVERSA
Michael G Schwern wrote in perl.qa :
> There is a fix for this, something like changing UNIVERSAL::import to be...
>
> sub import {
> my($class) = shift;
>
> return unless $class eq 'UNIVERSAL';
>
> ...do the export...
> }
Oh yes, that used to be a major *kh* problem.
Its not UNIVERSAL::require, its UNIVERSAL (which UNIVERSAL::require must
unfortunately load).
use UNIVERSAL;
use HTML::TokeParser qw(wibble);
HTML::TokeParser defines nor inherits any import routine. When there's no
import, any arguments to use are ignored and any calls to Class->import
--- Ovid <[EMAIL PROTECTED]> wrote:
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> use UNIVERSAL::require;
> use HTML::TokeParser qw;
>
> print "here";
>
> That produces:
>
> :!perl -Ilib parse.pl
> "no_such_function" is not exported by the HTML::TokeParser module
>
This was *real fun* to track down. Here's a minimal test case of what
was happening:
#!/usr/bin/perl
use strict;
use warnings;
use HTML::TokeParser qw;
print "here";
I run that and it prints 'here', even though HTML::TokeParser does not
export 'no_such_function'. No errors or warn