Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Tie::Filesystem - request for review

by Aragorn (Curate)
on Jun 23, 2004 at 07:48 UTC ( #368964=note: print w/ replies, xml ) Need Help??


in reply to Tie::Filesystem - request for review

To make it nice and portable, consider using File::Spec (or its functional sibling File::Spec::Functions. Using that, you don't have to have the DIR_SEP variable, as you can use catdir. For example:

my $pathname = $self->{'root'} . $DIR_SEP . $leaf;
becomes
my $pathname = catdir($self->{'root'}, $leaf);
Also
return -e ($self-{'root'} . $DIR_SEP . $leaf);
will probably not do what you expect. New testcase ;-)

Arjen


Comment on Re: Tie::Filesystem - request for review
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://368964]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2015-07-31 01:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls