On Wed, 2003-06-18 at 11:48, dorian wrote: > greetings all, > > i was wondering if anyone could tell me if the function perl_tie_hash > in perl_util.c in the mod_perl 1.27 source could be considered > "usual" reference material for binding a table-like object to a > hash(ref) in XS? if not, perchance someone could point me at some > literature (or source) on the subject?
Yes, or even more authoritative example can be found in man perlguts SV *mytie() { HV *hash; HV *stash; SV *tie; hash = newHV(); tie = newRV_noinc((SV*)newHV()); stash = gv_stashpv("MyTie", TRUE); sv_bless(tie, stash); hv_magic(hash, (GV*)tie, PERL_MAGIC_tied); newRV_noinc(hash); return hash; } > thanks in advance, > > .dorian -- -------------------------------------------------------------------------------- Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B) http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5 Q: It is impossible to make anything foolproof because fools are so ingenious. perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'
signature.asc
Description: This is a digitally signed message part