variable); method
> >
> > So I was wanting some input about pros and cons of using
> either since
> > on the surface they appear to do the same thing except that
> use vars
> > is backwards compatable.
> >
> > Any input on our vs. use vars ?? Pro,c
g some input about pros and cons of using
> either since on the surface they appear to do the same thing
> except that use vars is backwards compatable.
>
> Any input on our vs. use vars ?? Pro,con, neutral ??
If you want your module to work with pre-5.6 perl, you don't have a
choic
> On Tue, Oct 28, 2003 at 01:44:58PM -0600, Dan Muey wrote:
> >> If you don't care about older perls (and 5.005_03 is getting
> >> kind of mouldy) then do something like
> >>
> >> use 5.006;
> >>
> >> use base qw(Exporter);
> >
> > And that brings up another issue:
> > what is the differ
On Tue, Oct 28, 2003 at 01:44:58PM -0600, Dan Muey wrote:
>> If you don't care about older perls (and 5.005_03 is getting
>> kind of mouldy) then do something like
>>
>> use 5.006;
>>
>> use base qw(Exporter);
>
> And that brings up another issue:
> what is the difference between:
>
> On Tue, Oct 28, 2003 at 12:14:05PM -0600, Dan Muey wrote:
> > Hmm ok, what would be nice is to do something like this:
> > (I have a function that returns true if the perl version is
> the same
> > or higher than the specified number)
> >
> > package Monkey;
> >
> > use strict;
> >
> > if(go
On Tue, Oct 28, 2003 at 12:14:05PM -0600, Dan Muey wrote:
> Hmm ok, what would be nice is to do something like this:
> (I have a function that returns true if the perl version is the same or
> higher than the specified number)
>
> package Monkey;
>
> use strict;
>
> if(gotperlv(5.6)) {
> o
Many of your questions lately have been wrapped around
scoping/packages/symbol tables, etc. have you had a read through:
http://perl.plover.com/FAQs/Namespaces.html
?? I found it most informative.
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
Hmm ok, what would be nice is to do something like this:
(I have a function that returns true if the perl version is the same or higher than
the specified number)
package Monkey;
use strict;
if(gotperlv(5.6)) {
our $bar
our $foo;
} else {
use vars qw($bar $foo);
}
Exce
> "use vars" and "our" do roughly the same thing. They both
> let you use package variables under strict without fully-qualifying.
>
> All these code snippets pass strict, and they each set the
> package variable $foo ($A::foo, $B::foo, and $C::foo).
>
> use strict;
>
> {
> pack
On Tue, Oct 28, 2003 at 10:52:16AM -0600, Dan Muey wrote:
> I want to use the newer our $variable; but to make it work
> with pre 5.6 Perl (or whatever version our appeared in) I
> have to do the use vars qw($variable); method
>
> So I was wanting some input about pros and cons of using
> eithe
eared in) I
> > > have to do the use vars qw($variable); method
> > >
> > > So I was wanting some input about pros and cons of using
> > > either since on the surface they appear to do the same
> > > thing except that use vars is backwards compatable.
&g
gt; > So I was wanting some input about pros and cons of using
> either since
> > on the surface they appear to do the same thing except that
> use vars
> > is backwards compatable.
> >
> > Any input on our vs. use vars ?? Pro,con, neutral ??
>
> Hi Dan
d cons of using
> either since on the surface they appear to do the same thing
> except that use vars is backwards compatable.
>
> Any input on our vs. use vars ?? Pro,con, neutral ??
Hi Dan.
The main issue about 'our' as opposed to 'use vars' is that
the of scope.
surface they appear to do the same thing
except that use vars is backwards compatable.
Any input on our vs. use vars ?? Pro,con, neutral ??
TIA
Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
14 matches
Mail list logo