Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: mysterious hash ref result

by ferreira (Chaplain)
on Jan 12, 2007 at 13:48 UTC ( #594386=note: print w/replies, xml ) Need Help??

in reply to mysterious hash ref result

I could not write an example that reproduced this exact behavior, but in the construction:

{ state => 'db_user', usr_id => $self->client->param( 'usr_id' ), edit_usr_id => $self->client->param( 'edit_usr_id' ), mode => $self->client->param( 'mode' ) }
the methods are called in list context, and they may mess with the result if they do not return a list with an odd number of elements. For example,
$ perl -MData::Dump=dump -e ' sub f { (1, 2) }; print dump({ a => f, b => 1 }) '
{ 1 => undef, 2 => "b", a => 1 }

As I told, I could not get the same behavior returning an empty list, but I am still investigating. Maybe if you omitted parts in your explanation, this case fits.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://594386]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2020-02-21 16:49 GMT
Find Nodes?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?

    Results (96 votes). Check out past polls.