Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Case errors in "use" statements on Windoze

by rovf (Priest)
on Sep 09, 2011 at 11:43 UTC ( #925067=perlquestion: print w/replies, xml ) Need Help??
rovf has asked for the wisdom of the Perl Monks concerning the following question:

On Windows, the following code issues neither error nor warning:

use strict; use warnings; use file::path; # error! shoud be File::Path
Searching a bit, I found that this problem was already discussed 10 years ago here, and a fix for Perl was suggested.

Now I wonder why this was never fixed....
-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re: Case errors in "use" statements on Windoze
by Anonymous Monk on Sep 10, 2011 at 01:59 UTC

    Now I wonder why this was never fixed....

    I don't know :)

    This got in http://perl5.git.perl.org/perl.git/history/HEAD:/lib/strict.pm

    # Verify that we're called correctly so that strictures will work. unless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) { # Can't use Carp, since Carp uses us! my (undef, $f, $l) = caller; die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n"); } $ perl -MStRiCt -e 1 Incorrect use of pragma 'strict' at -e line 0. Compilation failed in require. BEGIN failed--compilation aborted.
    Same for warnings
    # Verify that we're called correctly so that warnings will work. # see also strict.pm. unless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) { my (undef, $f, $l) = caller; die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n"); } $ perl -MWaRnInGs -e 1 Incorrect use of pragma 'warnings' at -e line 0. Compilation failed in require. BEGIN failed--compilation aborted.

    The accompanying thread dated April 16, 2007 The Strict trap hints at some reasons, like it would break existing code, etc

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://925067]
Approved by ww
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2018-07-19 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (420 votes). Check out past polls.

    Notices?