Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Access reference of a tied hash within TIEHASH

by tobyink (Canon)
on Mar 18, 2013 at 22:13 UTC ( [id://1024164]=note: print w/replies, xml ) Need Help??


in reply to Access reference of a tied hash within TIEHASH

No, not unless you pass it in manually.

use v5.14; package MyHash { use Data::Dumper; use Tie::Hash (); use base "Tie::StdHash"; sub TIEHASH { my $class = shift; print Dumper @_; $class->SUPER::TIEHASH(@_); } } my %hash; tie %hash, MyHash => \%hash;
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-23 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found