|
|
| more useful options | |
| PerlMonks |
Re: SSI Emulation Libraryby chipmunk (Parson) |
| on Jan 13, 2001 at 21:06 UTC ( #51608=note: print w/ replies, xml ) | Need Help?? |
|
Three points, after a quick scan through your code: Using $^O =~ /win/ to detect Windows systems will fail to detect 'MSWin32' as a Windows system, and will falsely detect 'Darwin'. This was an issue for the CGI module on p5p recently; the recommended solution was $^O =~ /^MSWin/i. Removing a trailing slash from a path can be done more easily with a regex than with substr: However, / can be used as a directory separator in Perl on Windows, and there are other operating systems, besides Unix and Windows, and they don't all use slash or backslash as the directory separator. File::Spec would be a portable way of dealing with this issue. Finally... Have you tested your code with HTML that contains multiple SSI directives on the same line?
In Section
Code Catacombs
|
|
||||||||||||||||||||||