[ic] reading a session
Tue, 29 Aug 2000 18:36:56 +0200 (CEST)
On 29 Aug, Stefan Hornburg wrote:
> Mathias Picker <email@example.com> writes:
>> On 29 Aug, Stefan Hornburg wrote:
>> > Mathias Picker <firstname.lastname@example.org> writes:
>> > [...]
>> >> > Then in your retrieve (which must be a Global usertag), do something like:
>> >> >
>> >> > my $safe = new Safe;
>> >> > my $sess_string = $Tag->file("tmp/$id_to_retrieve.save");
>> >> > my $session_ref = $safe->reval($sess_string);
>> >> And what does this get me?? What is $session_ref, can I make it to my
>> >> session, so route_order(...) works?
>> > Perl code => String representation => File
>> > => String representation => Perl code
>> > $session_ref is as any other session.
>> So, can I say $Vend::Session = $sess_string ???? Seems not (I tried) How
>> do I set it to be the current session?
> $Vend::Session = $session_ref
> makes probably more sense (just an assumption based on Mikes example code).
YesYes, I just wrote my var name instead of mikes. But it just won't
If I say:
#$Vend::Session = $sess_string; # won't work
#$Vend::Session = ref $sess_string; # won't work
# try this from Session.pm
$Vend::Session = ref $sess_string ? $sess_string : evalr($sess_string);
die "Could not eval sess_string from session dbm: $@\n" if $@;
I can see the "Setting Session" log line (and, before this, see that the
session is retrieved) but never the "Session set!" line. No error, does
not die... Processing seems to stop right there.
Geschäftsführer Gesellschaft für Wissens re/prä sentation mbH
Fon +49 89 / 540 7425-1
Fax +49 89 / 540 7425-9