On Jan 30, 2010, at 12:03 PM, Craig A. Berry wrote:

Finding and fixing Module::Install's ability to locate the [.inc] or inc/ directory is probably the best way forward.

FWIW, the general problem is pretty obvious. If you look at the Module::Install code at:

<http://cpansearch.perl.org/src/ADAMK/Module-Install-0.92/lib/Module/Install.pm >

there's simply no attempt to treat path names portably. For example, in the new() method, they do:

my $base_path = Cwd::abs_path($FindBin::Bin);
...
        $args{base}     ||= $base_path;
...
        $args{file}     ||= "$args{base}/$args{prefix}/$args{path}.pm";

which is going to end up pasting together a VMS-native base onto other components joined with a slash, so you'll get something like:

DISK$I64SYS:[mydir]/inc/Foo.pm

which is obviously invalid. It probably works on Windows because you get

C:\mydir/inc/Foo.pm

which is also invalid, but the Windows CRT converts the forward slashes to backward slashes. The mongrel nature of the path is straightforwardly and automatically corrected, but that's not really feasible with the more complex bracket syntax on VMS.

Probably the best thing to do would be to audit the code in Module::Install for anything that would return a native path and unixify it immediately afterward; offhand I see calls to Cwd and File::Find methods that would likely need this treatment. Alternatively, if running Perl 5.10.1 or later try enabling DECC $FILENAME_UNIX_REPORT and see if you get any farther than without it.

________________________________________
Craig A. Berry
mailto:craigbe...@mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to