in reply to Re: Can I retry "use" when module load fails?
in thread Can I retry "use" when module load fail ?
package CommonPiece; require Exporter; our @ISA =qw/Exporter/; our @EXPORT =qw/htmlStyle/; sub htmlStyle { print "<style>...</style>"; } 1; __END__
Now in main
However, if I change to :use CommonPiece; htmlStyle; # this works
BEGIN { require CommonPiece; } htmlStyle; #Undefined subroutine &main::htmlStyle called at /...path/
What did I missed?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Can I retry "use" when module load fails?
by NetWallah (Canon) on Apr 15, 2013 at 05:42 UTC | |
by exilepanda (Friar) on Apr 15, 2013 at 06:15 UTC | |
by NetWallah (Canon) on Apr 15, 2013 at 06:47 UTC | |
by exilepanda (Friar) on Apr 15, 2013 at 06:57 UTC | |
by dsheroh (Monsignor) on Apr 15, 2013 at 08:51 UTC | |
|