develooper Front page | perl.perl5.porters | Postings from February 2008

[PATCH] for -M:Foo, extended and revised

Thread Next
From:
Robin Barker
Date:
February 27, 2008 11:20
Subject:
[PATCH] for -M:Foo, extended and revised
Message ID:
46A0F33545E63740BC7563DE59CA9C6D093A61@exchsvr2.npl.ad.local
IMO the following errors are inappropriate

% perl -m- -e1
syntax error at -e line 0, near "no ;"
Execution of -e aborted due to compilation errors.
% perl -M-= -e1
Module name required with -- option.
% perl -MA:B:C -e1
syntax error at -e line 0, near "use A:"
Execution of -e aborted due to compilation errors.
% perl -M:Foo -e1
(silent - but deadly?)
% perl -M:Foo -we1
Useless use of a constant in void context.

The attached patch gives the following

% ./perl -m- -e1
Module name required with -m option.
% ./perl -M-= -e1
Module name required with -M option.
% ./perl -MA:B:C -e1
Invalid module name A:B:C with -M option: contains single ':'.
% ./perl -M:Foo -e1
Invalid module name :Foo with -M option: contains single ':'.
% ./perl -M:Foo -we1
Invalid module name :Foo with -M option: contains single ':'.


Robin Barker



-------------------------------------------------------------------
This e-mail and any attachments may contain confidential and/or
privileged material; it is for the intended addressee(s) only.
If you are not a named addressee, you must not use, retain or
disclose such information.

NPL Management Ltd cannot guarantee that the e-mail or any
attachments are free from viruses.

NPL Management Ltd. Registered in England and Wales. No: 2937881
Registered Office: Serco House, 16 Bartley Wood Business Park,
                   Hook, Hampshire, United Kingdom  RG27 9UY
-------------------------------------------------------------------

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About