swkronenfeld has asked for the wisdom of the Perl Monks concerning the following question:
There is some strange behavior on File::Spec->catfile on VMS (perl, v5.8.1 built for VMS_AXP)
Whenever my path length is a multiple of 8 + 1 (or a multiple of 8+3 if you count the brackets), e.g. 9, 17, 23, the path is formed incorrectly (as shown below). It discards the second argument and forms a file path based on the first argument only.
Also, I have the latest version of File::Spec and File::Spec::VMS.
Any thoughts?
Whenever my path length is a multiple of 8 + 1 (or a multiple of 8+3 if you count the brackets), e.g. 9, 17, 23, the path is formed incorrectly (as shown below). It discards the second argument and forms a file path based on the first argument only.
I haven't been able to find anything through SuperSearch, google, cpan, etc related to this "bug". Does anyone have any idea what's going on? The next step will be to step through the Spec::File code, likely somewhere in the vmsify function or a child of it since this does not happen on UNIX.my $path = "[DIR."; my $tmp = ""; for(my $x=0; $x<60; $x++) { $tmp .= "a"; my $tmp2 = $path . $tmp . "]"; print File::Spec->catfile($tmp2, "file") . "\n"; } ----------------------------- $ perl test.pl USERS:[DIR.a]file USERS:[DIR.aa]file USERS:[DIR.aaa]file USERS:[DIR.aaaa]file USERS:[DIR]aaaaa USERS:[DIR.aaaaaa]file USERS:[DIR.aaaaaaa]file USERS:[DIR.aaaaaaaa]file USERS:[DIR.aaaaaaaaa]file USERS:[DIR.aaaaaaaaaa]file USERS:[DIR.aaaaaaaaaaa]file USERS:[DIR.aaaaaaaaaaaa]file USERS:[DIR]aaaaaaaaaaaaa USERS:[DIR.aaaaaaaaaaaaaa]file USERS:[DIR.aaaaaaaaaaaaaaa]file USERS:[DIR.aaaaaaaaaaaaaaaa]file
Also, I have the latest version of File::Spec and File::Spec::VMS.
Any thoughts?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: File::Spec bug on VMS
by swkronenfeld (Hermit) on Sep 29, 2006 at 15:37 UTC | |
by tye (Sage) on Sep 29, 2006 at 20:08 UTC | |
Re: File::Spec bug on VMS
by syphilis (Archbishop) on Sep 29, 2006 at 09:30 UTC |
Back to
Seekers of Perl Wisdom