ftumsh has asked for the wisdom of the Perl Monks concerning the following question:
Lo,
Given that:
How come the below really screws up the hash:$self->client->param( 'usr_id' ) returns 1 $self->client->param( 'edit_usr_id' ) returns undef, or something $self->client->param( 'mode' ) returns 'add'
And yet doing it this way is as expected:$self->log(LOGDEBUG, 'EDIT_USER: '. Dumper( { state => 'db_user', usr_id => $self->client->param( 'usr_id' ), edit_usr_id => $self->client->param( 'edit_usr_id' ), mode => $self->client->param( 'mode' ) })); EDIT_USER: $VAR1 = { 'add' => undef, 'usr_id' => '1', 'edit_usr_id' => 'mode', 'state' => 'db_user' };
my $a = $self->client->param( 'edit_usr_id' ); $self->log(LOGDEBUG, 'EDIT_USER: '. Dumper( { state => 'db_user', usr_id => $self->client->param( 'usr_id' ), edit_usr_id => $a, mode => $self->client->param( 'mode' ) })); EDIT_USER: $VAR1 = { 'usr_id' => '1', 'mode' => 'add', 'edit_usr_id' => undef, 'state' => 'db_user' };
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: mysterious hash ref result
by BrowserUk (Patriarch) on Jan 12, 2007 at 13:44 UTC | |
by ftumsh (Scribe) on Jan 12, 2007 at 14:15 UTC | |
by Errto (Vicar) on Jan 12, 2007 at 20:12 UTC | |
Re: mysterious hash ref result
by Util (Priest) on Jan 12, 2007 at 14:00 UTC | |
Re: mysterious hash ref result
by ferreira (Chaplain) on Jan 12, 2007 at 13:48 UTC | |
Re: mysterious hash ref result
by Anonymous Monk on Jan 12, 2007 at 13:45 UTC | |
Re: mysterious hash ref result
by Herkum (Parson) on Jan 12, 2007 at 13:31 UTC |
Back to
Seekers of Perl Wisdom