develooper Front page | perl.perl5.porters | Postings from November 2000

Re: [ID 20001124.001] B exports "walkoptree" but does not define it(fwd)

From:
Jeff Pinyan
Date:
November 24, 2000 08:54
Subject:
Re: [ID 20001124.001] B exports "walkoptree" but does not define it(fwd)
Message ID:
Pine.GSO.4.21.0011241154200.714-100000@crusoe.crusoe.net
On Nov 24, Mark-Jason Dominus said:

>Would it be a bad idea to have Exporter.pm raise a fatal compile-time
>error if a module exported an undefined subroutine?

That would break exporting functions that get AUTOLOADed.

  package Foo;
  AUTOLOAD { print "$AUTOLOAD(@_)\n" }

  package main;
  *func = \&Foo::fake;
  func();
  __END__
  Foo::fake()

-- 
Jeff "japhy" Pinyan     japhy@pobox.com    http://www.pobox.com/~japhy/
CPAN - #1 Perl Resource  (my id:  PINYAN)       http://search.cpan.org/
PerlMonks - An Online Perl Community          http://www.perlmonks.com/
The Perl Archive - Articles, Forums, etc.   http://www.perlarchive.com/





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About