Re: strict behavior with .pm

2007-09-29 Thread Paul Lalli
On Sep 28, 5:18 pm, [EMAIL PROTECTED] (Jeremy Kister) wrote: > Given the below code, is there something that will warn/prevent me from > declaring $variable when i really meant @variable ? > > I usually use perl -wTc scriptname to check for silliness, but i've > realized code in the below fashion w

Re: strict behavior with .pm

2007-09-28 Thread Tom Phoenix
On 9/28/07, Chas. Owens <[EMAIL PROTECTED]> wrote: > The strict pragma is lexically scoped, so you need to use it again > after the package statement. It is probably a good idea to turn on > warnings as well. To be sure, I don't think that's an accurate description of the effects of lexical scop

Re: strict behavior with .pm

2007-09-28 Thread Chas. Owens
On 9/28/07, Jeremy Kister <[EMAIL PROTECTED]> wrote: > Given the below code, is there something that will warn/prevent me from > declaring $variable when i really meant @variable ? snip > package My::Example; > sub new { > return bless({}, shift); > } > sub go { > my $variable; >

strict behavior with .pm

2007-09-28 Thread Jeremy Kister
Given the below code, is there something that will warn/prevent me from declaring $variable when i really meant @variable ? I usually use perl -wTc scriptname to check for silliness, but i've realized code in the below fashion won't be reported. This got me very confused under mod_perl, becau