I'm not sure you can do this in Dancer1 without an intermediate variable, e.g.

my $session = session 'customer';
$session->{lang} = 'gibberish';
session 'customer' => $session;

In Dancer2, you can do

session('customer')->{lang} = 'newspeak';

and it appears to work. (note the use of the assignment operator instead of the fat comma).


On Mon, Aug 11, 2014 at 4:14 AM, fabioniguel3@gmail.com <fabioniguel3@gmail.com> wrote:
guys, i have stored a session like this:

    $customer->{id} = $result->[0]->{id};
    $customer->{name} = decode("utf-8", $result->[0]->{name});
    $customer->{email} = $result->[0]->{email};
    $customer->{points} = $result->[0]->{points};
    $customer->{lang} = $result->[0]->{lang};
    session  customer => $customer;

Later i will need to change the lang value.

How do i change it?

i've tryed
 session ("customer")->{lang} => 'other_value';


_______________________________________________
dancer-users mailing list
dancer-users@dancer.pm
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users