in reply to Re: VI VI VI - the number of the beast
in thread VI VI VI - the number of the beast

hmmm
Package my_package; use strict; use constant USES => 'goes after package';
:)

Replies are listed 'Best First'.
Re: Re: Re: VI VI VI - the number of the beast
by Masem (Monsignor) on May 05, 2001 at 23:14 UTC
    Well, the use strict has to be inside the package statement for the package to be using strict, but since you can define multiple packages within a single file, it's still a good idea to toss an extra use strict at line 2 or 3 (assuming that line 1 is "#!/usr/bin/perl -wT").
    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
      Packages don't actually use strict. strict simply takes effect until the end of the lexical scope in which it occurs (either file or block). Package declarations don't matter to the strict pragma.

      Here's an example:

      #!perl use strict; package First; $x = 1; package Second; $y = 2; __END__ Global symbol "$x" requires explicit package name at - line 7. Global symbol "$y" requires explicit package name at - line 11. Execution of - aborted due to compilation errors.