in reply to Re: Re: Re: Re: Re: Sharing the scalar love?
in thread Sharing the scalar love?

Note: someone reply to my bad usage of @S::ISA. Someone prolly knows of a better way of doing this with strict on :)
Howabout (for perl 5.6.0 and up):
package S; our @ISA = qw(Exporter);
Or use vars qw(@ISA) for older perls.

At least it doesn't make you type the package name, which is error prone, since it creates a new package if you spell it wrong.

Joost.

Replies are listed 'Best First'.
Re^5: Sharing the scalar love?
by NetWallah (Canon) on Dec 22, 2003 at 22:43 UTC
    In order to use an unqualified "$x" in the caller, I had to code the "S" (S.pm) module thus (The examples provided above gave Syntax errors):
    package S; use strict; use warnings; use Exporter; #"require" works too, but use is more std. our @ISA = qw(Exporter); our @EXPORT = qw($x); our $x = 999; 1;
    "When you are faced with a dilemma, might as well make dilemmanade. "
A reply falls below the community's threshold of quality. You may see it by logging in.