in reply to Re: Re: Create a built-in-like sub?
in thread Create a built-in-like sub?
I may be incorrect in the new perl 5.6+ world since I'm still using 5.005_03. The only reason I added the use statement to the MODULE package is to make sure that the sub compress is pushed into it.package GLOBAL use 'Exporter'; @ISA = qw(Exporter); #not always needed, but usually a good practice @EXPORT = qw(compress); ... 1; package MODULE use GLOBAL; use Exporter; @ISA = qw(Exporter); #again, usually a good practice. @EXPORT = qw(test); sub test { compress "test\n"; } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Create a built-in-like sub?
by Juerd (Abbot) on Feb 01, 2002 at 23:45 UTC |