in reply to Re^2: Use module only if it is in use
in thread Use a module only if it is in use
Is it safe to asume that double colons in module names get always translated into slashes ("::" -> "/") instead of backslashes or whatever is used by the OS for subdirs?No, it's not safe to assume that. And be lucky. Your code wouldn't work if Perl changed the '::' to a '/', because that it would try to divide M by hello("again"), which most likely results in an error.
Perl maps '::' to the appropriate directory separator when it's used as a bareword argument to use and require. But that isn't always.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Use module only if it is in use
by bart (Canon) on Sep 02, 2009 at 18:32 UTC | |
by ikegami (Patriarch) on Sep 02, 2009 at 19:29 UTC | |
|
Re^4: Use module only if it is in use
by ikegami (Patriarch) on Sep 02, 2009 at 16:08 UTC | |
|
Re^4: Use module only if it is in use
by vitoco (Hermit) on Sep 02, 2009 at 16:08 UTC |