summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElizabeth Mattijsen <liz@dijkmat.nl>2002-07-10 23:13:52 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2002-07-10 20:24:47 +0000
commit385e1f9fd66a9146b7463c05d27e5028541ba2f1 (patch)
tree917b8d02fa529fb5ebe85b2543755d2843a4a3a0
parent415c47386cbaaeba799eb4450916189f62200e8b (diff)
downloadperl-385e1f9fd66a9146b7463c05d27e5028541ba2f1.tar.gz
[DOC PATCH] some doc nits after 17463
Message-Id: <4.2.0.58.20020710211105.032546d0@mickey.dijkmat.nl> p4raw-id: //depot/perl@17470
-rw-r--r--ext/PerlIO/via/via.pm2
-rw-r--r--lib/PerlIO/via/QuotedPrint.pm22
-rw-r--r--pod/perldelta.pod2
-rw-r--r--pod/perliol.pod12
4 files changed, 21 insertions, 17 deletions
diff --git a/ext/PerlIO/via/via.pm b/ext/PerlIO/via/via.pm
index cab00fabd6..cca09d8f50 100644
--- a/ext/PerlIO/via/via.pm
+++ b/ext/PerlIO/via/via.pm
@@ -23,7 +23,7 @@ The PerlIO::via module allows you to develop PerlIO layers in Perl, without
having to go into the nitty gritty of programming C with XS as the interface
to Perl.
-One example module, L<PerlIO::via::QuotedPrint>, is include with Perl
+One example module, L<PerlIO::via::QuotedPrint>, is included with Perl
5.8.0, and more example modules are available from CPAN, such as
L<PerlIO::via::StripHTML> and L<PerlIO::via::Base64>. The
PerlIO::via::StripHTML for instance, allows you to say:
diff --git a/lib/PerlIO/via/QuotedPrint.pm b/lib/PerlIO/via/QuotedPrint.pm
index 3acf45c3fd..e258830668 100644
--- a/lib/PerlIO/via/QuotedPrint.pm
+++ b/lib/PerlIO/via/QuotedPrint.pm
@@ -1,22 +1,26 @@
package PerlIO::via::QuotedPrint;
-# Make sure we do things by the book
# Set the version info
+# Make sure we do things by the book from now on
+$VERSION = '0.04';
use strict;
-$PerlIO::via::QuotedPrint::VERSION = 0.01;
# Make sure the encoding/decoding stuff is available
use MIME::QuotedPrint (); # no need to pollute this namespace
+# Satisfy -require-
+
+1;
+
#-----------------------------------------------------------------------
# IN: 1 class to bless with
# 2 mode string (ignored)
# 3 file handle of PerlIO layer below (ignored)
# OUT: 1 blessed object
-sub PUSHED { bless [],$_[0] } #PUSHED
+sub PUSHED { bless \*PUSHED,$_[0] } #PUSHED
#-----------------------------------------------------------------------
# IN: 1 instantiated object (ignored)
@@ -45,10 +49,6 @@ sub WRITE {
(print {$_[2]} MIME::QuotedPrint::encode_qp($_[1])) ? length($_[1]) : -1;
} #WRITE
-# Satisfy -require-
-
-1;
-
__END__
=head1 NAME
@@ -59,10 +59,10 @@ PerlIO::via::QuotedPrint - PerlIO layer for quoted-printable strings
use PerlIO::via::QuotedPrint;
- open( my $in,'<Via(PerlIO::via::QuotedPrint)','file.qp' )
+ open( my $in,'<:via(QuotedPrint)','file.qp' )
or die "Can't open file.qp for reading: $!\n";
- open( my $out,'>Via(PerlIO::via::QuotedPrint)','file.qp' )
+ open( my $out,'>:via(QuotedPrint)','file.qp' )
or die "Can't open file.qp for writing: $!\n";
=head1 DESCRIPTION
@@ -73,8 +73,8 @@ from a handle, and it will encode as quoted-printable while writing to a handle.
=head1 SEE ALSO
-L<PerlIO::via>, L<MIME::QuotedPrint>, L<PerlIO::via::Base64>, L<PerlIO::via::MD5>,
-L<PerlIO::via::StripHTML>.
+L<PerlIO::via>, L<MIME::QuotedPrint>, L<PerlIO::via::Base64>,
+L<PerlIO::via::MD5>, L<PerlIO::via::StripHTML>, L<PerlIO::via::Rotate>.
=head1 COPYRIGHT
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index f43eb6cd2b..47b6e73e80 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -1023,7 +1023,7 @@ C<PerlIO::via::QuotedPrint>, by Elizabeth Mattijsen, is an example
of a C<PerlIO::via> class:
use PerlIO::via::QuotedPrint;
- open($fh,">Via(PerlIO::via::QuotedPrint)",$path);
+ open($fh,">:via(QuotedPrint)",$path);
This will automatically convert everything output to C<$fh> to
Quoted-Printable. See L<PerlIO::via> and L<PerlIO::via::QuotedPrint>.
diff --git a/pod/perliol.pod b/pod/perliol.pod
index 08ea7c6d61..6a40570271 100644
--- a/pod/perliol.pod
+++ b/pod/perliol.pod
@@ -782,23 +782,27 @@ called thus:
open( $fh, "<:encoding(iso-8859-7)", $pathname );
-=item ":Scalar"
+=item ":scalar"
Provides support for reading data from and writing data to a scalar.
- open( $fh, ":Scalar", \$scalar );
+ open( $fh, "+<:scalar", \$scalar );
When a handle is so opened, then reads get bytes from the string value
of I<$scalar>, and writes change the value. In both cases the position
in I<$scalar> starts as zero but can be altered via C<seek>, and
determined via C<tell>.
-=item ":Via"
+Please note that this layer is implied when calling open() thus:
+
+ open( $fh, "+<", \$scalar );
+
+=item ":via"
Provided to allow layers to be implemented as Perl code. For instance:
use PerlIO::via::StripHTML;
- open( my $fh, ">:Via(StripHTML)", "index.html" );
+ open( my $fh, "<:via(StripHTML)", "index.html" );
See L<PerlIO::via> for details.