Home > Archive > PERL Beginners > March 2005 > use strict/warnings
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
use strict/warnings
|
|
| Roberts Mr Richard L 2005-03-23, 3:56 pm |
| My superior and I are debating where 'use strict/warnings' should be placed:
prior to any use module statement or after?
Anyone?
-----Original Message-----
From: Atul Vohra [mailto:atul@protechsoftwareinc.com]
Sent: Wednesday, March 23, 2005 1:44 PM
To: Felix Geerinckx; beginners@perl.org
Subject: Re: Web Service Client
Thanks
----- Original Message -----
From: "Felix Geerinckx" <felix.geerinckx@gmail.com>
To: beginners@perl.org
Subject: Re: Web Service Client
Date: 22 Mar 2005 17:41:59 -0000
>
> On 22/03/2005, Atul Vohra wrote:
>
> [Top-posting fixed]
>
>
> [...]
>
>
> This wasn't too hard to find (where did you look yourself?):
>
> http://www.perl.com/pub/a/2001/01/soap.html
>
> --
> felix
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
<http://learn.perl.org/> <http://learn.perl.org/first-response>
| |
| Wiggins d'Anconia 2005-03-23, 3:56 pm |
| Roberts Mr Richard L wrote:
> My superior and I are debating where 'use strict/warnings' should be placed:
> prior to any use module statement or after?
> Anyone?
>
Please start a new thread, snip old messages that are not related.
Generally it doesn't matter since they are both file scoped, meaning
they do not impact the module code (unless you are doing -w).
As personal preference, they are absolutely required, so I put them
first at the top of my template and never question where or more
importantly whether they are there. I also generally group pragma
together, then modules, then constants. So you may want to think of
them in this light, rather than as 'all things used'. Though I do drop
them below the 'package' line probably for no reason in particular.
http://danconia.org
| |
| Chris Devers 2005-03-23, 3:56 pm |
| On Wed, 23 Mar 2005, Roberts Mr Richard L wrote:
> My superior and I are debating where 'use strict/warnings' should be
> placed: prior to any use module statement or after? Anyone?
It doesn't really matter a whole lot if the modules are well behaved.
But then, that's not necessarily a good assumption.
I say it should go at the top, but not because it should be over the
module declarations, but because having something like
#!/usr/bin/perl
use strict;
use warnings;
should just reflexively be the first lines of *every* script, to the
point that having your editor do this for you automatically would be
a very good thing, provided that your editor supports such macros.
--
Chris Devers
| |
| Robert 2005-03-23, 3:56 pm |
| I typically do:
#!/usr/bin/perl
#pragmas
use strict;
use warnings;
#modules
use Tk;
And so on...I just think it organizes better.
Robert
|
|
|
|
|