the our works... now I got a crap load of errors with:
Can't use string ("main::a") as a SCALAR ref while "strict refs" in use at
/xxxx/TempSorter.pm line 114.

I gotta read the docs on use strict and warnings.
I am using ${caller()."::a"} #line 114 in my program.. will 'our' or 'use
vars' help me with my error? I am using it for comfort when using the
function in other programs. The module is abunch of sort subroutines that I
use everywhere.

Thanx for all the help.

-----Original Message-----
From: Tanton Gibbs [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 12:44 PM
To: Tanton Gibbs; Nikola Janceski; Beginners (E-mail)
Subject: Re: use strict and warnings...


OOPS!  don't put the comma in the qw!

use vars qw(@ISA @EXPORT);
----- Original Message -----
From: "Tanton Gibbs" <[EMAIL PROTECTED]>
To: "Nikola Janceski" <[EMAIL PROTECTED]>; "Beginners (E-mail)"
<[EMAIL PROTECTED]>
Sent: Thursday, March 07, 2002 12:26 PM
Subject: Re: use strict and warnings...


> You can either declare them with our (for newer versions of perl)
>
> our @ISA = ...
> our @EXPORT = ...
>
> or you can say( for compatibility with older perls)
>
> use vars qw(@ISA, @EXPORT);
> at the top of your file.
> ----- Original Message -----
> From: "Nikola Janceski" <[EMAIL PROTECTED]>
> To: "Beginners (E-mail)" <[EMAIL PROTECTED]>
> Sent: Thursday, March 07, 2002 12:03 PM
> Subject: use strict and warnings...
>
>
> > I am going through my old code and adding:
> > use strict;
> > use warnings;
> >
> > And I am running into some problems. I created a module (that I know
> works).
> >
> > [ snip FILE: TempSorter.pm ]
> > ## Packages used
> > package TempSorter;
> > use Exporter;
> > use strict;
> >
> > ### GLOBAL VARIABLES
> > @ISA = qw(Exporter);
> > @EXPORT = qw( wordgroup wordtype releasetype);
> >
> >
> > [snip FILE: pl.pl ]
> >
> > use lib "/xxxx/perl_lib";
> >
> > use strict;
> > use warnings;
> > use TempSorter;
> >
> > my @array = sort { wordtype() } qw( foo bar boo far );
> >
> >
> > And these are the errors I get:
> > Global symbol "@ISA" requires explicit package name at
/xxxx/TempSorter.pm
> > line 20.
> > Global symbol "@EXPORT" requires explicit package name at
> > /xxxx/TempSorter.pm line 21.
> > Compilation failed in require at /xxxx/pl.pl line 8.
> > BEGIN failed--compilation aborted at /xxxx/pl.pl line 8.
> >
> > If I put a 'my' in front of the arrays then my pl.pl can't find the
> > function. What's the solution?
> >
> > Nikola Janceski
> >
> > The things you own end up owning you.
> > -- Tyler ('Fight Club')
> >
> >
>
> --------------------------------------------------------------------------
> --
> > --------------------
> > The views and opinions expressed in this email message are the sender's
> > own, and do not necessarily represent the views and opinions of Summit
> > Systems Inc.
> >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to