No, it's not true. It would be done as Fletch says. Seems like it was planned at the synopsis writing time, but hasn't been implemented. But let's see if there's some magic.

A private copy in my $PERL5LIB directory, patched as follows...

--- /usr/lib/perl5/site_perl/5.8.8/MojoX/Session.pm +++ /home/shmem/comp/perl/lib/MojoX/Session.pm @@ -81,7 +81,7 @@ sub flush { my $self = shift; - +warn "LAST ORDERS. FASTEN SEAT BELTS...\n"; return unless $self->sid && !$self->_is_flushed; if ($self->is_expired && $self->_is_stored) {

... used within this script...

use MojoX::Session; my $session = MojoX::Session->new; $session->create(); $session->data('foo' => 'bar'); warn $session->data('foo'),$/; undef $session; warn "did we land yet?\n"; my $session = MojoX::Session->new; $session->create(); $session->data('bar' => 'baz'); print $session->data('bar'),$/; $session->flush(); warn "end-of that.\n"

... produces...

bar did we land yet? baz LAST ORDERS. FASTEN SEAT BELTS... end-of that.

... which shows that just undefining $session doesn't call flush(). How could it? there's no DESTROY method.


In reply to Re: A question about Mojo's "mojo" by shmem
in thread A question about Mojo's "mojo" by locked_user sundialsvc4

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.