Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: what would you like to see in perl5.12? (require $class)

by ysth (Canon)
on Aug 22, 2007 at 19:59 UTC ( [id://634505]=note: print w/replies, xml ) Need Help??


in reply to Re^3: what would you like to see in perl5.12? (require $class)
in thread what would you like to see in perl5.12?

No, I meant search @INC, like:
$ echo 1 > Foo::Bar $ strace perl -e'require "Foo::Bar"' 2>&1 |grep Foo execve("/usr/bin/perl", ["perl", "-erequire \"Foo::Bar\""], [/* 38 var +s */]) = 0 stat64("/etc/perl/Foo::Bar", 0xbffcabac) = -1 ENOENT (No such file or +directory) stat64("/usr/local/lib/perl/5.8.8/Foo::Bar", 0xbffcabac) = -1 ENOENT ( +No such file or directory) stat64("/usr/local/share/perl/5.8.8/Foo::Bar", 0xbffcabac) = -1 ENOENT + (No such file or directory) stat64("/usr/lib/perl5/Foo::Bar", 0xbffcabac) = -1 ENOENT (No such fil +e or directory) stat64("/usr/share/perl5/Foo::Bar", 0xbffcabac) = -1 ENOENT (No such f +ile or directory) stat64("/usr/lib/perl/5.8/Foo::Bar", 0xbffcabac) = -1 ENOENT (No such +file or directory) stat64("/usr/share/perl/5.8/Foo::Bar", 0xbffcabac) = -1 ENOENT (No suc +h file or directory) stat64("/usr/local/lib/site_perl/Foo::Bar", 0xbffcabac) = -1 ENOENT (N +o such file or directory) stat64("./Foo::Bar", {st_mode=S_IFREG|0644, st_size=2, ...}) = 0 open("./Foo::Bar", O_RDONLY|O_LARGEFILE) = 3

Replies are listed 'Best First'.
Re^5: what would you like to see in perl5.12? (require $class)
by ikegami (Patriarch) on Aug 22, 2007 at 20:05 UTC

    The change I propose would have require search for Foo/Bar.pm and Foo/Bar.pmc when supplied "Foo::Bar" for argument, just like when it's supplied Foo::Bar for argument.

    The only thing it would break is the ability to require modules with :: in the file name. That's extremely unlikely since it would break on Windows and old Macs.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://634505]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-03-29 06:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found