Skip Menu |
 

This queue is for tickets about the File-Slurp CPAN distribution.

Report information
The Basics
Id: 27371
Status: new
Priority: 0/
Queue: File-Slurp

People
Owner: Nobody in particular
Requestors: PEdwards [...] factset.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] for File::Slurp 9999.12 on VMS
Date: Fri, 1 Jun 2007 12:40:04 -0400
To: bug-File-Slurp [...] rt.cpan.org
From: Peter Edwards <PEdwards [...] factset.com>
Download (untitled) / with headers
text/plain 3.1k
Hello and thank you for File::Slurp. Below are the edits I made to get File::Slurp 9999.12 to pass all it's tests on VMS using Perl 5.8.7, I thought I'd let you know. (VMS has a versioned file system and filenames have to have a period (dot) in them, paths are also different. perlvms and perlport provide more info) Thanks again, Peter (Stig) Edwards ==== file-slurp-9999_12/t/inode.t#1 - file-slurp-9999_12.t]inode.t ==== ************ File FILE-SLURP-9999_12]T5761307400.TMP;1 17 plan tests => 3 ; 18 } ****** File FILE-SLURP-9999_12.T]INODE.T;3 17 if( $^O eq 'VMS' ) { 18 plan skip_all => 'skip inode test on VMS'; 19 exit ; 20 } 21 else { 22 plan tests => 3 ; 23 } 24 } ************ ==== file-slurp-9999_12/t/newline.t#1 - file-slurp-9999_12.t]newline.t ==== ************ File FILE-SLURP-9999_12]T5761307401.TMP;1 31 unlink $file_name ; 32 ****** File FILE-SLURP-9999_12.T]NEWLINE.T;3 31 1 while(unlink $file_name) ; 32 ************ ************ File FILE-SLURP-9999_12]T5761307401.TMP;1 42 } ****** File FILE-SLURP-9999_12.T]NEWLINE.T;3 42 43 close FH; 44 } ************ ************ File FILE-SLURP-9999_12]T5761307401.TMP;1 54 return $data ; ****** File FILE-SLURP-9999_12.T]NEWLINE.T;3 56 close FH; 57 58 return $data ; ************ ==== file-slurp-9999_12/t/read_dir.t#1 - file-slurp-9999_12.t]read_dir.t ==== ************ File FILE-SLURP-9999_12]T5761307402.TMP;1 5 ****** File FILE-SLURP-9999_12.T]READ_DIR.T;15 5 use File::Spec qw (catfile); 6 ************ ************ File FILE-SLURP-9999_12]T5761307402.TMP;1 20 ok( @dir_entries == 2, 'empty dir with . ..' ) ; 21 22 write_file( "$test_dir/x", "foo\n" ) ; 23 ****** File FILE-SLURP-9999_12.T]READ_DIR.T;15 21 my $dir_entries_expected = 2; 22 if($^O eq 'VMS'){ 23 $dir_entries_expected = 0; 24 } 25 26 my $dir_entries_got = scalar @dir_entries; 27 28 ok( $dir_entries_got == $dir_entries_expected, "empty dir with . .. expected=$dir_entries_expected got=$dir_entries_ 29 30 write_file( File::Spec->catfile($test_dir,'x') , "foo\n" ) ; 31 ************ ************ File FILE-SLURP-9999_12]T5761307402.TMP;1 28 ok( $dir_entries[0] eq 'x', 'dir with file x' ) ; 29 ****** File FILE-SLURP-9999_12.T]READ_DIR.T;15 36 my $expected_file = 'x'; 37 if($^O eq 'VMS'){ 38 $expected_file = 'x.'; 39 } 40 41 ok( $dir_entries[0] eq $expected_file, "dir with file $expected_file" ) ; 42 ************ ************ File FILE-SLURP-9999_12]T5761307402.TMP;1 34 for ( 1 .. $file_cnt ) { 35 36 write_file( "$test_dir/$_", "foo\n" ) ; 37 } ****** File FILE-SLURP-9999_12.T]READ_DIR.T;15 47 if($^O eq 'VMS'){ 48 @expected_entries = map {$_.'.'} @expected_entries; 49 } 50 51 for ( 1 .. $file_cnt ) { 52 53 write_file( File::Spec->catfile($test_dir,$_), "foo\n" ) ; 54 } ************


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.