[Kc] quick and dirty hash that echoes the keys as the values

David Nicol davidnicol at gmail.com
Mon Apr 3 13:53:29 PDT 2017


 {
     package QUAD_echo_hash;
     sub TIEHASH{ bless {} }
     sub FIRSTKEY { undef }
     # return the text of the key
     sub FETCH { $_[1] }
 }
 tie my %echo_hash, 'QUAD_echo_hash';

handy for writing the loader after the accessor is complete.


-- 
the courts of justice shall be open to every person, and certain remedy
afforded for every injury to person, property or character, and that right
and justice shall be administered without sale, denial or delay. --
Missouri Constitution, Art. I, Sec. 14
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/kc/attachments/20170403/b78acc01/attachment.html>


More information about the kc mailing list