Re: Testing for valid path names in CPAN distributions
On Sun, Aug 17, 2003 at 01:54:42PM +1000, Andrew Savige wrote: > Running variants of: > > tar tzf perl-5.8.0.tar.gz | perl -lne'print if tr|-_./a-zA-Z0-9||c' > > suggests only [-_./a-zA-Z0-9] are valid characters in a path name. > > Then I noticed 'perldoc perlport' lists the portable filename > characters as defined by ANSI C and various other restrictions. > What is the length limit of each path name component? > What is the length limit of file extensions? I heard YAML changed > from .yaml to .yml, for instance, yet Perl itself has many files > with long extensions -- runtime.porting, for example. 8.3 filesystems can handle long filenames, they just truncate them. All that matters is that they don't truncate to the same thing, a common problem with the perl*.pod man pages. > It'd be nice to have a standard test for valid "portable" path names. > Does such a test exist? I noticed Archive::Any has is_impolite() and > is_naughty() but didn't see any checks for basic path name validity. > BTW, is Archive::Any a "dead camel"? Its just resting. -- Michael G Schwern[EMAIL PROTECTED] http://www.pobox.com/~schwern/ That you be hanged by the neck, but not until you are dead, but that you be taken down again, and whilst you are yet alive, your bowels be taken out and burnt before your face; and that afterwards your head be severed from your body and your body be divided into quarters. And may God Almighty have mercy on your soul.
Re: Testing for valid path names in CPAN distributions
Andrew savige wrote in perl.qa : > Running variants of: > > tar tzf perl-5.8.0.tar.gz | perl -lne'print if tr|-_./a-zA-Z0-9||c' > > suggests only [-_./a-zA-Z0-9] are valid characters in a path name. > > Then I noticed 'perldoc perlport' lists the portable filename > characters as defined by ANSI C and various other restrictions. > What is the length limit of each path name component? > What is the length limit of file extensions? I heard YAML changed > from .yaml to .yml, for instance, yet Perl itself has many files > with long extensions -- runtime.porting, for example. Also, don't ever include files that differ only by case. In the perl source distribution, Porting/check83.pl checks that filenames are friendly to 8.3 filesystems. What you want is probably more complex : a test to see if a *set* of filenames is portable. > It'd be nice to have a standard test for valid "portable" path names. > Does such a test exist? I noticed Archive::Any has is_impolite() and > is_naughty() but didn't see any checks for basic path name validity. > BTW, is Archive::Any a "dead camel"?
Testing for valid path names in CPAN distributions
Running variants of: tar tzf perl-5.8.0.tar.gz | perl -lne'print if tr|-_./a-zA-Z0-9||c' suggests only [-_./a-zA-Z0-9] are valid characters in a path name. Then I noticed 'perldoc perlport' lists the portable filename characters as defined by ANSI C and various other restrictions. What is the length limit of each path name component? What is the length limit of file extensions? I heard YAML changed from .yaml to .yml, for instance, yet Perl itself has many files with long extensions -- runtime.porting, for example. It'd be nice to have a standard test for valid "portable" path names. Does such a test exist? I noticed Archive::Any has is_impolite() and is_naughty() but didn't see any checks for basic path name validity. BTW, is Archive::Any a "dead camel"? /-\ http://search.yahoo.com.au - Yahoo! Search - Looking for more? Try the new Yahoo! Search