Depending on what you are trying to do, you can hack your way around "Module Unloading".

... ## save data, ignore if you are archiving something already on disk my $blah = $tmp_dir . $$ . '.tmp'; open( TMP, ">$blah" ) or die; print TMP $data; close( TMP ); ## run another archiving script unshift( @archive_args, $blah ) my $is_archived = system( $perl, $archiving_script, @archive_args ); ## read archive, copy it, move it, unlink it, etc. ...

Like I said, it is a hack. There are several things to keep in mind, like security, data integrity, your app will "freeze" until the system call returns, and you are only freeing memory used by Archive::Zip( not memory used by the data itself ).

I hope this helps a little.

Will perl for money
JJ Knitis
(901) 756-7693
gt8073a@industrialmusic.com


In reply to Re: module unload by gt8073a
in thread module unload by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.