Re: package variables

2009-04-29 Thread Gunnar Hjalmarsson
Jenda Krynicky wrote: I think the original problem is with using use strict because 1. someone told you to or 2. you were told you have to do so for mod_perl. It's not really use strict that's required by mod_perl. Yep, I agree (and admit). In either case what wording would you suggest?

Reporting bugs (was: package variables)

2009-04-29 Thread Gunnar Hjalmarsson
Chas. Owens wrote: 2009/4/28 Gunnar Hjalmarsson nore...@gunnar.cc: snip I believe the standard response is patches are welcome. grin Are they? The number of open or new bugs at http://rt.perl.org/rt3/Public/ makes me fear something else. ( I did submit a bug report a few weeks ago:

Re: Reporting bugs (was: package variables)

2009-04-29 Thread Chas. Owens
On Wed, Apr 29, 2009 at 17:20, Gunnar Hjalmarsson nore...@gunnar.cc wrote: Chas. Owens wrote: 2009/4/28 Gunnar Hjalmarsson nore...@gunnar.cc: snip I believe the standard response is patches are welcome. grin Are they? The number of open or new bugs at http://rt.perl.org/rt3/Public/ makes

Re: package variables

2009-04-28 Thread Chas. Owens
On Tue, Apr 28, 2009 at 06:36, Dermot paik...@googlemail.com wrote: Hi, I saw some code like this today: !/bin/perl -w package My::Package; use strict; ... %My::Package::somehash = ( keyone = 'val', keytwo = 'val2'); The My::Package::somehash isn't declared as with `my` yet the

Re: package variables

2009-04-28 Thread Dermot
If no import list is supplied, all possible restrictions are assumed, that why it's working fine Thanx all. I suspected as much. It's not a practise I'd use personally. I'm sorry, I don't understand what you mean by import list here. Dp. -- To unsubscribe, e-mail:

package variables

2009-04-28 Thread Dermot
Hi, I saw some code like this today: !/bin/perl -w package My::Package; use strict; ... %My::Package::somehash = ( keyone = 'val', keytwo = 'val2'); The My::Package::somehash isn't declared as with `my` yet the package loads without error or warnings. Is this because the hash is given as a

Re: package variables

2009-04-28 Thread Chas. Owens
On Tue, Apr 28, 2009 at 08:01, Dermot paik...@googlemail.com wrote: If no import list is supplied, all possible restrictions are assumed, that why it's working fine Thanx all. I suspected as much. It's not a practise I'd use personally.  I'm sorry, I don't understand what you mean by import

Re: package variables

2009-04-28 Thread Gunnar Hjalmarsson
Chas. Owens wrote: On Tue, Apr 28, 2009 at 06:36, Dermot paik...@googlemail.com wrote: I saw some code like this today: !/bin/perl -w package My::Package; use strict; ... %My::Package::somehash = ( keyone = 'val', keytwo = 'val2'); The My::Package::somehash isn't declared as with `my` yet the

Re: package variables

2009-04-28 Thread Chas. Owens
On Tue, Apr 28, 2009 at 13:38, Gunnar Hjalmarsson nore...@gunnar.cc wrote: snip Fully qualified names do not trip strict.  Which is a reason to avoid using them.  I once work at a place that wrote Perl 5 as if it were still Perl 4.  They had turned on strict because they had heard it was the

Re: package variables

2009-04-28 Thread Jenda Krynicky
From: Chas. Owens chas.ow...@gmail.com On Tue, Apr 28, 2009 at 13:38, Gunnar Hjalmarsson nore...@gunnar.cc wrote: snip Fully qualified names do not trip strict.  Which is a reason to avoid using them.  I once work at a place that wrote Perl 5 as if it were still Perl 4.  They had turned on

Re: package variables

2009-04-28 Thread Gunnar Hjalmarsson
Jenda Krynicky wrote: From: Chas. Owens chas.ow...@gmail.com On Tue, Apr 28, 2009 at 13:38, Gunnar Hjalmarsson nore...@gunnar.cc wrote: snip Fully qualified names do not trip strict. Which is a reason to avoid using them. I once work at a place that wrote Perl 5 as if it were still Perl 4.

Re: package variables

2009-04-28 Thread Jenda Krynicky
From: Gunnar Hjalmarsson nore...@gunnar.cc Jenda Krynicky wrote: From: Chas. Owens chas.ow...@gmail.com On Tue, Apr 28, 2009 at 13:38, Gunnar Hjalmarsson nore...@gunnar.cc wrote: snip Fully qualified names do not trip strict. Which is a reason to avoid using them. I once work at a

Re: package variables

2009-04-28 Thread Chas. Owens
2009/4/28 Gunnar Hjalmarsson nore...@gunnar.cc: snip I believe the standard response is patches are welcome. grin Are they? The number of open or new bugs at http://rt.perl.org/rt3/Public/ makes me fear something else. ( I did submit a bug report a few weeks ago:

Package variables allowed?

2003-09-30 Thread perl
Can a calling program reference a package variable? It's not working for me. test.pl --- use fruit; #I want to use this like a stub or struct #this does not work - it errored print mystuff::a; print mystuff::b; #this work mystuff::mixIt; fruit.pm -- package mixIt; $a=apple;

Re: Package variables allowed?

2003-09-30 Thread perl
Never mind, I figured it out by put add the $ infront like: print $mystuff::a; print $mystuff::b; Hope this help any newbies getting into package. -rkl Can a calling program reference a package variable? It's not working for me. test.pl --- use fruit; #I want to use this like a

Re: Package variables allowed?

2003-09-30 Thread Wiggins d'Anconia
Because you seem to have been asking several questions about scoping and packages, etc. I found the following link extremely enlightening when first tackling this subject: http://perl.plover.com/FAQs/Namespaces.html http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For