in reply to order of strict and package
I think this has something to do with the package identifies the file, so it should be at the top. Although, multipackage files break this.package PackageName; use strict; use warnings;
Also, if you mix up pragma and other modules by accident, symbols will be imported into MAIN and not __PACKAGE__.
For example:
That probably would be a bad thing as it wouldn't be obvious why CGI functions are being imported into your script's namespace.use strict; use CGI qw/:standard/; package MyPackage;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: order of strict and package
by needles (Acolyte) on Jun 01, 2001 at 19:50 UTC |