X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperltie.pod;h=c6eb7156ce38ca40f0f8afdf0d01f198c52a7892;hb=1b3f7d2103791ceee4a17b0f9f5860baa1512c7a;hp=847340d182ed6f901ccfe562042c2ce9035260fc;hpb=5aabfad66ac77650f584e2f07af91645e19fe296;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perltie.pod b/pod/perltie.pod index 847340d..c6eb715 100644 --- a/pod/perltie.pod +++ b/pod/perltie.pod @@ -611,7 +611,7 @@ use the each() function to iterate over such. Example: This is partially implemented now. A class implementing a tied filehandle should define the following -methods: TIEHANDLE, at least one of PRINT, READLINE, GETC, or READ, +methods: TIEHANDLE, at least one of PRINT, PRINTF, READLINE, GETC, or READ, and possibly DESTROY. It is especially useful when perl is embedded in some other program, @@ -634,12 +634,26 @@ hold some internal information. =item PRINT this, LIST -This method will be triggered every time the tied handle is printed to. +This method will be triggered every time the tied handle is printed to +with the C function. Beyond its self reference it also expects the list that was passed to the print function. sub PRINT { $r = shift; $$r++; print join($,,map(uc($_),@_)),$\ } +=item PRINTF this, LIST + +This method will be triggered every time the tied handle is printed to +with the C function. +Beyond its self reference it also expects the format and list that was +passed to the printf function. + + sub PRINTF { + shift; + my $fmt = shift; + print sprintf($fmt, @_)."\n"; + } + =item READ this LIST This method will be called when the handle is read from via the C @@ -825,11 +839,11 @@ hashes) to a dbm file. The first problem is that all but GDBM and Berkeley DB have size limitations, but beyond that, you also have problems with how references are to be represented on disk. One experimental module that does attempt to address this need partially is the MLDBM -module. Check your nearest CPAN site as described in L for +module. Check your nearest CPAN site as described in L for source code to MLDBM. =head1 AUTHOR Tom Christiansen -TIEHANDLE by Sven Verdoolaege > +TIEHANDLE by Sven Verdoolaege > and Doug MacEachern >