in reply to Re: Confused Still by Hash Refs
in thread Confused Still by Hash Refs

Thank you, sir. That handled the error in test-auth5.cgi at line 379, the "odd number of elements in hash assignment" piece. It leaves me with the hash ref error in the module I'm trying to use, suggesting to me that I'm not sending DBIx::UserDB its arguments in exactly the right manner, somehow. Any further ideas? -- Hugh

Replies are listed 'Best First'.
Re^3: Confused Still by Hash Refs
by g0n (Priest) on Feb 03, 2006 at 12:33 UTC
    Yep, take a look at DBIx::Userdb. The syntax is:

    group_create(\%hash);

    and you're doing:

    $userdb->group_create ( $group->{groupname} )

    $group->{groupname} isn't a hashref, in fact AFAICT it is the value 'wheel'. Try this:

    $userdb->group_create($group);

    or

    $userdb->group_create({groupname=>$group->{groupname}});

    if you don't want to pass the rest of the contents of %$group in.

    --------------------------------------------------------------

    "If there is such a phenomenon as absolute evil, it consists in treating another human being as a thing."
    John Brunner, "The Shockwave Rider".