in reply to Re^3: Perl Best Practices book: is this one a best practice or a dodgy practice?
in thread Perl Best Practices book: is this one a best practice or a dodgy practice?
If you want to be a bit more thorough, you could do something like
My criteria for good software:
Yes, there are ways to fool this. Ideally, there would be some is_same_real_file() in File::Spec that would take into account symlinks, case sensitivity, volume names, and the like.use File::Spec::Functions( rel2abs canonpath ); my $full_inpath = canonpath( rel2abs( $infile ) ); my $full_outpath = canonpath( rel2abs( $outfile ) ); if ( $full_inpath eq $full_outpath ) { ... }
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
In Section
Meditations