Chas. Owens wrote:
2. package variables are always visible when fully qualified (i.e.
$PKGNAME::varname), but the short name is only visible to the scope
that contained the our statement and any nested scopes
For example:
{ package Data::Dumper; our ($Indent, $Sortkeys, $Terse) = (1)x3
From: "Chas. Owens"
> On Wed, Mar 25, 2009 at 00:03, Chap Harrison wrote:
> > Hi again,
> >
> > I'm trying to factor out the declaration and setting of a bunch of variables
> > that a suite of programs will need, as well as defining some subroutines
> > that will be needed. I've been mainly refe
On Thu, Mar 26, 2009 at 14:05, Chap Harrison wrote:
snip
> This one baffles me. I still have to explicitly export $g_database_path by
> putting it into @EXPORT - what is 'our' doing that 'my' doesn't?
snip
our and my both create variables. The difference is their scope and their
interaction wit
On Mar 25, 2009, at 1:16 AM, Chas. Owens wrote:
You need to add the variables you want exported to either @EXPORT (the
mandatory list of things to export) or @EXPORT_OK (this list of things
to export on demand). The biggest complication is your desire to pass
in a variable. This means that we
On Wed, Mar 25, 2009 at 00:03, Chap Harrison wrote:
> Hi again,
>
> I'm trying to factor out the declaration and setting of a bunch of variables
> that a suite of programs will need, as well as defining some subroutines
> that will be needed. I've been mainly referencing Programming Perl 5, but I