<%init> local *session; if ($r->uri =~ m/product|faq|finder|broadmarket|msp/gi) { my %c = Apache2::Cookie->fetch($r); my $session_id = exists $c{session_} ? $c{session_}->value : undef; eval { tie %session, 'Apache2::Session::File', $session_id, { Directory => '/var/sessions/data', LockDirectory => '/var/sessions/lock', }; }; if ($@) { die $@ unless $@ =~ /Object does not exist/; # Re-throw $m->redirect('/index.html'); } #expires => '+20m', Apache2::Cookie->new( $r, name => 'session_', value => $session{_session_id}, path => '/', )->bake; } #$m->out($r->as_string); $m->call_next;