Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Automatically deleting selected directories on program exit

by polettix (Vicar)
on May 13, 2005 at 10:20 UTC ( [id://456660]=note: print w/replies, xml ) Need Help??


in reply to Automatically deleting selected directories on program exit

If I read well, the programmer is quite scared of someone breaking the interface - otherwise I don't understand why using this double-interface MyTemp/_Knob. I'd probably trust the user a little bit more and stick to _Knob directly, but that's a matter of taste.

Given the fact that it deals with temporary directories, I'd go a little further and encapsulate directory creation inside as well. In this way, you would reduce the risk that you create a temporary directory but forget to mark it as mortal (if you pass me the XS language). This makes me wonder if there's a CPAN module that already does this - if not, it's a good idea IMHO.

Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

Don't fool yourself.
  • Comment on Re: Automatically deleting selected directories on program exit

Replies are listed 'Best First'.
Re^2: Automatically deleting selected directories on program exit
by dragonchild (Archbishop) on May 13, 2005 at 12:54 UTC
    This makes me wonder if there's a CPAN module that already does this - if not, it's a good idea IMHO.

    Like File::Temp, which has been part of the core since before the Dawn of Time?


    • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
    • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"
      I knew it was a da*n1 good idea! :)

      1Dawn, of course.

      Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

      Don't fool yourself.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-25 06:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found