Re: Sharing new Perl Modules

2002-06-14 Thread Jan Dubois
On Thu, 13 Jun 2002 13:24:25 -0600, "Joe Schell" <[EMAIL PROTECTED]> wrote: >> -Original Message- >> Behalf Of Morgan, Steve H. >> >> Does anyone know what the process is to submit new perl modules to Active >> State? > >Just as a guess, with the exception of the modules specifically main

Re: "my" variable initiation

2002-06-14 Thread Jan Dubois
On Fri, 14 Jun 2002 08:04:47 +0100, "Michael D. Smith" <[EMAIL PROTECTED]> wrote: >Basically, I want a first time switch. > >I can do that with a gobal variable like this: > >$first_time = 0; > >sub howto { > if ($first_time == 0 ) { # do the stuff that's done only the first >time then add

Solved: exporting constants

2002-06-14 Thread gerhard . petrowitsch
Hello list, sorry for bothering everybody, but - as so often - it was just a simple mistake: If I do it that way, it works: My module: package mymodule; use constant SSTAT_NOTFOUND => 0; use constant SSTAT_ERROR => 1; use constant SSTAT_OK => 255; require Exporter; our @ISA = ("Exporter"); our

RE: exporting constants

2002-06-14 Thread PaulGould
> From: [EMAIL PROTECTED] > > Thanks $Bill, > > but that's not what I'd like to have. If I use the fully qualified > name (mymodule::SSTAT_ERROR), then I don't have to > export the constants at all. > But with exporting my intention was to have the convenience > of not needing to use fully quali

Re: exporting constants

2002-06-14 Thread gerhard . petrowitsch
Thanks $Bill, but that's not what I'd like to have. If I use the fully qualified name (mymodule::SSTAT_ERROR), then I don't have to export the constants at all. But with exporting my intention was to have the convenience of not needing to use fully qualified names, but being able to use simple na

Re: exporting constants

2002-06-14 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > Hi all, > > I've got this problem with constants: > > I've got a module like that > > package mymodule; > use constant SSTAT_NOTFOUND => 0; > use constant SSTAT_ERROR => 1; > use constant SSTAT_OK => 255; > require Exporter; > our @ISA = ("Exporter"); > our @EXPORT_OK

exporting constants

2002-06-14 Thread gerhard . petrowitsch
Hi all, I've got this problem with constants: I've got a module like that package mymodule; use constant SSTAT_NOTFOUND => 0; use constant SSTAT_ERROR => 1; use constant SSTAT_OK => 255; require Exporter; our @ISA = ("Exporter"); our @EXPORT_OK = (SSTAT_NOTFOUND, SSTAT_ERROR, SSTAT_OK); our %EX

Re: "my" variable initiation

2002-06-14 Thread $Bill Luebkert
Michael D. Smith wrote: > > This is a small thing but it's annoying me. I've been using a gobal > variable inside a subroutine, which you're not supposed to have to do, > or get a warning, which isn't fatal either but I don't like it. > > Basically, I want a first time switch. > > I can do th

RE: "my" variable initiation

2002-06-14 Thread Michael D. Smith
This is a small thing but it's annoying me. I've been using a gobal variable inside a subroutine, which you're not supposed to have to do, or get a warning, which isn't fatal either but I don't like it. Basically, I want a first time switch. I can do that with a gobal variable like this: $fi