Version v5.7.X Development release working toward v5.8
--------------
____________________________________________________________________________
+[ 17439] By: jhi on 2002/07/09 13:55:16
+ Log: Empty lines.
+ Branch: perl
+ ! MANIFEST
+____________________________________________________________________________
+[ 17438] By: jhi on 2002/07/09 13:48:44
+ Log: Integrate perlio:
+
+ [ 17431]
+ SuSE 8.0 at least needs hints to use -lgdbm for ODBM_File
+
+ [ 17432]
+ Core-dump prevention for
+ open PIPE, "-|:stdio", "cat /etc/motd";
+ (root cause not yet fixed).
+
+ [ 17433]
+ Special case :stdio pushed method so that "-|:stdio" does
+ not have an uninitialized layer on top.
+
+ [ 17435]
+ Call $encoding->decode($sv) without a $chk argument.
+ This fixes modification of readonly value under use encoding().
+ Not a final fix as it does not warn on failed decode.
+
+ [ 17437]
+ perldiag patch for implied open of STDIN/STDOUT/STDERR
+ in wrong mode.
+ Branch: perl
+ +> ext/ODBM_File/hints/linux.pl
+ !> MANIFEST perlio.c pod/perldiag.pod sv.c
+____________________________________________________________________________
+[ 17437] By: nick on 2002/07/09 13:42:06
+ Log: perldiag patch for implied open of STDIN/STDOUT/STDERR
+ in wrong mode.
+ Branch: perlio
+ ! pod/perldiag.pod
+____________________________________________________________________________
+[ 17436] By: jhi on 2002/07/09 13:05:43
+ Log: Subject: [ID 20020708.001] makedepend problem (output of cppstdin garbled)
+ From: Hans Ranke <Hans.Ranke@ei.tum.de>
+ Date: Mon, 8 Jul 2002 16:17:00 +0200 (MET DST)
+ Message-Id: <5.8.0_12541_1026136670@regency>
+ Branch: perl
+ ! makedepend.SH
+____________________________________________________________________________
+[ 17435] By: nick on 2002/07/09 12:38:01
+ Log: Call $encoding->decode($sv) without a $chk argument.
+ This fixes modification of readonly value under use encoding().
+ Not a final fix as it does not warn on failed decode.
+ Branch: perlio
+ ! sv.c
+____________________________________________________________________________
+[ 17434] By: jhi on 2002/07/09 11:50:41
+ Log: Subject: [DOC PATCH] perlre, minor error
+ From: "Steffen Mueller" <xyey9001@sneakemail.com>
+ Date: Tue, 9 Jul 2002 02:23:33 +0200
+ Message-ID: <20020709002024.28399.qmail@onion.perl.org>
+ Branch: perl
+ ! pod/perlre.pod
+____________________________________________________________________________
+[ 17433] By: nick on 2002/07/09 11:42:32
+ Log: Special case :stdio pushed method so that "-|:stdio" does
+ not have an uninitialized layer on top.
+ Branch: perlio
+ ! perlio.c
+____________________________________________________________________________
+[ 17432] By: nick on 2002/07/09 09:38:45
+ Log: Core-dump prevention for
+ open PIPE, "-|:stdio", "cat /etc/motd";
+ (root cause not yet fixed).
+ Branch: perlio
+ ! perlio.c
+____________________________________________________________________________
+[ 17431] By: nick on 2002/07/09 08:01:54
+ Log: SuSE 8.0 at least needs hints to use -lgdbm for ODBM_File
+ Branch: perlio
+ + ext/ODBM_File/hints/linux.pl
+ ! MANIFEST
+____________________________________________________________________________
+[ 17430] By: nick on 2002/07/09 07:59:06
+ Log: Integrate mainline
+ Branch: perlio
+ +> ext/MIME/Base64/t/quoted-print.t lib/Math/BigInt/t/bare_mif.t
+ - ext/MIME/Base64/t/qp.t
+ !> (integrate 48 files)
+____________________________________________________________________________
+[ 17429] By: jhi on 2002/07/09 00:17:49
+ Log: MIME::QuotedPrint is for bytes only; from Gisle.
+ Branch: perl
+ ! ext/MIME/Base64/QuotedPrint.pm
+ ! ext/MIME/Base64/t/quoted-print.t
+____________________________________________________________________________
+[ 17428] By: jhi on 2002/07/08 23:26:49
+ Log: Subject: [ID 20020708.003] File::Spec::Unix::tmpdir automagically creates $ENV{TMPDIR}
+ From: Diab Jerius <dj@head-cfa.harvard.edu>
+ Date: Mon, 8 Jul 2002 18:44:12 -0400 (EDT)
+ Message-Id: <200207082244.g68MiDY22791@pelf.harvard.edu>
+ Branch: perl
+ ! lib/File/Spec/Unix.pm
+____________________________________________________________________________
+[ 17427] By: jhi on 2002/07/08 23:17:21
+ Log: Subject: patch against t/op/magic.t
+ From: Jim Cromie <jcromie@divsol.com>
+ Date: Mon, 08 Jul 2002 19:23:38 -0400
+ Message-ID: <3D2A1EFA.8050603@divsol.com>
+ Branch: perl
+ ! t/op/magic.t
+____________________________________________________________________________
+[ 17426] By: jhi on 2002/07/08 21:38:24
+ Log: Subject: [DOC PATCH] Thread::Signal.pm
+ From: Elizabeth Mattijsen <liz@dijkmat.nl>
+ Date: Mon, 08 Jul 2002 23:40:32 +0200
+ Message-Id: <4.2.0.58.20020708233854.024783b0@mickey.dijkmat.nl>
+ Branch: perl
+ ! ext/Thread/Thread/Signal.pm
+____________________________________________________________________________
+[ 17425] By: jhi on 2002/07/08 20:10:15
+ Log: Integrate maint patches #17421, #17424:
+
+ on platforms like HP-UX that are subject to the ARG_ZERO_IS_SCRIPT
+ hack, $^X was improperly set to the script name when the script
+ was run via the PATH; argv[0] in that case shows up as the bare
+ name of the script rather than its fully qualified path, which
+ meant that the sanity check in the ARG_ZERO_IS_SCRIPT code fails
+ to recognize it as the running script name; fix tries to match
+ bare script name in that case (from Gisle Aas)
+
+ tweak change#17421 ($0 is full path to script even when script
+ is invoked via PATH almost everywhere except Windows)
+ Branch: perl
+ !> t/op/magic.t toke.c
+____________________________________________________________________________
+[ 17424] By: gsar on 2002/07/08 19:54:10
+ Log: tweak change#17421 ($0 is full path to script even when script
+ is invoked via PATH almost everywhere except Windows)
+ Branch: maint-5.6/perl
+ ! t/op/magic.t
+____________________________________________________________________________
+[ 17423] By: jhi on 2002/07/08 19:10:29
+ Log: Subject: Re: [ID 20020626.011] wantarray() causes clobbering of unrelated vars outside the sub
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Date: Mon, 08 Jul 2002 17:00:33 +0100
+ Message-Id: <200207081600.g68G0Xw07553@crypt.compulink.co.uk>
+ Branch: perl
+ ! lib/File/Basename.pm op.c t/op/wantarray.t
+____________________________________________________________________________
+[ 17422] By: jhi on 2002/07/08 19:08:58
+ Log: Subject: [PATCH perl@17412] regcomp.c casting tweak
+ From: "Craig A. Berry" <craigberry@mac.com>
+ Date: Mon, 08 Jul 2002 13:17:35 -0500
+ Message-Id: <5.1.1.5.0.20020708124433.034a5dd8@exchi01>
+ Branch: perl
+ ! regcomp.c
+____________________________________________________________________________
+[ 17421] By: gsar on 2002/07/08 17:07:01
+ Log: on platforms like HP-UX that are subject to the ARG_ZERO_IS_SCRIPT
+ hack, $^X was improperly set to the script name when the script
+ was run via the PATH; argv[0] in that case shows up as the bare
+ name of the script rather than its fully qualified path, which
+ meant that the sanity check in the ARG_ZERO_IS_SCRIPT code fails
+ to recognize it as the running script name; fix tries to match
+ bare script name in that case (from Gisle Aas)
+ Branch: maint-5.6/perl
+ ! t/op/magic.t toke.c
+____________________________________________________________________________
+[ 17420] By: jhi on 2002/07/08 12:54:52
+ Log: Subject: [ DOC PATCH] Re: build failure on Solaris with useithreads
+ From: Dave Mitchell <davem@fdgroup.com>
+ Date: Mon, 8 Jul 2002 00:45:42 +0100
+ Message-ID: <20020708004542.B14412@fdgroup.com>
+ Branch: perl
+ ! README.solaris
+____________________________________________________________________________
+[ 17419] By: jhi on 2002/07/08 12:19:24
+ Log: Add a note about perlmonks as suggested by Ilya Martynov;
+ add an admonition about "can you write my shopping cart
+ script for me!!!"
+ Branch: perl
+ ! pod/perlfaq2.pod
+____________________________________________________________________________
+[ 17418] By: jhi on 2002/07/08 12:11:31
+ Log: Subject: [DOC PATCH] perlfaq2.pod, perlmodstyle.pod
+ From: Iain Truskett <spoon@cpan.org>
+ Date: Mon, 8 Jul 2002 16:50:55 +1000
+ Message-ID: <20020708065055.GC14168@eh.org>
+ Branch: perl
+ ! pod/perlfaq2.pod pod/perlmodstyle.pod
+____________________________________________________________________________
+[ 17417] By: jhi on 2002/07/08 12:08:27
+ Log: Subject: [DOC PATCH] perlthrtut.pod
+ From: Iain Truskett <spoon@cpan.org>
+ Date: Mon, 8 Jul 2002 13:53:59 +1000
+ Message-ID: <20020708035359.GB14168@eh.org>
+ Branch: perl
+ ! pod/perlthrtut.pod
+____________________________________________________________________________
+[ 17416] By: jhi on 2002/07/08 12:07:11
+ Log: Subject: [PATCH] t/op/glob.t
+ From: Iain Truskett <spoon@cpan.org>
+ Date: Mon, 8 Jul 2002 11:59:21 +1000
+ Message-ID: <20020708015921.GA14168@eh.org>
+ Branch: perl
+ ! t/op/glob.t
+____________________________________________________________________________
+[ 17415] By: jhi on 2002/07/08 11:58:54
+ Log: More AUTHORS updates.
+ Branch: perl
+ ! AUTHORS
+____________________________________________________________________________
+[ 17414] By: jhi on 2002/07/07 22:17:28
+ Log: AUTHORS updates.
+ Branch: perl
+ ! AUTHORS
+____________________________________________________________________________
+[ 17413] By: jhi on 2002/07/07 21:42:20
+ Log: README tweaks.
+ Branch: perl
+ ! README.tru64
+____________________________________________________________________________
+[ 17412] By: jhi on 2002/07/07 20:54:53
+ Log: Update Changes.
+ Branch: perl
+ ! Changes patchlevel.h
+____________________________________________________________________________
[ 17411] By: jhi on 2002/07/07 20:36:18
Log: Regen toc, modlib.
Branch: perl
ext/PerlIO/encoding/Makefile.PL PerlIO::encoding makefile writer
ext/PerlIO/encoding/MANIFEST PerlIO::encoding list of files
ext/PerlIO/PerlIO.t See if PerlIO works
-ext/PerlIO/Scalar/Makefile.PL PerlIO layer for scalars
-ext/PerlIO/Scalar/Scalar.pm PerlIO layer for scalars
-ext/PerlIO/Scalar/Scalar.xs PerlIO layer for scalars
+ext/PerlIO/scalar/Makefile.PL PerlIO layer for scalars
+ext/PerlIO/scalar/scalar.pm PerlIO layer for scalars
+ext/PerlIO/scalar/scalar.xs PerlIO layer for scalars
ext/PerlIO/t/encoding.t See if PerlIO encoding conversion works
ext/PerlIO/t/fail.t See if bad layers fail
ext/PerlIO/t/fallback.t See if PerlIO fallbacks work
-ext/PerlIO/t/scalar.t See if PerlIO::Scalar works
-ext/PerlIO/t/via.t See if PerlIO::Via works
-ext/PerlIO/Via/Makefile.PL PerlIO layer for layers in perl
-ext/PerlIO/Via/Via.pm PerlIO layer for layers in perl
-ext/PerlIO/Via/Via.xs PerlIO layer for layers in perl
+ext/PerlIO/t/scalar.t See if PerlIO::scalar works
+ext/PerlIO/t/via.t See if PerlIO::via works
+ext/PerlIO/via/Makefile.PL PerlIO layer for layers in perl
+ext/PerlIO/via/via.pm PerlIO layer for layers in perl
+ext/PerlIO/via/via.xs PerlIO layer for layers in perl
ext/POSIX/hints/bsdos.pl Hint for POSIX for named architecture
ext/POSIX/hints/dynixptx.pl Hint for POSIX for named architecture
ext/POSIX/hints/freebsd.pl Hint for POSIX for named architecture
lib/Class/Struct.pm Declare struct-like datatypes as Perl classes
lib/Class/Struct.t See if Class::Struct works
lib/complete.pl A command completion subroutine
+lib/Config.t See if Config works
lib/constant.pm For "use constant"
lib/constant.t See if compile-time constants work
lib/CPAN.pm Interface to Comprehensive Perl Archive Network
lib/overload.t See if operator overloading works
lib/perl5db.pl Perl debugging routines
lib/PerlIO.pm PerlIO support module
+lib/PerlIO/via/QuotedPrint.pm PerlIO::via::QuotedPrint
+lib/PerlIO/via/t/QuotedPrint.t PerlIO::via::QuotedPrint
lib/ph.t See if h2ph works
lib/Pod/Checker.pm Pod-Parser - check POD documents for syntax errors
lib/Pod/Find.pm used by pod/splitpod
x2p/walk.c Parse tree walker
XSUB.h Include file for extension subroutines
xsutils.c Additional bundled package methods not in UNIVERSAL::
-
doublesize='8'
drand01='drand48()'
drand48_r_proto='0'
-dynamic_ext='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/Scalar PerlIO/Via PerlIO/encoding SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared'
+dynamic_ext='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/scalar PerlIO/via PerlIO/encoding SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared'
eagain='EAGAIN'
ebcdic='undef'
echo='echo'
eunicefix=':'
exe_ext=''
expr='expr'
-extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/Scalar PerlIO/Via PerlIO/encoding SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Errno'
+extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/scalar PerlIO/via PerlIO/encoding SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Errno'
extras=''
fflushNULL='define'
fflushall='undef'
ivdformat='"ld"'
ivsize='8'
ivtype='long'
-known_extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/Scalar PerlIO/Via PerlIO/encoding SDBM_File Socket Storable Sys/Hostname Sys/Syslog Thread Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared'
+known_extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/scalar PerlIO/via PerlIO/encoding SDBM_File Socket Storable Sys/Hostname Sys/Syslog Thread Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared'
ksh=''
ld='ld'
lddlflags='-shared -expect_unresolved "*" -msym -std -s'
casual users crazy. Even experienced users will get confused :-). Upon
reflection, I'd say leave libperl.so in $archlib.
+=item 4.
+
+Indentation style: over the years Perl has become a mishmash of
+various indentation styles, but the original "Larry style" can
+probably be restored with (GNU) indent somewhat like this:
+
+ indent -kr -nce -psl -sc
+
+More full solution would also specify a list of Perl specific types
+with -TSV -TAV -THV .. -TMAGIC -TPerlIO ... but that list would be
+quite ungainly. Also note that GNU indent also doesn't do aligning
+of assignments, which would truly wreck the indentation in places
+like sv.c:Perl_sv_upgrade().
+
=back
=head1 Upload Your Work to CPAN
-e 's/encode/Encode/'\
-e 's=filter/util/call=Filter/Util/Call=' \
-e 's=digest/md5=Digest/MD5=' \
- -e 's=perlio/scalar=PerlIO/Scalar=' \
+ -e 's=perlio/scalar=PerlIO/scalar=' \
-e 's=mime/base64=MIME/Base64=' \
-e 's=time/hires=Time/HiRes=' \
-e 's=list/util=List/Util=' \
-e 's=cwd=Cwd=' \
- -e 's=perlio/via=PerlIO/Via=' \
+ -e 's=perlio/via=PerlIO/via=' \
-e 's=perlio/encoding=PerlIO/encoding=' \
-e 's=xs/apitest=XS/APItest=' \
-e 's=xs/typemap=XS/Typemap=' \
}
fd = PerlIO_fileno(fp);
- /* If there is no fd (e.g. PerlIO::Scalar) assume it isn't a
- * socket - this covers PerlIO::Scalar - otherwise unless we "know" the
+ /* If there is no fd (e.g. PerlIO::scalar) assume it isn't a
+ * socket - this covers PerlIO::scalar - otherwise unless we "know" the
* type probe for socket-ness.
*/
if (IoTYPE(io) && IoTYPE(io) != IoTYPE_PIPE && IoTYPE(io) != IoTYPE_STD && fd >= 0) {
}
}
if (savefd != fd) {
- /* Still a small can-of-worms here if (say) PerlIO::Scalar
+ /* Still a small can-of-worms here if (say) PerlIO::scalar
is assigned to (say) STDOUT - for now let dup2() fail
and provide the error
*/
eunicefix=':'
exe_ext=''
expr='expr'
-extensions='Data/Dumper Digest/MD5 Errno Fcntl File/Glob Filter/Util/Call IO List/Util MIME/Base64 Opcode PerlIO/Scalar Socket Storable Sys/Hostname Unicode/Storable attrs re'
+extensions='Data/Dumper Digest/MD5 Errno Fcntl File/Glob Filter/Util/Call IO List/Util MIME/Base64 Opcode PerlIO/scalar Socket Storable Sys/Hostname Unicode/Storable attrs re'
fflushNULL='undef'
fflushall='define'
find=''
GvSV( gv ) = sv;
}
CODE
- # for PerlIO::Scalar
+ # for PerlIO::scalar
$use_xsloader = 1;
$init->add_eval( sprintf 'open(%s, "<", $%s)', $globname, $globname );
}
else if (k < 0x80)
*r++ = (char)k;
else {
- r += sprintf(r, "\\x{%"UVxf"}", k);
+ /* The return value of sprintf() is unportable.
+ * In modern systems it returns (int) the number of characters,
+ * but in older systems it might return (char*) the original
+ * buffer, or it might even be (void). The easiest portable
+ * thing to do is probably use sprintf() in void context and
+ * then strlen(buffer) for the length. The more proper way
+ * would of course be to figure out the prototype of sprintf.
+ * --jhi */
+ sprintf(r, "\\x{%"UVxf"}", k);
+ r += strlen(r);
}
}
*r++ = '"';
*encode = \&encode_qp;
*decode = \&decode_qp;
-# Methods for use as a PerlIO layer object
-
-sub PUSHED
-{
- my ($class,$mode) = @_;
- # When writing we buffer the data
- my $write = '';
- return bless \$write,$class;
-}
-
-sub FILL
-{
- my ($obj,$fh) = @_;
- my $line = <$fh>;
- return (defined $line) ? decode_qp($line) : undef;
-}
-
-sub WRITE
-{
- my ($obj,$buf,$fh) = @_;
- $$obj .= encode_qp($buf);
- return length($buf);
-}
-
-sub FLUSH
-{
- my ($obj,$fh) = @_;
- print $fh $$obj or return -1;
- $$obj = '';
- return 0;
-}
-
-
1;
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',
);
-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
=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
PerlIO_funcs PerlIO_scalar = {
sizeof(PerlIO_funcs),
- "Scalar",
+ "scalar",
sizeof(PerlIOScalar),
PERLIO_K_BUFFERED|PERLIO_K_RAW,
PerlIOScalar_pushed,
#endif /* Layers available */
-MODULE = PerlIO::Scalar PACKAGE = PerlIO::Scalar
+MODULE = PerlIO::scalar PACKAGE = PerlIO::scalar
PROTOTYPES: ENABLE
my $a = join("", map { chr } 0..255) x 10;
my $b;
-BEGIN { use_ok('MIME::QuotedPrint'); }
+BEGIN { use_ok('PerlIO::via::QuotedPrint'); }
-ok( !open($fh,"<Via(MIME::QuotedPrint)", $tmp), 'open QuotedPrint fails');
-ok( open($fh,">Via(MIME::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(MIME::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");
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
$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;
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',
);
-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 Some::Package;
+ use PerlIO::via::Layer;
+ open($fh,"<:via(Layer)",...);
- open($fh,"<:Via(Some::Package)",...);
+ use Some::Other::Package;
+ open($fh,">:via(Some::Other::Package)",...);
- use PerlIO::Via::SomeLayer;
+=head1 DESCRIPTION
- # Assume PerlIO::Via:: default namespace when SomeLayer.pm is not found
- open($fh,"<:Via(SomeLayer)",...);
+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.
-=head1 DESCRIPTION
+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:
+
+ 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
+fully qualified module name.
-The package to be used as a layer should implement at least some of the
-following methods. In the method descriptions below I<$fh> will be
+=head1 EXPECTED METHODS
+
+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.
+
+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
+better documentation and more examples).
+
+In the method descriptions below I<$fh> will be
a reference to a glob which can be treated as a perl file handle.
It refers to the layer below. I<$fh> is not passed if the layer
is at the bottom of the stack, for this reason and to maintain
some level of "compatibility" with TIEHANDLE classes it is passed last.
-
-As an example, in Perl release 5.8.0 the included MIME::QuotedPrint
-module defines the required TIEHANDLE methods so that you can say
-
- use MIME::QuotedPrint;
- open(my $fh, ">Via(MIME::QuotedPrint)", "qp");
-
+
=over 4
=item $class->PUSHED([$mode[,$fh]])
=back
+=head1 EXAMPLES
+
+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, Hex.pm:
+Given the following module, PerlIO::via::Hex.pm:
- package Hex;
+ package PerlIO::via::Hex;
sub PUSHED
{
be converted to "41" (on ASCII-based machines, on EBCDIC platforms
the "A" will become "c1")
- use 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
-
-
-
-
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);
PerlIO_funcs PerlIO_object = {
sizeof(PerlIO_funcs),
- "Via",
+ "via",
sizeof(PerlIOVia),
PERLIO_K_BUFFERED|PERLIO_K_DESTRUCT,
PerlIOVia_pushed,
#endif /* Layers available */
-MODULE = PerlIO::Via PACKAGE = PerlIO::Via
+MODULE = PerlIO::via PACKAGE = PerlIO::via
PROTOTYPES: ENABLE;
BOOT:
use 5.007_003;
use strict;
use warnings;
-use Config;
-
-BEGIN {
- unless ($Config{useithreads}) {
- my @caller = caller(2);
- die <<EOF;
-$caller[1] line $caller[2]:
-
-This Perl hasn't been configured and built properly for the threads
-module to work. (The 'useithreads' configuration option hasn't been used.)
-
-Having threads support requires all of Perl and all of the XS modules in
-the Perl installation to be rebuilt, it is not just a question of adding
-the threads module. (In other words, threaded and non-threaded Perls
-are binary incompatible.)
-
-If you want to the use the threads module, please contact the people
-who built your Perl.
-
-Cannot continue, aborting.
-EOF
- }
-}
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(share cond_wait cond_broadcast cond_signal _refcnt _id _thrcnt);
our $VERSION = '0.90';
-if ($Config{'useithreads'}) {
+if ($threads::threads) {
*cond_wait = \&cond_wait_enabled;
*cond_signal = \&cond_signal_enabled;
*cond_broadcast = \&cond_broadcast_enabled;
share($scalar);
share(@array);
share(%hash);
- my $bar = share([]);
- $hash{bar} = share({});
+ my $bar = &share([]);
+ $hash{bar} = &share({});
{ lock(%hash); ... }
=item share VARIABLE
-C<share> takes a value and marks it as shared. You can share a scalar, array,
-hash, scalar ref, array ref or hash ref. C<share> will return the shared value.
+C<share> takes a value and marks it as shared. You can share a scalar,
+array, hash, scalar ref, array ref or hash ref. C<share> will return
+the shared rvalue.
C<share> will traverse up references exactly I<one> level.
C<share(\$a)> is equivalent to C<share($a)>, while C<share(\\$a)> is not.
A variable can also be marked as shared at compile time by using the
C<shared> attribute: C<my $var : shared>.
+If you want to share a newly created reference unfortunately you
+need to use C<&share([])> and C<&share({})> syntax due to problems
+with Perl's prototyping.
+
=item lock VARIABLE
C<lock> places a lock on a variable until the lock goes out of scope. If
=for apidoc sharedsv_init
Saves a space for keeping SVs wider than an interpreter,
-currently only stores a pointer to the first interpreter.
=cut
}
XSRETURN_UNDEF;
-void
+SV*
share(SV *ref)
PROTOTYPE: \[$@%]
CODE:
if(SvROK(ref))
ref = SvRV(ref);
Perl_sharedsv_share(aTHX_ ref);
+ RETVAL = newRV(ref);
+ OUTPUT:
+ RETVAL
void
lock_enabled(SV *ref)
# compile/link flags
ldflags=-g
optimize=-g
-static_ext="B Data/Dumper Digest/MD5 Errno Fcntl Filter::Util::Call IO IPC/SysV MIME::Base64 Opcode PerlIO::Scalar POSIX SDBM_File Socket Storable Unicode::Normalize attrs re"
+static_ext="B Data/Dumper Digest/MD5 Errno Fcntl Filter::Util::Call IO IPC/SysV MIME::Base64 Opcode PerlIO::scalar POSIX SDBM_File Socket Storable Unicode::Normalize attrs re"
#static_ext=none
# dynamic loading needs work
usedl=undef
sizetype='size_t'
so='.a'
ssizetype='ssize_t'
-static_ext='Data/Dumper Digest/MD5 Fcntl Filter/Util/Call GDBM_File IO IPC/SysV List/Util MIME/Base64 NDBM_File Opcode PerlIO/Scalar POSIX Socket Storable Thread Time/HiRes Time/Piece attrs re'
+static_ext='Data/Dumper Digest/MD5 Fcntl Filter/Util/Call GDBM_File IO IPC/SysV List/Util MIME/Base64 NDBM_File Opcode PerlIO/scalar POSIX Socket Storable Thread Time/HiRes Time/Piece attrs re'
stdchar='char'
stdio_cnt='(fp)->__countIn'
stdio_ptr='(fp)->__bufPtr'
--- /dev/null
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ require "./test.pl";
+}
+
+plan tests => 23;
+
+use_ok('Config');
+
+# Some (safe?) bets.
+
+ok(keys %Config > 900, "Config has more than 900 entries");
+
+ok(each %Config);
+
+is($Config{PERL_REVISION}, 5, "PERL_REVISION is 5");
+
+ok( exists $Config{cc}, "has cc");
+
+ok( exists $Config{ccflags}, "has ccflags");
+
+ok(!exists $Config{python}, "has no python");
+
+ok( exists $Config{d_fork}, "has d_fork");
+
+ok(!exists $Config{d_bork}, "has no d_bork");
+
+like($Config{ivsize}, qr/^(4|8)$/, "ivsize is 4 or 8 (it is $Config{ivsize})");
+
+# byteorder is virtual, but it has rules.
+
+like($Config{byteorder}, qr/^(1234|4321|12345678|87654321)$/, "byteorder is 1234 or 4321 or 12345678 or 87654321 (it is $Config{byteorder})");
+
+is(length $Config{byteorder}, $Config{ivsize}, "byteorder is as long as ivsize (which is $Config{ivsize})");
+
+# ccflags_nolargefiles is virtual, too.
+
+ok(exists $Config{ccflags_nolargefiles}, "has ccflags_nolargefiles");
+
+# Utility functions.
+
+like(Config::myconfig(), qr/cc='$Config{cc}'/, "myconfig");
+
+like(Config::config_sh(), qr/cc='$Config{cc}'/, "config_sh");
+
+my $out = tie *STDOUT, 'FakeOut';
+
+Config::config_vars('cc');
+my $out1 = $$out;
+$out->clear;
+
+Config::config_vars('d_bork');
+my $out2 = $$out;
+$out->clear;
+
+untie *STDOUT;
+
+like($out1, qr/^cc='$Config{cc}';/, "config_vars cc");
+like($out2, qr/^d_bork='UNKNOWN';/, "config_vars d_bork is UNKNOWN");
+
+# Read-only.
+
+undef $@;
+eval { $Config{d_bork} = 'borkbork' };
+like($@, qr/Config is read-only/, "no STORE");
+
+ok(!exists $Config{d_bork}, "still no d_bork");
+
+undef $@;
+eval { delete $Config{d_fork} };
+like($@, qr/Config is read-only/, "no DELETE");
+
+ok( exists $Config{d_fork}, "still d_fork");
+
+undef $@;
+eval { %Config = () };
+like($@, qr/Config is read-only/, "no CLEAR");
+
+ok( exists $Config{d_fork}, "still d_fork");
+
+package FakeOut;
+
+sub TIEHANDLE {
+ bless(\(my $text), $_[0]);
+}
+
+sub clear {
+ ${ $_[0] } = '';
+}
+
+sub PRINT {
+ my $self = shift;
+ $$self .= join('', @_);
+}
+
my $tmpdir;
sub tmpdir {
return $tmpdir if defined $tmpdir;
- my @dirlist = ( "/tmp" );
- if ( exists $ENV{TMPDIR} )
+ my @dirlist = ($ENV{TMPDIR}, "/tmp");
{
- unshift @dirlist, $ENV{TMPDIR};
no strict 'refs';
if (${"\cTAINT"}) { # Check for taint mode on perl >= 5.8.0
require Scalar::Util;
--- /dev/null
+package PerlIO::via::QuotedPrint;
+
+# Make sure we do things by the book
+# Set the version info
+
+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
+
+#-----------------------------------------------------------------------
+# 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
+
+#-----------------------------------------------------------------------
+# IN: 1 instantiated object (ignored)
+# 2 handle to read from
+# OUT: 1 decoded string
+
+sub FILL {
+
+# Read the line from the handle
+# Decode if there is something decode and return result or signal eof
+
+ my $line = readline( $_[1] );
+ (defined $line) ? MIME::QuotedPrint::decode_qp( $line ) : undef;
+} #FILL
+
+#-----------------------------------------------------------------------
+# IN: 1 instantiated object (ignored)
+# 2 buffer to be written
+# 3 handle to write to
+# OUT: 1 number of bytes written
+
+sub WRITE {
+
+# Encode whatever needs to be encoded and write to handle: indicate result
+
+ (print {$_[2]} MIME::QuotedPrint::encode_qp($_[1])) ? length($_[1]) : -1;
+} #WRITE
+
+# Satisfy -require-
+
+1;
+
+__END__
+
+=head1 NAME
+
+PerlIO::via::QuotedPrint - PerlIO layer for quoted-printable strings
+
+=head1 SYNOPSIS
+
+ use PerlIO::via::QuotedPrint;
+
+ open( my $in,'<Via(PerlIO::via::QuotedPrint)','file.qp' )
+ or die "Can't open file.qp for reading: $!\n";
+
+ open( my $out,'>Via(PerlIO::via::QuotedPrint)','file.qp' )
+ or die "Can't open file.qp for writing: $!\n";
+
+=head1 DESCRIPTION
+
+This module implements a PerlIO layer that works on files encoded in the
+quoted-printable format. It will decode from quoted-printable while reading
+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>.
+
+=head1 COPYRIGHT
+
+Copyright (c) 2002 Elizabeth Mattijsen. Based on example that was initially
+added to MIME::QuotedPrint.pm for the 5.8.0 distribution of Perl.
+
+This library is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=cut
--- /dev/null
+my $file = 'test.qp';
+
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ }
+ unless (find PerlIO::Layer 'perlio') {
+ print "1..0 # Skip: PerlIO not used\n";
+ exit 0;
+ }
+}
+
+use Test::More tests => 11;
+
+BEGIN { use_ok('PerlIO::via::QuotedPrint') }
+
+my $decoded = <<EOD;
+This is a tést for quoted-printable text that has hà rdly any speçial characters
+in it.
+EOD
+
+my $encoded = <<EOD;
+This is a t=E9st for quoted-printable text that has h=E0rdly any spe=E7ial =
+characters
+in it.
+EOD
+
+# Create the encoded test-file
+
+ok(
+ open( my $out,'>:via(PerlIO::via::QuotedPrint)', $file ),
+ "opening '$file' for writing"
+);
+
+ok( (print $out $decoded), 'print to file' );
+ok( close( $out ), 'closing encoding handle' );
+
+# Check encoding without layers
+
+{
+local $/ = undef;
+ok( open( my $test,$file ), 'opening without layer' );
+is( $encoded,readline( $test ), 'check encoded content' );
+ok( close( $test ), 'close test handle' );
+}
+
+# Check decoding _with_ layers
+
+ok(
+ open( my $in,'<:via(PerlIO::via::QuotedPrint)', $file ),
+ "opening '$file' for reading"
+);
+is( $decoded,join( '',<$in> ), 'check decoding' );
+ok( close( $in ), 'close decoding handle' );
+
+# Remove whatever we created now
+
+ok( unlink( $file ), "remove test file '$file'" );
-e 's|\.c\.c|.c|' $uwinfix | \
$uniq | $sort | $uniq >> .deptmp
else
- $cppstdin $finc -I. $cppflags $cppminus <UU/$file.c 2>&1 |
+ $cppstdin $finc -I. $cppflags $cppminus <UU/$file.c >.cout 2>.cerr
$sed \
-e '1d' \
-e '/^#.*<stdin>/d' \
-e 's/^.*"\(.*\)".*$/'$filebase'\$(OBJ_EXT): \1/' \
-e 's/^# *[0-9][0-9]* \(.*\)$/'$filebase'\$(OBJ_EXT): \1/' \
-e 's|: \./|: |' \
- -e 's|\.c\.c|.c|' $uwinfix | \
+ -e 's|\.c\.c|.c|' $uwinfix .cout .cerr| \
$uniq | $sort | $uniq >> .deptmp
fi
done
$cp $mf.new $mf
$rm $mf.new
$echo "# WARNING: Put nothing here or make depend will gobble it up!" >> $mf
-$rm -rf .deptmp UU .shlist .clist .hlist .hsed
+$rm -rf .deptmp UU .shlist .clist .hlist .hsed .cout .cerr
rmdir .depending
!NO!SUBS!
scalarboolean(first);
if (first->op_type == OP_CONST) {
+ if (first->op_private & OPpCONST_BARE &&
+ first->op_private & OPpCONST_STRICT) {
+ no_bareword_allowed(first);
+ }
if (SvTRUE(((SVOP*)first)->op_sv)) {
op_free(first);
op_free(falseop);
#if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT)
static char *local_patches[] = {
NULL
- ,"DEVEL17411"
+ ,"DEVEL17439"
,NULL
};
FREETMPS;
/* Need to flush since END blocks can produce output */
- PerlIO_flush((PerlIO*)NULL);
+ my_fflush_all();
if (CALL_FPTR(PL_threadhook)(aTHX)) {
/* Threads hook has vetoed further cleanup */
* For any scalar type load the handler which is bundled with perl
*/
if (SvTYPE(sv) < SVt_PVAV)
- return PerlIO_find_layer(aTHX_ "Scalar", 6, 1);
+ return PerlIO_find_layer(aTHX_ "scalar", 6, 1);
/*
* For other types allow if layer is known but don't try and load it
incdef = 0;
}
/*
- * Don't fail if handler cannot be found :Via(...) etc. may do
+ * Don't fail if handler cannot be found :via(...) etc. may do
* something sensible else we will just stringfy and open
* resulting string.
*/
print $encoded, "\n"; # "Smiley in Unicode: =263A"
-MIME::QuotedPrint has been enhanced to provide the basic methods
-necessary to use it with PerlIO::Via as in :
-
- use MIME::QuotedPrint;
- open($fh,">Via(MIME::QuotedPrint)",$path);
-
-See L<MIME::QuotedPrint>.
+See also L<PerlIO::via::QuotedPrint>.
=item *
=item *
-C<PerlIO::Scalar>, by Nick Ing-Simmons, provides the implementation
+C<PerlIO::scalar>, by Nick Ing-Simmons, provides the implementation
of IO to "in memory" Perl scalars as discussed above. It also serves
as an example of a loadable PerlIO layer. Other future possibilities
-include PerlIO::Array and PerlIO::Code. See L<PerlIO::Scalar>.
+include PerlIO::Array and PerlIO::Code. See L<PerlIO::scalar>.
=item *
-C<PerlIO::Via>, by Nick Ing-Simmons, acts as a PerlIO layer and wraps
+C<PerlIO::via>, by Nick Ing-Simmons, acts as a PerlIO layer and wraps
PerlIO layer functionality provided by a class (typically implemented
-in perl code).
+in Perl code).
- use MIME::QuotedPrint;
- open($fh,">Via(MIME::QuotedPrint)",$path);
+=item *
+
+C<PerlIO::via::QuotedPrint>, by Elizabeth Mattijsen, is an example
+of a C<PerlIO::via> class:
-This will automatically convert everything output to C<$fh>
-to Quoted-Printable. See L<PerlIO::Via>.
+ use PerlIO::via::QuotedPrint;
+ open($fh,">Via(PerlIO::via::QuotedPrint)",$path);
+
+This will automatically convert everything output to C<$fh> to
+Quoted-Printable. See L<PerlIO::via> and L<PerlIO::via::QuotedPrint>.
=item *
for 5.8.0. Perl 5.6.1 still works for AmigaOS (as does the the 5.7.2
development release).
+The C<PerlIO::Scalar> and C<PerlIO::Via> (capitalised) were renamed as
+C<PerlIO::scalar> and C<PerlIO::via> (all lowercase) just before 5.8.0.
+The main rationale was to have all core IO layers to have all
+lowercase names.
+
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
find it. It is an example of a layer which takes an argument as it is
called thus:
- open($fh,"<:encoding(iso-8859-7)",$pathname)
+ open( $fh, "<:encoding(iso-8859-7)", $pathname );
=item ":Scalar"
-Provides support for
+Provides support for reading data from and writing data to a scalar.
- open($fh,"...",\$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
Provided to allow layers to be implemented as Perl code. For instance:
- use MIME::QuotedPrint;
- open(my $fh, ">Via(MIME::QuotedPrint)", "qp");
+ use PerlIO::via::StripHTML;
+ open( my $fh, ">:Via(StripHTML)", "index.html" );
-See L<PerlIO::Via> for details.
+See L<PerlIO::via> for details.
=back
=back
=cut
-
-
-
OpenBSD
OpenVMS (VMS)
OS/2
+ PowerUX
POSIX-BC (BS2000)
QNX
Solaris
+ SunOS 4
SUPER-UX
Tru64 UNIX (DEC OSF/1, Digital UNIX)
UNICOS
The following platforms worked with the previous releases (5.6 and
5.7), but we did not manage either to fix or to test these in time
for the 5.8.0 release. There is a very good chance that many of these
-will work fine with the 5.8.0. The only one known for certain to be
-broken for 5.8.0 is the AmigaOS (for which 5.6.1 and 5.7.2 can be used)
+will work fine with the 5.8.0.
- AmigaOS
BSD/OS
DomainOS
Hurd
LynxOS
MachTen
PowerMAX
- PowerUX
SCO SV
- SunOS 4
SVR4
Unixware
Windows 3.1
+Known to be broken for 5.8.0 (but 5.6.1 and 5.7.2 can be used):
+
+ AmigaOS
+
The following platforms have been known to build Perl from source in
the past (5.005_03 and earlier), but we haven't been able to verify
their status for the current release, either because the
know which variety of success you will achieve.
When using look-ahead assertions and negations, this can all get even
-tricker. Imagine you'd like to find a sequence of non-digits not
+trickier. Imagine you'd like to find a sequence of non-digits not
followed by "123". You might try to write that as
$_ = "ABC123";
=back
-=head2 PerlIO::Scalar - support module for in-memory IO.
+=head2 PerlIO::encoding - encoding layer
+
+=over 4
+
+=item SYNOPSIS
+
+=item DESCRIPTION
+
+=item SEE ALSO
+
+=back
+
+=head2 PerlIO::scalar - support module for in-memory IO.
=over 4
=back
-=head2 PerlIO::Via - Helper class for PerlIO layers implemented in perl
+=head2 PerlIO::via - Helper class for PerlIO layers implemented in perl
=over 4
=item DESCRIPTION
+=item EXPECTED METHODS
+
$class->PUSHED([$mode[,$fh]]), $obj->POPPED([$fh]),
-$class->OPEN($path,$mode[,$fh]), $obj->BINMODE([,$fh]),
-$class->FDOPEN($fd), $class->SYSOPEN($path,$imode,$perm,$fh),
+$obj->OPEN($path,$mode[,$fh]), $obj->BINMODE([,$fh]),
+$obj->FDOPEN($fd[,$fh]), $obj->SYSOPEN($path,$imode,$perm,[,$fh]),
$obj->FILENO($fh), $obj->READ($buffer,$len,$fh), $obj->WRITE($buffer,$fh),
$obj->FILL($fh), $obj->CLOSE($fh), $obj->SEEK($posn,$whence,$fh),
$obj->TELL($fh), $obj->UNREAD($buffer,$fh), $obj->FLUSH($fh),
$obj->SETLINEBUF($fh), $obj->CLEARERR($fh), $obj->ERROR($fh),
$obj->EOF($fh)
+=item EXAMPLES
+
=over 4
=item Example - a Hexadecimal Handle
=back
-=head2 PerlIO::encoding - encoding layer
+=head2 PerlIO::via::QuotedPrint - PerlIO layer for quoted-printable strings
=over 4
=item SEE ALSO
+=item COPYRIGHT
+
=back
=head2 Pod::Checker, podchecker() - check pod documents for syntax errors
=back
=head2 Thread::Signal - Start a thread which runs signal handlers reliably
+(for old code)
=over 4
+=item CAVEAT
+
=item SYNOPSIS
=item DESCRIPTION
STRLEN len;
OP *ret;
- if (!SvPV(sv,len) || !len)
+ if (!SvPV(sv,len))
RETPUSHUNDEF;
TAINT_PROPER("eval");
EXPECT
Bareword "foo" not allowed while "strict subs" in use at - line 4.
Execution of - aborted due to compilation errors.
+
+########
+
+# ID 20020703.002
+use strict;
+use warnings;
+my $abc = XYZ ? 1 : 0;
+print "$abc\n";
+EXPECT
+Bareword "XYZ" not allowed while "strict subs" in use at - line 5.
+Execution of - aborted due to compilation errors.
#!./perl
-print "1..45\n";
+print "1..46\n";
eval 'print "ok 1\n";';
eval q{my $$$x};
print $@ ? "ok 45\n" : "not ok 45\n";
}
+
+# [ID 20020623.002] eval "" doesn't clear $@
+{
+ $@ = 5;
+ eval q{};
+ print length($@) ? "not ok 46\t# \$\@ = '$@'\n" : "ok 46\n";
+}
local $ENV{PATH}= ".";
(my $script_name = $script) =~ s/.*(show-shebang)/$1/;
+ $script_name = "[]$script_name" if $Is_VMS;
$s1 = "\$^X is $perl, \$0 is $script_name\n" if $Is_MSWin32;
- $_ = `$script_name`;
+ $_ = $Is_VMS ? `$^X $script_name` : `$script_name`;
s/\.exe//i if $Is_Dos or $Is_Cygwin or $Is_os2;
s{\bminiperl\b}{perl}; # so that test doesn't fail with miniperl
s{is perl}{is $perl}; # for systems where $^X is only a basename
if (SvREADONLY(PL_linestr))
PL_linestr = sv_2mortal(newSVsv(PL_linestr));
s = SvPV(PL_linestr, len);
- if (len && s[len-1] != ';') {
+ if (!len || s[len-1] != ';') {
if (!(SvFLAGS(PL_linestr) & SVs_TEMP))
PL_linestr = sv_2mortal(newSVsv(PL_linestr));
sv_catpvn(PL_linestr, "\n;", 2);
return PerlIO_flush(NULL);
#else
# if defined(HAS__FWALK)
+ extern int fflush(FILE *);
/* undocumented, unprototyped, but very useful BSDism */
extern void _fwalk(int (*)(FILE *));
_fwalk(&fflush);
FILTER = $(EXTDIR)\Filter\Util\Call\Call
ENCODE = $(EXTDIR)\Encode\Encode
MD5 = $(EXTDIR)\Digest\MD5\MD5
-PERLIOSCALAR = $(EXTDIR)\PerlIO\Scalar\Scalar
+PERLIOSCALAR = $(EXTDIR)\PerlIO\scalar\scalar
MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
TIMEHIRES = $(EXTDIR)\Time\HiRes\HiRes
CWD = $(EXTDIR)\Cwd\Cwd
LISTUTIL = $(EXTDIR)\List\Util\Util
-PERLIOVIA = $(EXTDIR)\PerlIO\Via\Via
+PERLIOVIA = $(EXTDIR)\PerlIO\via\via
XSAPITEST = $(EXTDIR)\XS\APItest\APItest
XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap
UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize
FILTER_DLL = $(AUTODIR)\Filter\Util\Call\Call.dll
ENCODE_DLL = $(AUTODIR)\Encode\Encode.dll
MD5_DLL = $(AUTODIR)\Digest\MD5\MD5.dll
-PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\Scalar\Scalar.dll
+PERLIOSCALAR_DLL = $(AUTODIR)\PerlIO\scalar\scalar.dll
MIMEBASE64_DLL = $(AUTODIR)\MIME\Base64\Base64.dll
TIMEHIRES_DLL = $(AUTODIR)\Time\HiRes\HiRes.dll
CWD_DLL = $(AUTODIR)\Cwd\Cwd.dll
LISTUTIL_DLL = $(AUTODIR)\List\Util\Util.dll
-PERLIOVIA_DLL = $(AUTODIR)\PerlIO\Via\Via.dll
+PERLIOVIA_DLL = $(AUTODIR)\PerlIO\via\via.dll
XSAPITEST_DLL = $(AUTODIR)\XS\APItest\APItest.dll
XSTYPEMAP_DLL = $(AUTODIR)\XS\Typemap\Typemap.dll
UNICODENORMALIZE_DLL = $(AUTODIR)\Unicode\Normalize\Normalize.dll
-del /f $(LIBDIR)\Storable.pm
-del /f $(LIBDIR)\Filter\Util\Call.pm
-del /f $(LIBDIR)\Digest\MD5.pm
- -del /f $(LIBDIR)\PerlIO\Scalar.pm
- -del /f $(LIBDIR)\PerlIO\Via.pm
+ -del /f $(LIBDIR)\PerlIO\scalar.pm
+ -del /f $(LIBDIR)\PerlIO\via.pm
-del /f $(LIBDIR)\MIME\Base64.pm
-del /f $(LIBDIR)\MIME\QuotedPrint.pm
-del /f $(LIBDIR)\List\Util.pm
DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
Sys/Hostname Storable Filter/Util/Call Encode \
- Digest/MD5 PerlIO/Scalar MIME/Base64 Time/HiRes \
+ Digest/MD5 PerlIO/scalar MIME/Base64 Time/HiRes \
Unicode/Normalize
STATIC_EXT = DynaLoader
NONXS_EXT = Errno
-del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
-del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
-del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
- -del /f $(LIBDIR)\PerlIO\Scalar.pm
+ -del /f $(LIBDIR)\PerlIO\scalar.pm
-del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
-del /f $(LIBDIR)\File\Glob.pm
-del /f $(LIBDIR)\Storable.pm