perl bug File::Basename and Perl's nature
Walter Roberson
roberson at ibd.nrc-cnrc.gc.ca
Mon Jan 26 13:32:42 EST 2004
More information about the Python-list mailing list
Mon Jan 26 13:32:42 EST 2004
- Previous message (by thread): perl bug File::Basename and Perl's nature
- Next message (by thread): perl bug File::Basename and Perl's nature
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In article <7fe97cc4.0401260943.2442ba4e at posting.google.com>, Xah Lee <xah at xahlee.org> wrote: :* when it gets one to think about design, File::Basename is one :fucking turd. The suffix list should not be regex in the first fucking :place. (it shouldn't even require a suffix list by default). The need :to feed it OS type (fileparse_set_fstype($os)) is fucking defeating :the main point of using this module. You don't -need- to feed it the OS type: it defaults to using the information from the currently running OS ($^O). The fileparse_set_fstype is there so that one can write routines targetted at specific OSes. For example, one could import a VMS log file onto a Unix system and parse it there without having to roll one's own filename parsing routines. :The suffix list should not be regex in the first fucking :place. Why not? Anyone who read the documentation would see immediately that regexes were called for in that position. Perhaps -you- don't need the flexibility of having regexes there, but is that any reason to deny other people the flexibility? :it shouldn't even require a suffix list by default It doesn't. If you don't pass it a suffix list, then that will be treated as the empty array, and suffixes will not be broken out. Are you perhaps saying that on Unix systems, it should default to using '\.[^.]*$' as the suffix list, thus breaking out from the last period onwards? -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald Knuth
- Previous message (by thread): perl bug File::Basename and Perl's nature
- Next message (by thread): perl bug File::Basename and Perl's nature
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list