summaryrefslogtreecommitdiff
path: root/ext/PerlIO
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-07-09 21:31:44 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-07-09 21:31:44 +0000
commite934609f7db1163b003ba7314f8d52ebfc1e2f12 (patch)
tree74e172d331579be10555103b1caf5cdfd80b687d /ext/PerlIO
parentcaf25f3be4a66b8fbb51db2cfdfa658f6b9704e7 (diff)
downloadperl-e934609f7db1163b003ba7314f8d52ebfc1e2f12.tar.gz
Change PerlIO::Scalar and Via to scalar and via.
p4raw-id: //depot/perl@17454
Diffstat (limited to 'ext/PerlIO')
-rw-r--r--ext/PerlIO/scalar/Makefile.PL (renamed from ext/PerlIO/Scalar/Makefile.PL)4
-rw-r--r--ext/PerlIO/scalar/scalar.pm (renamed from ext/PerlIO/Scalar/Scalar.pm)8
-rw-r--r--ext/PerlIO/scalar/scalar.xs (renamed from ext/PerlIO/Scalar/Scalar.xs)4
-rw-r--r--ext/PerlIO/t/via.t20
-rw-r--r--ext/PerlIO/via/Makefile.PL (renamed from ext/PerlIO/Via/Makefile.PL)4
-rw-r--r--ext/PerlIO/via/via.pm (renamed from ext/PerlIO/Via/Via.pm)46
-rw-r--r--ext/PerlIO/via/via.xs (renamed from ext/PerlIO/Via/Via.xs)6
7 files changed, 46 insertions, 46 deletions
diff --git a/ext/PerlIO/Scalar/Makefile.PL b/ext/PerlIO/scalar/Makefile.PL
index 9d97e4adfc..11a9ee538c 100644
--- a/ext/PerlIO/Scalar/Makefile.PL
+++ b/ext/PerlIO/scalar/Makefile.PL
@@ -1,7 +1,7 @@
use ExtUtils::MakeMaker;
WriteMakefile(
- NAME => "PerlIO::Scalar",
+ NAME => "PerlIO::scalar",
MAN3PODS => {}, # Pods will be built by installman.
- VERSION_FROM => 'Scalar.pm',
+ VERSION_FROM => 'scalar.pm',
);
diff --git a/ext/PerlIO/Scalar/Scalar.pm b/ext/PerlIO/scalar/scalar.pm
index e086032507..d75d3706d7 100644
--- a/ext/PerlIO/Scalar/Scalar.pm
+++ b/ext/PerlIO/scalar/scalar.pm
@@ -1,13 +1,13 @@
-package PerlIO::Scalar;
+package PerlIO::scalar;
our $VERSION = '0.01';
use XSLoader ();
-XSLoader::load 'PerlIO::Scalar';
+XSLoader::load 'PerlIO::scalar';
1;
__END__
=head1 NAME
-PerlIO::Scalar - support module for in-memory IO.
+PerlIO::scalar - support module for in-memory IO.
=head1 SYNOPSIS
@@ -15,7 +15,7 @@ PerlIO::Scalar - support module for in-memory IO.
=head1 DESCRIPTION
-C<PerlIO::Scalar> only exists to use XSLoader to load C code that provides
+C<PerlIO::scalar> only exists to use XSLoader to load C code that provides
support for treating a scalar as an "in memory" file.
All normal file operations can be performed on the handle. The scalar
diff --git a/ext/PerlIO/Scalar/Scalar.xs b/ext/PerlIO/scalar/scalar.xs
index 5bbc11951e..f505c89f5d 100644
--- a/ext/PerlIO/Scalar/Scalar.xs
+++ b/ext/PerlIO/scalar/scalar.xs
@@ -264,7 +264,7 @@ PerlIOScalar_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags)
PerlIO_funcs PerlIO_scalar = {
sizeof(PerlIO_funcs),
- "Scalar",
+ "scalar",
sizeof(PerlIOScalar),
PERLIO_K_BUFFERED|PERLIO_K_RAW,
PerlIOScalar_pushed,
@@ -296,7 +296,7 @@ PerlIO_funcs PerlIO_scalar = {
#endif /* Layers available */
-MODULE = PerlIO::Scalar PACKAGE = PerlIO::Scalar
+MODULE = PerlIO::scalar PACKAGE = PerlIO::scalar
PROTOTYPES: ENABLE
diff --git a/ext/PerlIO/t/via.t b/ext/PerlIO/t/via.t
index 85f5b8e6be..d40e85e365 100644
--- a/ext/PerlIO/t/via.t
+++ b/ext/PerlIO/t/via.t
@@ -20,14 +20,14 @@ my $fh;
my $a = join("", map { chr } 0..255) x 10;
my $b;
-BEGIN { use_ok('PerlIO::Via::QuotedPrint'); }
+BEGIN { use_ok('PerlIO::via::QuotedPrint'); }
-ok( !open($fh,"<Via(PerlIO::Via::QuotedPrint)", $tmp), 'open QuotedPrint for input fails');
-ok( open($fh,">Via(PerlIO::Via::QuotedPrint)", $tmp), 'open QuotedPrint for output');
+ok( !open($fh,"<via(PerlIO::via::QuotedPrint)", $tmp), 'open QuotedPrint for input fails');
+ok( open($fh,">via(PerlIO::via::QuotedPrint)", $tmp), 'open QuotedPrint for output');
ok( (print $fh $a), "print to output file");
ok( close($fh), 'close output file');
-ok( open($fh,"<Via(PerlIO::Via::QuotedPrint)", $tmp), 'open QuotedPrint for input');
+ok( open($fh,"<via(PerlIO::via::QuotedPrint)", $tmp), 'open QuotedPrint for input');
{ local $/; $b = <$fh> }
ok( close($fh), "close input file");
@@ -45,7 +45,7 @@ is($a, $b, 'compare original data with filtered version');
print $fh "Hello\n";
close($fh);
- ok( ! open($fh,">Via(Unknown::Module)", $tmp), 'open Via Unknown::Module will fail');
+ ok( ! open($fh,">via(Unknown::Module)", $tmp), 'open via Unknown::Module will fail');
like( $warnings, qr/^Cannot find package 'Unknown::Module'/, 'warn about unknown package' );
# Now open normally again to see if we get right fileno
@@ -62,17 +62,17 @@ is($a, $b, 'compare original data with filtered version');
$warnings = '';
no warnings 'layer';
- ok( ! open($fh,">Via(Unknown::Module)", $tmp), 'open Via Unknown::Module will fail');
+ ok( ! open($fh,">via(Unknown::Module)", $tmp), 'open via Unknown::Module will fail');
is( $warnings, "", "don't warn about unknown package" );
}
my $obj = '';
sub Foo::PUSHED { $obj = shift; -1; }
-sub PerlIO::Via::Bar::PUSHED { $obj = shift; -1; }
-open $fh, '<:Via(Foo)', "foo";
+sub PerlIO::via::Bar::PUSHED { $obj = shift; -1; }
+open $fh, '<:via(Foo)', "foo";
is( $obj, 'Foo', 'search for package Foo' );
-open $fh, '<:Via(Bar)', "bar";
-is( $obj, 'PerlIO::Via::Bar', 'search for package PerlIO::Via::Bar' );
+open $fh, '<:via(Bar)', "bar";
+is( $obj, 'PerlIO::via::Bar', 'search for package PerlIO::via::Bar' );
END {
1 while unlink $tmp;
diff --git a/ext/PerlIO/Via/Makefile.PL b/ext/PerlIO/via/Makefile.PL
index d47ba9334e..deb401f5e2 100644
--- a/ext/PerlIO/Via/Makefile.PL
+++ b/ext/PerlIO/via/Makefile.PL
@@ -1,7 +1,7 @@
use ExtUtils::MakeMaker;
WriteMakefile(
- NAME => "PerlIO::Via",
+ NAME => "PerlIO::via",
MAN3PODS => {}, # Pods will be built by installman.
- VERSION_FROM => 'Via.pm',
+ VERSION_FROM => 'via.pm',
);
diff --git a/ext/PerlIO/Via/Via.pm b/ext/PerlIO/via/via.pm
index 6c4cd48d34..cab00fabd6 100644
--- a/ext/PerlIO/Via/Via.pm
+++ b/ext/PerlIO/via/via.pm
@@ -1,43 +1,43 @@
-package PerlIO::Via;
+package PerlIO::via;
our $VERSION = '0.01';
use XSLoader ();
-XSLoader::load 'PerlIO::Via';
+XSLoader::load 'PerlIO::via';
1;
__END__
=head1 NAME
-PerlIO::Via - Helper class for PerlIO layers implemented in perl
+PerlIO::via - Helper class for PerlIO layers implemented in perl
=head1 SYNOPSIS
- use PerlIO::Via::Layer;
- open($fh,"<:Via(Layer)",...);
+ use PerlIO::via::Layer;
+ open($fh,"<:via(Layer)",...);
use Some::Other::Package;
- open($fh,">:Via(Some::Other::Package)",...);
+ open($fh,">:via(Some::Other::Package)",...);
=head1 DESCRIPTION
-The PerlIO::Via module allows you to develop PerlIO layers in Perl, without
+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 include 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:
+L<PerlIO::via::StripHTML> and L<PerlIO::via::Base64>. The
+PerlIO::via::StripHTML for instance, allows you to say:
- use PerlIO::Via::StripHTML;
- open( my $fh, "<:Via(StripHTML)", "index.html" );
+ use PerlIO::via::StripHTML;
+ open( my $fh, "<:via(StripHTML)", "index.html" );
my @line = <$fh>;
to obtain the text of an HTML-file in an array with all the HTML-tags
automagically removed.
-Please note that if the layer is created in the PerlIO::Via:: namespace, it
-does B<not> have to be fully qualified. The PerlIO::Via module will prefix
-the PerlIO::Via:: namespace if the specified modulename does not exist as a
+Please note that if the layer is created in the PerlIO::via:: namespace, it
+does B<not> have to be fully qualified. The PerlIO::via module will prefix
+the PerlIO::via:: namespace if the specified modulename does not exist as a
fully qualified module name.
=head1 EXPECTED METHODS
@@ -45,8 +45,8 @@ fully qualified module name.
To create a Perl module that implements a PerlIO layer in Perl (as opposed to
in C using XS as the interface to Perl), you need to supply some of the
following subroutines. It is recommended to create these Perl modules in the
-PerlIO::Via:: namespace, so that they can easily be located on CPAN and use
-the default namespace feature of the PerlIO::Via module itself.
+PerlIO::via:: namespace, so that they can easily be located on CPAN and use
+the default namespace feature of the PerlIO::via module itself.
Please note that this is an area of recent development in Perl and that the
interface described here is therefor still subject to change (and hopefully
@@ -172,15 +172,15 @@ value of FILL or READ.
=head1 EXAMPLES
-Check the PerlIO::Via:: namespace on CPAN for examples of PerlIO layers
+Check the PerlIO::via:: namespace on CPAN for examples of PerlIO layers
implemented in Perl. To give you an idea how simple the implementation of
a PerlIO layer can look, as simple example is included here.
=head2 Example - a Hexadecimal Handle
-Given the following module, PerlIO::Via::Hex.pm:
+Given the following module, PerlIO::via::Hex.pm:
- package PerlIO::Via::Hex;
+ package PerlIO::via::Hex;
sub PUSHED
{
@@ -219,12 +219,12 @@ output to hexadecimal dump of the output bytes: for example "A" will
be converted to "41" (on ASCII-based machines, on EBCDIC platforms
the "A" will become "c1")
- use PerlIO::Via::Hex;
- open(my $fh, ">:Via(Hex)", "foo.hex");
+ use PerlIO::via::Hex;
+ open(my $fh, ">:via(Hex)", "foo.hex");
and the following code will read the hexdump in and convert it
on the fly back into bytes:
- open(my $fh, "<:Via(Hex)", "foo.hex");
+ open(my $fh, "<:via(Hex)", "foo.hex");
=cut
diff --git a/ext/PerlIO/Via/Via.xs b/ext/PerlIO/via/via.xs
index fb6718db33..0c247780b6 100644
--- a/ext/PerlIO/Via/Via.xs
+++ b/ext/PerlIO/via/via.xs
@@ -137,7 +137,7 @@ PerlIOVia_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg,
s->stash = gv_stashpvn(pkg, pkglen, FALSE);
if (!s->stash) {
s->obj =
- newSVpvn(Perl_form(aTHX_ "PerlIO::Via::%s", pkg),
+ newSVpvn(Perl_form(aTHX_ "PerlIO::via::%s", pkg),
pkglen + 13);
SvREFCNT_dec(arg);
s->stash = gv_stashpvn(SvPVX(s->obj), pkglen + 13, FALSE);
@@ -564,7 +564,7 @@ PerlIOVia_dup(pTHX_ PerlIO * f, PerlIO * o, CLONE_PARAMS * param,
PerlIO_funcs PerlIO_object = {
sizeof(PerlIO_funcs),
- "Via",
+ "via",
sizeof(PerlIOVia),
PERLIO_K_BUFFERED|PERLIO_K_DESTRUCT,
PerlIOVia_pushed,
@@ -596,7 +596,7 @@ PerlIO_funcs PerlIO_object = {
#endif /* Layers available */
-MODULE = PerlIO::Via PACKAGE = PerlIO::Via
+MODULE = PerlIO::via PACKAGE = PerlIO::via
PROTOTYPES: ENABLE;
BOOT: