in reply to tie and bless - guidence needed
bless $ref,CLASSmakes $ref an instance of CLASS. Class methods are available through $ref->method. If you run:
you see the way the ref is tagged to support its membership$ perl -mCGI -e '$\="\n";$c={};print $c;print bless $c,CGI' HASH(0x80eaae8) CGI=HASH(0x80eaae8) $
tieis a form of aliasing simple variables to more complex underlying structures, so that assigning a value to a variable might hide a database update. That is done with not too occult magic, through defining methods with names like FETCH and STORE, as well as TIEARRAY, etc.
Better introductions, with details and examples, are at
both in the Tutorials section.After Compline,
Zaxo
|
|---|