Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: how to name an anonymous reference (dictionary/hash)

by beech (Parson)
on Dec 18, 2017 at 03:36 UTC ( [id://1205768]=note: print w/replies, xml ) Need Help??


in reply to how to name an anonymous reference

Perhaps there is a different way to achieve what I am trying to do?

Hi,

Maybe you can use a dictionary of types?

my %type; $type{ENUM} = 9; # :O ?? ;) $type{ULONG} = 23; $type{IdKind} = [ $type{ULONG}, "value", undef ]; $type{AutoIdKind} = [ $type{ENUM}, "AutoidKind", [ "SEQUENTIAL", "HASH +" ]]; my @annotations = ( [ id => $type{IdKind}, ], [ autoid => $type{AutoIdKind}, [ $type{AutoIdKind}, value => 'HASH' ] +], ); dd \%type, \@annotations; __END__

???

AddAnnotation( autoid => Type('AutoIdKind'), [ Type('AutoIdKind'), val +ue => 'HASH' ] );

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-23 22:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found