Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Default Hash Key

by jethro (Monsignor)
on May 02, 2008 at 14:04 UTC ( [id://684172]=note: print w/replies, xml ) Need Help??


in reply to Re: Default Hash Key
in thread Default Hash Key

If I read the doc of Tie::Hash correctly, you should have used
use Tie::StdHash qw( );
Tie::Hash only provides a subset of the necessary hash methods

Replies are listed 'Best First'.
Re^3: Default Hash Key
by ikegami (Patriarch) on May 02, 2008 at 21:52 UTC

    Tie::Hash, Tie::StdHash and Tie::ExtraHash are in Tie/Hash.pm, thus use Tie::Hash; is needed even if you want to use the Tie::StdHash class.

    >perl -e"use Tie::StdHash qw( );" Can't locate Tie/StdHash.pm in @INC (@INC contains: c:/Progs/perl588/l +ib c:/Progs/perl588/site/lib .) at -e line 1. BEGIN failed--compilation aborted at -e line 1.

    Notice that I didn't actually inherit from Tie::Hash. I didn't inherit from Tie::StdHash either because it doesn't provide any means to store object attributes such as the default value. Tie::ExtraHash does.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2025-05-22 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.