Pod-Simple-3.32/ 0000755 0001750 0001750 00000000000 12562034636 012053 5 ustar cs3516 cs3516 Pod-Simple-3.32/t/ 0000755 0001750 0001750 00000000000 12562034636 012316 5 ustar cs3516 cs3516 Pod-Simple-3.32/t/htmlbat.t 0000644 0001750 0001750 00000005164 12553003563 014137 0 ustar cs3516 cs3516 # Testing HTMLBatch
BEGIN {
if($ENV{PERL_CORE}) {
chdir 't';
@INC = '../lib';
}
}
# Time-stamp: "2004-05-24 02:07:47 ADT"
use strict;
my $DEBUG = 0;
#sub Pod::Simple::HTMLBatch::DEBUG () {5};
use Test;
BEGIN { plan tests => 17 }
require Pod::Simple::HTMLBatch;;
use File::Spec;
use Cwd;
my $cwd = cwd();
print "# CWD: $cwd\n" if $DEBUG;
my $t_dir;
my $corpus_dir;
foreach my $t_maybe (
File::Spec->catdir( File::Spec->updir(), 'lib','Pod','Simple','t'),
File::Spec->catdir( $cwd ),
File::Spec->catdir( $cwd, 't' ),
'OHSNAP'
) {
die "Can't find the test corpus" if $t_maybe eq 'OHSNAP';
next unless -e $t_maybe;
$t_dir = $t_maybe;
$corpus_dir = File::Spec->catdir( $t_maybe, 'testlib1' );
next unless -e $corpus_dir;
last;
}
print "# OK, found the test corpus as $corpus_dir\n" if $DEBUG;
ok 1;
my $outdir;
while(1) {
my $rand = sprintf "%05x", rand( 0x100000 );
$outdir = File::Spec->catdir( $t_dir, "delme-$rand-out" );
last unless -e $outdir;
}
END {
use File::Path;
rmtree $outdir, 0, 0;
}
ok 1;
print "# Output dir: $outdir\n" if $DEBUG;
mkdir $outdir, 0777 or die "Can't mkdir $outdir: $!";
print "# Converting $corpus_dir => $outdir\n" if $DEBUG;
my $conv = Pod::Simple::HTMLBatch->new;
$conv->verbose(0);
$conv->index(1);
$conv->batch_convert( [$corpus_dir], $outdir );
ok 1;
print "# OK, back from converting.\n" if $DEBUG;
my @files;
use File::Find;
find( sub {
push @files, $File::Find::name;
if (/[.]html$/ && $_ !~ /perl|index/) {
# Make sure an index was generated.
open HTML, $_ or die "Cannot open $_: $!\n";
my $html = do { local $/; };
close HTML;
ok $html =~ /
/;
}
return;
}, $outdir );
{
my $long = ( grep m/zikzik\./i, @files )[0];
ok($long) or print "# How odd, no zikzik file in $outdir!?\n";
if($long) {
$long =~ s{zikzik\.html?$}{}s;
for(@files) { substr($_, 0, length($long)) = '' }
@files = grep length($_), @files;
}
}
if ($DEBUG) {
print "#Produced in $outdir ...\n";
foreach my $f (sort @files) {
print "# $f\n";
}
print "# (", scalar(@files), " items total)\n";
}
# Some minimal sanity checks:
ok scalar(grep m/\.css/i, @files) > 5;
ok scalar(grep m/\.html?/i, @files) > 5;
ok scalar grep m{squaa\W+Glunk.html?}i, @files;
if (my @long = grep { /^[^.]{9,}/ } map { s{^[^/]/}{} } @files) {
ok 0;
print "# File names too long:\n",
map { "# $_\n" } @long;
} else {
ok 1;
}
# use Pod::Simple;
# *pretty = \&Pod::Simple::BlackBox::pretty;
print "# Bye from ", __FILE__, "\n" if $DEBUG;
ok 1;
Pod-Simple-3.32/t/xhtml05.t 0000644 0001750 0001750 00000002262 12553003564 014002 0 ustar cs3516 cs3516 #!/usr/bin/perl -w
# t/xhtml05.t - check block output from Pod::Simple::XHTML
BEGIN {
chdir 't' if -d 't';
}
use strict;
use lib '../lib';
use Test::More tests => 6;
use_ok('Pod::Simple::XHTML') or exit;
my $parser = Pod::Simple::XHTML->new ();
isa_ok ($parser, 'Pod::Simple::XHTML');
my $results;
initialize($parser, $results);
$parser->accept_targets_as_text( 'comment' );
$parser->parse_string_document(<<'EOPOD');
=for comment
This is an ordinary for block.
EOPOD
is($results, <<'EOHTML', "a for block");
EOHTML
foreach my $target (qw(note tip warning)) {
initialize($parser, $results);
$parser->accept_targets_as_text( $target );
$parser->parse_string_document(<<"EOPOD");
=begin $target
This is a $target.
=end $target
EOPOD
is($results, <<"EOHTML", "allow $target blocks");
EOHTML
}
######################################
sub initialize {
$_[0] = Pod::Simple::XHTML->new ();
$_[0]->html_header("");
$_[0]->html_footer("");
$_[0]->output_string( \$results ); # Send the resulting output to a string
$_[1] = '';
return;
}
Pod-Simple-3.32/t/html03.t 0000644 0001750 0001750 00000001312 12553003563 013602 0 ustar cs3516 cs3516 # Testing HTML titles
BEGIN {
if($ENV{PERL_CORE}) {
chdir 't';
@INC = '../lib';
}
}
use strict;
use Test;
BEGIN { plan tests => 7 };
#use Pod::Simple::Debug (10);
use Pod::Simple::HTML;
sub x ($) { Pod::Simple::HTML->_out(
#sub{ $_[0]->bare_output(1) },
"=pod\n\n$_[0]",
) }
# make sure empty file => empty output
ok 1;
ok( x(''),'', "Contentlessness" );
ok( x(qq{=pod\n\nThis is a paragraph}) =~ m{
}i );
ok( x(qq{This is a paragraph}) =~ m{
}i );
ok( x(qq{=head1 Prok\n\nThis is a paragraph}) =~ m{
Prok }i );
ok( x(qq{=head1 NAME\n\nProk -- stuff\n\nThis}), q{/
Prok /} );
print "# And one for the road...\n";
ok 1;
Pod-Simple-3.32/t/html01.t 0000644 0001750 0001750 00000004432 12553003563 013606 0 ustar cs3516 cs3516 # Testing HTML paragraphs
BEGIN {
if($ENV{PERL_CORE}) {
chdir 't';
@INC = '../lib';
}
}
use strict;
use Test;
BEGIN { plan tests => 13 };
#use Pod::Simple::Debug (10);
use Pod::Simple::HTML;
sub x ($;&) {
my $code = $_[1];
Pod::Simple::HTML->_out(
sub{ $_[0]->bare_output(1); $code->($_[0]) if $code },
"=pod\n\n$_[0]",
) }
ok( x(
q{
=pod
This is a paragraph
=cut
}),
qq{\n
This is a paragraph
\n},
"paragraph building"
);
ok( x(qq{=pod\n\nThis is a paragraph}),
qq{\n
This is a paragraph
\n},
"paragraph building"
);
ok( x(qq{This is a paragraph}),
qq{\n
This is a paragraph
\n},
"paragraph building"
);
ok(x(
'=head1 This is a heading')
=> q{/\s*
\s*$/},
"heading building"
);
ok(x('=head1 This is a heading', sub { $_[0]->html_h_level(2) })
=> q{/\s*
\s*$/},
"heading building"
);
ok(x(
'=head2 This is a heading too')
=> q{/\s*
\s*$/},
"heading building"
);
ok(x(
'=head3 Also, this is a heading')
=> q{/\s*
\s*$/},
"heading building"
);
ok(x(
'=head4 This, too, is a heading')
=> q{/\s*
\s*$/},
"heading building"
);
ok(x(
'=head2 Yada Yada Operator
X<...> X<... operator> X
')
=> q{/name="Yada_Yada_Operator"/},
"heading anchor name"
);
ok(
x("=over 4\n\n=item one\n\n=item two\n\nHello\n\n=back\n"),
q{
one
two
Hello
}
);
my $html = q{
#include <stdio.h>
int main(int argc,char *argv[]) {
printf("Hellow World\n");
return 0;
}
};
ok(
x("=begin html\n\n$html\n\n=end html\n"),
"$html\n\n"
);
# Check subclass.
SUBCLASS: {
package My::Pod::HTML;
use vars '@ISA', '$VERSION';
@ISA = ('Pod::Simple::HTML');
$VERSION = '0.01';
sub do_section { 'howdy' }
}
ok(
My::Pod::HTML->_out(
sub{ $_[0]->bare_output(1) },
"=pod\n\n=over\n\n=item Foo\n\n=back\n",
),
"\n\nFoo \n \n",
);
print "# And one for the road...\n";
ok 1;
Pod-Simple-3.32/t/search29.t 0000644 0001750 0001750 00000003437 12553003563 014125 0 ustar cs3516 cs3516 BEGIN {
if($ENV{PERL_CORE}) {
chdir 't';
@INC = '../lib';
}
}
use strict;
use Pod::Simple::Search;
use Test;
BEGIN { plan tests => 4 }
print "# ", __FILE__,
": Testing limit_glob ...\n";
my $x = Pod::Simple::Search->new;
die "Couldn't make an object!?" unless ok defined $x;
$x->inc(0);
$x->shadows(1);
use File::Spec;
use Cwd;
my $cwd = cwd();
print "# CWD: $cwd\n";
sub source_path {
my $file = shift;
if ($ENV{PERL_CORE}) {
my $updir = File::Spec->updir;
my $dir = File::Spec->catdir($updir, 'lib', 'Pod', 'Simple', 't');
return File::Spec->catdir ($dir, $file);
} else {
return $file;
}
}
my($here1, $here2, $here3);
if( -e ($here1 = source_path( 'testlib1' ))) {
die "But where's $here2?"
unless -e ($here2 = source_path( 'testlib2'));
die "But where's $here3?"
unless -e ($here3 = source_path( 'testlib3'));
} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'testlib1' ))) {
die "But where's $here2?"
unless -e ($here2 = File::Spec->catdir($cwd, 't', 'testlib2'));
die "But where's $here3?"
unless -e ($here3 = File::Spec->catdir($cwd, 't', 'testlib3'));
} else {
die "Can't find the test corpora";
}
print "# OK, found the test corpora\n# as $here1\n# and $here2\n# and $here3\n#\n";
ok 1;
print $x->_state_as_string;
#$x->verbose(12);
use Pod::Simple;
*pretty = \&Pod::Simple::BlackBox::pretty;
my $glob = '*z?k*';
print "# Limiting to $glob\n";
$x->limit_glob($glob);
my($name2where, $where2name) = $x->survey($here1, $here2, $here3);
my $p = pretty( $where2name, $name2where )."\n";
$p =~ s/, +/,\n/g;
$p =~ s/^/# /mg;
print $p;
{
my $names = join "|", sort values %$where2name;
ok $names, "perlzuk|zikzik";
}
print "# OK, bye from ", __FILE__, "\n";
ok 1;
__END__
Pod-Simple-3.32/t/x_nixer.t 0000644 0001750 0001750 00000011261 12553003563 014153 0 ustar cs3516 cs3516
use strict;
use Test;
BEGIN { plan tests => 11 };
my $d;
#use Pod::Simple::Debug (\$d, 0);
ok 1;
use Pod::Simple::XMLOutStream;
use Pod::Simple::DumpAsXML;
$Pod::Simple::XMLOutStream::ATTR_PAD = ' ';
$Pod::Simple::XMLOutStream::SORT_ATTRS = 1; # for predictably testable output
print "# A simple sanity test...\n";
ok( Pod::Simple::XMLOutStream->_out("=pod\n\nZ<>FfE<111>o> I> B>baz>\n"),
'foo bar stuff thing baz '
);
print "# With lots of nesting, and Z's...\n";
ok( Pod::Simple::XMLOutStream->_out("=pod\n\nZ<>FfE<111>o> I> B>baz>\n"),
'foo bar stuff thing baz '
);
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub mergy {$_[0]->merge_text(1)}
sub nixy {$_[0]->nix_X_codes(1)}
sub nixy_mergy {$_[0]->merge_text(1); $_[0]->nix_X_codes(1);}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print "# With no F/X\n";
ok( Pod::Simple::DumpAsXML->_out( "=pod\n\nZ<>FfE<111>o> I> B>baz>\n"),
join "\n",
'',
' ',
' ',
' ',
' foo',
' ',
' ',
' ',
' bar',
' ',
' ',
' ',
' ',
' stuff ',
' ',
' thing',
' ',
' baz',
' ',
' ',
' ',
'',
);
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print "# with just X-nixing...\n";
ok( Pod::Simple::DumpAsXML->_out( \&nixy, "=pod\n\nZ<>FfE<111>o> I> B>baz>\n"),
join "\n",
'',
' ',
' ',
' ',
' foo',
' ',
' ',
' ',
' bar',
' ',
' ',
' ',
' ',
' stuff baz',
' ',
' ',
' ',
'',
);
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print "# With merging...\n";
ok( Pod::Simple::DumpAsXML->_out( \&mergy, "=pod\n\nZ<>FfE<111>o> I> B>baz>\n"),
join "\n",
'',
' ',
' ',
' ',
' foo',
' ',
' ',
' ',
' bar',
' ',
' ',
' ',
' ',
' stuff ',
' ',
' thing',
' ',
' baz',
' ',
' ',
' ',
'',
);
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print "# With nixing and merging...\n";
#$d = 10;
ok( Pod::Simple::DumpAsXML->_out( \&nixy_mergy, "=pod\n\nZ<>FfE<111>o> I> B>baz>\n"),
join "\n",
'',
' ',
' ',
' ',
' foo',
' ',
' ',
' ',
' bar',
' ',
' ',
' ',
' ',
' stuff baz',
' ',
' ',
' ',
'',
);
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Now the scary bits... with L's!
print "# A wee L<...> sanity test...\n";
ok( Pod::Simple::XMLOutStream->_out(qq{=pod\n\nLet::Ping/Ping-E<112>ong>\n}),
'"Ping-pong" in Net::Ping '
);
print "# Now a wee L<...> with mergy...\n";
$d = 10;
ok( Pod::Simple::DumpAsXML->_out(\&mergy, qq{=pod\n\nLet::Ping/Ping-E<112>ong>\n}),
join "\n",
'',
' ',
' ',
' "Ping-pong" in Net::Ping',
' ',
' ',
' ',
''
);
print "# Now a complex tree with L's, with nixy+mergy...\n";
ok( Pod::Simple::DumpAsXML->_out( \&nixy_mergy, "=pod\n\nZ<>FfE<111>Let::Ping/Ping-E<112>ong>o> I> B>baz>\n"),
join "\n",
'',
' ',
' ',
' ',
' fo',
' ',
' "Ping-pong" in Net::Ping',
' ',
' o',
' ',
' ',
' ',
' bar',
' ',
' ',
' ',
' ',
' stuff baz',
' ',
' ',
' ',
'',
);
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print "# Wrapping up... one for the road...\n";
ok 1;
print "# --- Done with ", __FILE__, " --- \n";
Pod-Simple-3.32/t/fcodes_l.t 0000644 0001750 0001750 00000064531 12553003563 014265 0 ustar cs3516 cs3516 # fcodes L
BEGIN {
if($ENV{PERL_CORE}) {
chdir 't';
@INC = '../lib';
}
}
use strict;
use Test;
BEGIN { plan tests => 101 };
#use Pod::Simple::Debug (10);
ok 1;
use Pod::Simple::DumpAsXML;
use Pod::Simple::XMLOutStream;
print "# Pod::Simple version $Pod::Simple::VERSION\n";
sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) }
my $x = 'Pod::Simple::XMLOutStream';
print "##### Testing L codes via x class $x...\n";
$Pod::Simple::XMLOutStream::ATTR_PAD = ' ';
$Pod::Simple::XMLOutStream::SORT_ATTRS = 1; # for predictably testable output
print "# Simple/moderate L tests...\n";
ok($x->_out(qq{=pod\n\nL\n}),
'Net::Ping '
);
ok($x->_out(qq{=pod\n\nL\n}),
'crontab(5) '
);
ok($x->_out(qq{=pod\n\nL\n}),
'login.conf(5) '
);
ok($x->_out(qq{=pod\n\nL\n}),
'foo_bar(5) '
);
ok( $x->_out(qq{=pod\n\nL\n}),
'"Ping-pong" in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nL\n}),
'"Ping-pong" in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nL"Object Methods">\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nL\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nL<"Object Methods">\n}),
'"Object Methods" '
);
print "# Complex L tests...\n";
print "# Ents in the middle...\n";
ok($x->_out(qq{=pod\n\nL\n}),
'Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLong>\n}),
'"Ping-pong" in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLong">\n}),
'"Ping-pong" in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nL"Object E<77>ethods">\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nLethods>\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nL<"Object E<77>ethods">\n}),
'"Object Methods" '
);
print "# Ents in the middle and at the start...\n";
ok($x->_out(qq{=pod\n\nLet::Ping>\n}),
'Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLet::Ping/Ping-E<112>ong>\n}),
'"Ping-pong" in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLet::Ping/"Ping-E<112>ong">\n}),
'"Ping-pong" in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nL"E<79>bject E<77>ethods">\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nL bject E<77>ethods>\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nL<"E<79>bject E<77>ethods">\n}),
'"Object Methods" '
);
print "# Ents in the middle and at the start and at the end...\n";
ok($x->_out(qq{=pod\n\nLet::PinE<103>>\n}),
'Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLet::PinE<103>/Ping-E<112>onE<103>>\n}),
'"Ping-pong" in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLet::PinE<103>/"Ping-E<112>onE<103>">\n}),
'"Ping-pong" in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nL"E<79>bject E<77>ethodE<115>">\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nL bject E<77>ethodE<115>>\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nL<"E<79>bject E<77>ethodE<115>">\n}),
'"Object Methods" '
);
print "# Even more complex L tests...\n";
print "# Ents in the middle...\n";
ok($x->_out(qq{=pod\n\nL\n}),
'Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLong>\n}),
'"Ping-pong" in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLong">\n}),
'"Ping-pong" in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nL"Object E<77>ethods">\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nLethods>\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nL<"Object E<77>ethods">\n}),
'"Object Methods" '
);
###########################################################################
print "# VERY complex L sequences...\n";
print "# Ents in the middle and at the start...\n";
ok($x->_out(qq{=pod\n\nL\n}),
'Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLong>>\n}),
'"Ping-pong " in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLong>">\n}),
'"Ping-pong " in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nL"B E<77>ethods">\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nL E<77>ethods>\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nL<"B E<77>ethods">\n}),
'"Object Methods" '
);
print "# Ents in the middle and at the start...\n";
ok($x->_out(qq{=pod\n\nLet::Ping>\n}),
'Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLet::Ping/Ping-Bong>>\n}),
'"Ping-pong " in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLet::Ping/"Ping-Bong>">\n}),
'"Ping-pong " in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nL"Bbject> E<77>ethods">\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nLbject> E<77>ethods>\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nL<"Bbject> E<77>ethods">\n}),
'"Object Methods" '
);
print "# Ents in the middle and at the start and at the end...\n";
ok($x->_out(qq{=pod\n\nLet::PinE<103>>\n}),
'Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLet::PinE<103>/Ping-BonE<103>>>\n}),
'"Ping-pong " in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nLet::PinE<103>/"Ping-BonE<103>>">\n}),
'"Ping-pong " in Net::Ping '
);
ok( $x->_out(qq{=pod\n\nL"Bbject> E<77>ethodE<115>">\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nLbject> E<77>ethodE<115>>\n}),
'"Object Methods" '
);
ok( $x->_out(qq{=pod\n\nL<"Bbject> E<77>ethodE<115>">\n}),
'"Object Methods" '
);
###########################################################################
print "#\n# L tests...\n";
ok( $x->_out(qq{=pod\n\nL\n}),
'news:comp.lang.perl.misc '
);
ok( $x->_out(qq{=pod\n\nL\n}),
'http://www.perl.com '
);
ok( $x->_out(qq{=pod\n\nL \n}),
'http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/ '
);
print "# L tests with entities...\n";
ok( $x->_out(qq{=pod\n\nLlang.perl.misc>\n}),
'news:comp.lang.perl.misc '
);
ok( $x->_out(qq{=pod\n\nLperl.com>\n}),
'http://www.perl.com '
);
ok( $x->_out(qq{=pod\n\nLperl.com/CPAN/authors/id/S/SB/SBURKE/>\n}),
'http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/ '
);
ok( $x->_out(qq{=pod\n\nLperl.com/CPAN/authors/id/S/SB/SBURKEE<47>>\n}),
'http://www.perl.com/CPAN/authors/id/S/SB/SBURKE/ '
);
###########################################################################
print "# L tests...\n";
ok($x->_out(qq{=pod\n\nL\n}),
'things '
);
ok($x->_out(qq{=pod\n\nL\n}),
'things '
);
ok($x->_out(qq{=pod\n\nL\n}),
'things '
);
ok( $x->_out(qq{=pod\n\nL\n}),
'Perl Error Messages '
);
ok( $x->_out(qq{=pod\n\nL\n}),
'Perl Error Messages '
);
ok( $x->_out(qq{=pod\n\nL\n}),
'Perl Error Messages '
);
ok( $x->_out(qq{=pod\n\nL\n}),
'SWITCH statements '
);
ok( $x->_out(qq{=pod\n\nL\n}),
'SWITCH statements '
);
ok( $x->_out(qq{=pod\n\nL\n}),
'the various attributes '
);
ok( $x->_out(qq{=pod\n\nL\n}),
'the various attributes '
);
ok( $x->_out(qq{=pod\n\nL\n}),
'the various attributes '
);
print "#\n# Now some very complex L tests...\n";
ok( $x->_out(qq{=pod\n\nLessages>|perldiag>\n}),
'Perl Error Messages '
);
ok( $x->_out(qq{=pod\n\nLessages>|perldiag>\n}),
'Perl Error Messages '
);
ok( $x->_out(qq{=pod\n\nLessages>|perldiag>\n}),
'Perl Error Messages '
);
ok( $x->_out(qq{=pod\n\nLtatements>|perlsyn/"Basic I and Switch StatementE<115>">\n}),
'SWITCH statements '
);
ok( $x->_out(qq{=pod\n\nLtatements>|perlsyn/Basic I and Switch StatementE<115>>\n}),
'SWITCH statements '
);
ok( $x->_out(qq{=pod\n\nL attributes|/"Member Data">\n}),
'the various attributes '
);
ok( $x->_out(qq{=pod\n\nL attributes|/Member Data>\n}),
'the various attributes '
);
ok( $x->_out(qq{=pod\n\nL attributes|"Member Data">\n}),
'the various attributes '
);
print "#\n# Now some very complex L tests with variant syntax...\n";
ok( $x->_out(qq{=pod\n\nL<< Perl B<<< Error E<77>essages >>>|perldiag >>\n}),
'Perl Error Messages '
);
ok( $x->_out(qq{=pod\n\nL<< Perl\nB<<< Error\nE<77>essages >>>|perldiag >>\n}),
'Perl Error Messages '
);
ok( $x->_out(qq{=pod\n\nL<< Perl\nB<<< Error\t E<77>essages >>>|perldiag >>\n}),
'Perl Error Messages '
);
ok( $x->_out(qq{=pod\n\nL<< SWITCH B<<< E<115>tatements >>>|perlsyn/"Basic I<<<< BLOCKs >>>> and Switch StatementE<115>" >>\n}),
'SWITCH statements '
);
ok( $x->_out(qq{=pod\n\nL<< SWITCH B<<< E<115>tatements >>>|perlsyn/Basic I<<<< BLOCKs >>>> and Switch StatementE<115> >>\n}),
'SWITCH statements '
);
ok( $x->_out(qq{=pod\n\nL<<< the F<< various >> attributes|/"Member Data" >>>\n}),
'the various attributes '
);
ok( $x->_out(qq{=pod\n\nL<<< the F<< various >> attributes|/Member Data >>>\n}),
'the various attributes '
);
ok( $x->_out(qq{=pod\n\nL<<< the F<< various >> attributes|"Member Data" >>>\n}),
'the various attributes '
);
###########################################################################
print "#\n# Now some very complex L tests with variant syntax and text around it...\n";
ok( $x->_out(qq{=pod\n\nI like L<< Perl B<<< Error E<77>essages >>>|perldiag >>.\n}),
'I like Perl Error Messages . '
);
ok( $x->_out(qq{=pod\n\nI like L<< Perl\nB<<< Error\nE<77>essages >>>|perldiag >>.\n}),
'I like Perl Error Messages . '
);
ok( $x->_out(qq{=pod\n\nI like L<< Perl\nB<<< Error\t E<77>essages >>>|perldiag >>.\n}),
'I like Perl Error Messages . '
);
ok( $x->_out(qq{=pod\n\nI like L<< SWITCH B<<< E<115>tatements >>>|perlsyn/"Basic I<<<< BLOCKs >>>> and Switch StatementE<115>" >>.\n}),
'I like SWITCH statements . '
);
ok( $x->_out(qq{=pod\n\nI like L<< SWITCH B<<< E<115>tatements >>>|perlsyn/Basic I<<<< BLOCKs >>>> and Switch StatementE<115> >>.\n}),
'I like SWITCH statements . '
);
ok( $x->_out(qq{=pod\n\nI like L<<< the F<< various >> attributes|/"Member Data" >>>.\n}),
'I like the various attributes . '
);
ok( $x->_out(qq{=pod\n\nI like L<<< the F<< various >> attributes|/Member Data >>>.\n}),
'I like the various attributes . '
);
ok( $x->_out(qq{=pod\n\nI like L<<< the F<< various >> attributes|"Member Data" >>>.\n}),
'I like the various attributes . '
);
ok( $x->_out(qq{=pod\n\nI like L<<< Bs|http://text.com >>>.\n}),
'I like text s . '
);
ok( $x->_out(qq{=pod\n\nI like L<<< text|https://text.com/1/2 >>>.\n}),
'I like text . '
);
ok( $x->_out(qq{=pod\n\nI like L<<< I|http://text.com >>>.\n}),
'I like text . '
);
ok( $x->_out(qq{=pod\n\nI like L<<< C|http://text.com >>>.\n}),
'I like text . '
);
ok( $x->_out(qq{=pod\n\nI like L<<< I>>>|mailto:earlE<64>text.com >>>.\n}),
'I like text . '
);
ok( $x->_out(qq{=pod\n\nI like L<<< textZ<>|http://text.com >>>.\n}),
'I like text . '
);
#
# TODO: S testing.
#
###########################################################################
print "# Wrapping up... one for the road...\n";
ok 1;
print "# --- Done with ", __FILE__, " --- \n";
Pod-Simple-3.32/t/for.t 0000644 0001750 0001750 00000012047 12553003563 013270 0 ustar cs3516 cs3516 BEGIN {
if($ENV{PERL_CORE}) {
chdir 't';
@INC = '../lib';
}
}
use strict;
use Test;
BEGIN { plan tests => 21 };
#use Pod::Simple::Debug (5);
ok 1;
use Pod::Simple::DumpAsXML;
use Pod::Simple::XMLOutStream;
print "# Pod::Simple version $Pod::Simple::VERSION\n";
sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) }
my $x = 'Pod::Simple::XMLOutStream';
$Pod::Simple::XMLOutStream::ATTR_PAD = ' ';
$Pod::Simple::XMLOutStream::SORT_ATTRS = 1; # for predictably testable output
sub moj {shift->accept_target('mojojojo')}
sub mojtext {shift->accept_target_as_text('mojojojo')}
sub any {shift->accept_target('*')}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ok( $x->_out( "=pod\n\nI like pie.\n\n=for mojojojo stuff\n\nYup.\n"),
'I like pie. Yup. '
);
ok( $x->_out( "=pod\n\nI like pie.\n\n=for psketti,mojojojo,crunk stuff\n\nYup.\n"),
'I like pie. Yup. '
);
ok( $x->_out( "=pod\n\nI like pie.\n\n=for mojojojo I\n\nYup.\n"),
'I like pie. Yup. '
);
ok( $x->_out( "=pod\n\nI like pie.\n\n=for psketti,mojojojo,crunk I\n\nYup.\n"),
'I like pie. Yup. '
);
ok( $x->_out( "=pod\n\nI like pie.\n\n=for :psketti,mojojojo,crunk I\n\nYup.\n"),
'I like pie. Yup. '
);
print "# Testing accept_target ...\n";
ok( $x->_out( \&moj, "=pod\n\nI like pie.\n\n=for crunk stuff\n\nYup.\n"),
'I like pie. Yup. '
);
ok( $x->_out( \&moj, "=pod\n\nI like pie.\n\n=for mojojojo I\n\nYup.\n"),
'I like pie. I<stuff> Yup. '
);
ok( $x->_out( \&moj, "=pod\n\nI like pie.\n\n=for psketti,mojojojo,crunk I\n\nYup.\n"),
'I like pie. I<stuff> Yup. '
);
ok( $x->_out( \&moj, "=pod\n\nI like pie.\n\n=for :mojojojo I\n\nYup.\n"),
'I like pie. stuff Yup. '
);
ok( $x->_out( \&moj, "=pod\n\nI like pie.\n\n=for :psketti,mojojojo,crunk I\n\nYup.\n"),
'I like pie. stuff Yup. '
);
print "# Testing accept_target_as_text ...\n";
ok( $x->_out( \&mojtext, "=pod\n\nI like pie.\n\n=for mojojojo I\n\nYup.\n"),
'I like pie. stuff Yup. '
);
ok( $x->_out( \&mojtext, "=pod\n\nI like pie.\n\n=for psketti,mojojojo,crunk I\n\nYup.\n"),
'I like pie. stuff Yup. '
);
ok( $x->_out( \&mojtext, "=pod\n\nI like pie.\n\n=for :mojojojo I\n\nYup.\n"),
'I like pie. stuff Yup. '
);
ok( $x->_out( \&mojtext, "=pod\n\nI like pie.\n\n=for :psketti,mojojojo,crunk I\n\nYup.\n"),
'I like pie. stuff Yup. '
);
print "# Testing accept_target(*) ...\n";
ok( $x->_out( \&any, "=pod\n\nI like pie.\n\n=for mojojojo I\n\nYup.\n"),
'I like pie. I<stuff> Yup. '
);
ok( $x->_out( \&any, "=pod\n\nI like pie.\n\n=for mojojojo I\n\nYup.\n"),
'I like pie. I<stuff> Yup. '
);
ok( $x->_out( \&any, "=pod\n\nI like pie.\n\n=for psketti,mojojojo,crunk I\n\nYup.\n"),
'I like pie. I<stuff> Yup. '
);
ok( $x->_out( \&any, "=pod\n\nI like pie.\n\n=for :mojojojo I\n\nYup.\n"),
'I like pie. stuff Yup. '
);
ok( $x->_out( \&any, "=pod\n\nI like pie.\n\n=for :psketti,mojojojo,crunk I\n\nYup.\n"),
'I like pie. stuff Yup. '
);
print "# Wrapping up... one for the road...\n";
ok 1;
print "# --- Done with ", __FILE__, " --- \n";
Pod-Simple-3.32/t/accept05.t 0000644 0001750 0001750 00000011330 12553003563 014100 0 ustar cs3516 cs3516 # Testing extend and accept_codes
BEGIN {
if($ENV{PERL_CORE}) {
chdir 't';
@INC = '../lib';
}
}
use strict;
use Test;
BEGIN { plan tests => 24 };
#use Pod::Simple::Debug (2);
ok 1;
use Pod::Simple::DumpAsXML;
use Pod::Simple::XMLOutStream;
print "# Pod::Simple version $Pod::Simple::VERSION\n";
sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) }
my $x = 'Pod::Simple::XMLOutStream';
sub accept_Q { $_[0]->accept_codes('Q') }
sub accept_prok { $_[0]->accept_codes('prok') }
sub accept_zing_prok { $_[0]->accept_codes('zing:prok') }
sub accept_zing_superprok { $_[0]->accept_codes('z.i_ng:Prok-12') }
sub accept_zing_superduperprok {
$_[0]->accept_codes('A');
$_[0]->accept_codes('z.i_ng:Prok-12');
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print "# Some sanity tests...\n";
ok( $x->_out( "=pod\n\nI like pie.\n"),
'I like pie. '
);
ok( $x->_out( "=extend N C Y,W\n\nI like pie.\n"),
'I like pie. '
);
ok( $x->_out( "=extend N C,F Y,W\n\nI like pie.\n"),
'I like pie. '
);
ok( $x->_out( "=extend N C,F,I Y,W\n\nI like pie.\n"),
'I like pie. '
);
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print "## OK, actually trying to use an extended code...\n";
print "# extending but not accepted (so hitting fallback)\n";
ok( $x->_out( "=extend N B Y,W\n\nI N pie.\n"),
'I like pie. '
);
ok( $x->_out( "=extend N B,I Y,W\n\nI N pie.\n"),
'I like pie. '
);
ok( $x->_out( "=extend N C,B,I Y,W\n\nI N pie.\n"),
'I like pie. '
);
print "# extending to one-letter accepted (not hitting fallback)\n";
ok( $x->_out( \&accept_Q, "=extend N B Y,Q,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
ok( $x->_out( \&accept_Q, "=extend N B,I Y,Q,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
ok( $x->_out( \&accept_Q, "=extend N C,B,I Y,Q,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
print "# extending to many-letter accepted (not hitting fallback)\n";
ok( $x->_out( \&accept_prok, "=extend N B Y,prok,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
ok( $x->_out( \&accept_prok, "=extend N B,I Y,prok,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
ok( $x->_out( \&accept_prok, "=extend N C,B,I Y,prok,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
print "# extending to :-containing, many-letter accepted (not hitting fallback)\n";
ok( $x->_out( \&accept_zing_prok, "=extend N B Y,zing:prok,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
ok( $x->_out( \&accept_zing_prok, "=extend N B,I Y,zing:prok,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
ok( $x->_out( \&accept_zing_prok, "=extend N C,B,I Y,zing:prok,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
print "# extending to _:-0-9-containing, many-letter accepted (not hitting fallback)\n";
ok( $x->_out( \&accept_zing_superprok, "=extend N B Y,z.i_ng:Prok-12,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
ok( $x->_out( \&accept_zing_superprok, "=extend N B,I Y,z.i_ng:Prok-12,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
ok( $x->_out( \&accept_zing_superprok, "=extend N C,B,I Y,z.i_ng:Prok-12,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
print "#\n# Testing acceptance order\n";
ok( $x->_out( \&accept_zing_superduperprok, "=extend N B Y,z.i_ng:Prok-12,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
ok( $x->_out( \&accept_zing_superduperprok, "=extend N B,I Y,z.i_ng:Prok-12,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
ok( $x->_out( \&accept_zing_superduperprok, "=extend N C,B,I Y,z.i_ng:Prok-12,A,bzroch\n\nI N pie.\n"),
'I like pie. '
);
print "# Wrapping up... one for the road...\n";
ok 1;
print "# --- Done with ", __FILE__, " --- \n";
Pod-Simple-3.32/t/perlvaro.txt 0000644 0001750 0001750 00000114222 12553003563 014706 0 ustar cs3516 cs3516 NAME
perlvar - Perl predefined variables
DESCRIPTION
Predefined Names
The following names have special meaning to Perl. Most punctuation names have reasonable mnemonics, or analogs in the shells. Nevertheless, if you wish to use long variable names, you need only say
use English;
at the top of your program. This will alias all the short names to the long names in the current package. Some even have medium names, generally borrowed from awk.
If you don't mind the performance hit, variables that depend on the currently selected filehandle may instead be set by calling an appropriate object method on the IO::Handle object. (Summary lines below for this contain the word HANDLE.) First you must say
use IO::Handle;
after which you may use either
method HANDLE EXPR
or more safely,
HANDLE->method(EXPR)
Each method returns the old value of the IO::Handle attribute. The methods each take an optional EXPR, which if supplied specifies the new value for the IO::Handle attribute in question. If not supplied, most methods do nothing to the current value--except for autoflush(), which will assume a 1 for you, just to be different. Because loading in the IO::Handle class is an expensive operation, you should learn how to use the regular built-in variables.
A few of these variables are considered "read-only". This means that if you try to assign to this variable, either directly or indirectly through a reference, you'll raise a run-time exception.
The following list is ordered by scalar variables first, then the arrays, then the hashes.
$ARG
$_
The default input and pattern-searching space. The following pairs are equivalent:
while (<>) {...} # equivalent only in while!
while (defined($_ = <>)) {...}
/^Subject:/
$_ =~ /^Subject:/
tr/a-z/A-Z/
$_ =~ tr/a-z/A-Z/
chomp
chomp($_)
Here are the places where Perl will assume $_ even if you don't use it:
Various unary functions, including functions like ord() and int(), as well as the all file tests (-f, -d) except for -t, which defaults to STDIN.
Various list functions like print() and unlink().
The pattern matching operations m//, s///, and tr/// when used without an =~ operator.
The default iterator variable in a foreach loop if no other variable is supplied.
The implicit iterator variable in the grep() and map() functions.
The default place to put an input record when a operation's result is tested by itself as the sole criterion of a while test. Outside a while test, this will not happen.
(Mnemonic: underline is understood in certain operations.)
$
Contains the subpattern from the corresponding set of capturing parentheses from the last pattern match, not counting patterns matched in nested blocks that have been exited already. (Mnemonic: like \digits.) These variables are all read-only and dynamically scoped to the current BLOCK.
$MATCH
$&
The string matched by the last successful pattern match (not counting any matches hidden within a BLOCK or eval() enclosed by the current BLOCK). (Mnemonic: like & in some editors.) This variable is read-only and dynamically scoped to the current BLOCK.
The use of this variable anywhere in a program imposes a considerable performance penalty on all regular expression matches. See BUGS.
$PREMATCH
$`
The string preceding whatever was matched by the last successful pattern match (not counting any matches hidden within a BLOCK or eval enclosed by the current BLOCK). (Mnemonic: ` often precedes a quoted string.) This variable is read-only.
The use of this variable anywhere in a program imposes a considerable performance penalty on all regular expression matches. See BUGS.
$POSTMATCH
$'
The string following whatever was matched by the last successful pattern match (not counting any matches hidden within a BLOCK or eval() enclosed by the current BLOCK). (Mnemonic: ' often follows a quoted string.) Example:
$_ = 'abcdefghi';
/def/;
print "$`:$&:$'\n"; # prints abc:def:ghi
This variable is read-only and dynamically scoped to the current BLOCK.
The use of this variable anywhere in a program imposes a considerable performance penalty on all regular expression matches. See BUGS.
$LAST_PAREN_MATCH
$+
The last bracket matched by the last search pattern. This is useful if you don't know which one of a set of alternative patterns matched. For example:
/Version: (.*)|Revision: (.*)/ && ($rev = $+);
(Mnemonic: be positive and forward looking.) This variable is read-only and dynamically scoped to the current BLOCK.
@LAST_MATCH_END
@+
This array holds the offsets of the ends of the last successful submatches in the currently active dynamic scope. $+[0] is the offset into the string of the end of the entire match. This is the same value as what the pos function returns when called on the variable that was matched against. The nth element of this array holds the offset of the nth submatch, so $+[1] is the offset past where $1 ends, $+[2] the offset past where $2 ends, and so on. You can use $#+ to determine how many subgroups were in the last successful match. See the examples given for the @- variable.
$MULTILINE_MATCHING
$*
Set to a non-zero integer value to do multi-line matching within a string, 0 (or undefined) to tell Perl that it can assume that strings contain a single line, for the purpose of optimizing pattern matches. Pattern matches on strings containing multiple newlines can produce confusing results when $* is 0 or undefined. Default is undefined. (Mnemonic: * matches multiple things.) This variable influences the interpretation of only ^ and $. A literal newline can be searched for even when $* == 0.
Use of $* is deprecated in modern Perl, supplanted by the /s and /m modifiers on pattern matching.
Assigning a non-numerical value to $* triggers a warning (and makes $* act if $* == 0), while assigning a numerical value to $* makes that an implicit int is applied on the value.
input_line_number HANDLE EXPR
$INPUT_LINE_NUMBER
$NR
$.
The current input record number for the last file handle from which you just read() (or called a seek or tell on). The value may be different from the actual physical line number in the file, depending on what notion of "line" is in effect--see $/ on how to change that. An explicit close on a filehandle resets the line number. Because <> never does an explicit close, line numbers increase across ARGV files (but see examples in "eof" in perlfunc). Consider this variable read-only: setting it does not reposition the seek pointer; you'll have to do that on your own. Localizing $. has the effect of also localizing Perl's notion of "the last read filehandle". (Mnemonic: many programs use "." to mean the current line number.)
input_record_separator HANDLE EXPR
$INPUT_RECORD_SEPARATOR
$RS
$/
The input record separator, newline by default. This influences Perl's idea of what a "line" is. Works like awk's RS variable, including treating empty lines as a terminator if set to the null string. (An empty line cannot contain any spaces or tabs.) You may set it to a multi-character string to match a multi-character terminator, or to undef to read through the end of file. Setting it to "\n\n" means something slightly different than setting to "", if the file contains consecutive empty lines. Setting to "" will treat two or more consecutive empty lines as a single empty line. Setting to "\n\n" will blindly assume that the next input character belongs to the next paragraph, even if it's a newline. (Mnemonic: / delimits line boundaries when quoting poetry.)
undef $/; # enable "slurp" mode
$_ = ; # whole file now here
s/\n[ \t]+/ /g;
Remember: the value of $/ is a string, not a regex. awk has to be better for something. :-)
Setting $/ to a reference to an integer, scalar containing an integer, or scalar that's convertible to an integer will attempt to read records instead of lines, with the maximum record size being the referenced integer. So this:
$/ = \32768; # or \"32768", or \$var_containing_32768
open(FILE, $myfile);
$_ = ;
will read a record of no more than 32768 bytes from FILE. If you're not reading from a record-oriented file (or your OS doesn't have record-oriented files), then you'll likely get a full chunk of data with every read. If a record is larger than the record size you've set, you'll get the record back in pieces.
On VMS, record reads are done with the equivalent of sysread, so it's best not to mix record and non-record reads on the same file. (This is unlikely to be a problem, because any file you'd want to read in record mode is probably unusable in line mode.) Non-VMS systems do normal I/O, so it's safe to mix record and non-record reads of a file.
See also "Newlines" in perlport. Also see $..
autoflush HANDLE EXPR
$OUTPUT_AUTOFLUSH
$|
If set to nonzero, forces a flush right away and after every write or print on the currently selected output channel. Default is 0 (regardless of whether the channel is really buffered by the system or not; $| tells you only whether you've asked Perl explicitly to flush after each write). STDOUT will typically be line buffered if output is to the terminal and block buffered otherwise. Setting this variable is useful primarily when you are outputting to a pipe or socket, such as when you are running a Perl program under rsh and want to see the output as it's happening. This has no effect on input buffering. See "getc" in perlfunc for that. (Mnemonic: when you want your pipes to be piping hot.)
output_field_separator HANDLE EXPR
$OUTPUT_FIELD_SEPARATOR
$OFS
$,
The output field separator for the print operator. Ordinarily the print operator simply prints out its arguments without further adornment. To get behavior more like awk, set this variable as you would set awk's OFS variable to specify what is printed between fields. (Mnemonic: what is printed when there is a "," in your print statement.)
output_record_separator HANDLE EXPR
$OUTPUT_RECORD_SEPARATOR
$ORS
$\
The output record separator for the print operator. Ordinarily the print operator simply prints out its arguments as is, with no trailing newline or other end-of-record string added. To get behavior more like awk, set this variable as you would set awk's ORS variable to specify what is printed at the end of the print. (Mnemonic: you set $\ instead of adding "\n" at the end of the print. Also, it's just like $/, but it's what you get "back" from Perl.)
$LIST_SEPARATOR
$"
This is like $, except that it applies to array and slice values interpolated into a double-quoted string (or similar interpreted string). Default is a space. (Mnemonic: obvious, I think.)
$SUBSCRIPT_SEPARATOR
$SUBSEP
$;
The subscript separator for multidimensional array emulation. If you refer to a hash element as
$foo{$a,$b,$c}
it really means
$foo{join($;, $a, $b, $c)}
But don't put
@foo{$a,$b,$c} # a slice--note the @
which means
($foo{$a},$foo{$b},$foo{$c})
Default is "\034", the same as SUBSEP in awk. If your keys contain binary data there might not be any safe value for $;. (Mnemonic: comma (the syntactic subscript separator) is a semi-semicolon. Yeah, I know, it's pretty lame, but $, is already taken for something more important.)
Consider using "real" multidimensional arrays as described in perllol.
$OFMT
$#
The output format for printed numbers. This variable is a half-hearted attempt to emulate awk's OFMT variable. There are times, however, when awk and Perl have differing notions of what counts as numeric. The initial value is "%.ng", where n is the value of the macro DBL_DIG from your system's float.h. This is different from awk's default OFMT setting of "%.6g", so you need to set $# explicitly to get awk's value. (Mnemonic: # is the number sign.)
Use of $# is deprecated.
format_page_number HANDLE EXPR
$FORMAT_PAGE_NUMBER
$%
The current page number of the currently selected output channel. Used with formats. (Mnemonic: % is page number in nroff.)
format_lines_per_page HANDLE EXPR
$FORMAT_LINES_PER_PAGE
$=
The current page length (printable lines) of the currently selected output channel. Default is 60. Used with formats. (Mnemonic: = has horizontal lines.)
format_lines_left HANDLE EXPR
$FORMAT_LINES_LEFT
$-
The number of lines left on the page of the currently selected output channel. Used with formats. (Mnemonic: lines_on_page - lines_printed.)
@LAST_MATCH_START
@-
$-[0] is the offset of the start of the last successful match. $-[n] is the offset of the start of the substring matched by n-th subpattern, or undef if the subpattern did not match.
Thus after a match against $_, $& coincides with substr $_, $-[0], $+[0] - $-[0]. Similarly, $n coincides with substr $_, $-[n], $+[n] - $-[n] if $-[n] is defined, and $+ coincides with substr $_, $-[$#-], $+[$#-]. One can use $#- to find the last matched subgroup in the last successful match. Contrast with $#+, the number of subgroups in the regular expression. Compare with @+.
This array holds the offsets of the beginnings of the last successful submatches in the currently active dynamic scope. $-[0] is the offset into the string of the beginning of the entire match. The nth element of this array holds the offset of the nth submatch, so $+[1] is the offset where $1 begins, $+[2] the offset where $2 begins, and so on. You can use $#- to determine how many subgroups were in the last successful match. Compare with the @+ variable.
After a match against some variable $var:
$` is the same as substr($var, 0, $-[0])
$& is the same as substr($var, $-[0], $+[0] - $-[0])
$' is the same as substr($var, $+[0])
$1 is the same as substr($var, $-[1], $+[1] - $-[1])
$2 is the same as substr($var, $-[2], $+[2] - $-[2])
$3 is the same as substr $var, $-[3], $+[3] - $-[3])
format_name HANDLE EXPR
$FORMAT_NAME
$~
The name of the current report format for the currently selected output channel. Default is the name of the filehandle. (Mnemonic: brother to $^.)
format_top_name HANDLE EXPR
$FORMAT_TOP_NAME
$^
The name of the current top-of-page format for the currently selected output channel. Default is the name of the filehandle with _TOP appended. (Mnemonic: points to top of page.)
format_line_break_characters HANDLE EXPR
$FORMAT_LINE_BREAK_CHARACTERS
$:
The current set of characters after which a string may be broken to fill continuation fields (starting with ^) in a format. Default is " \n-", to break on whitespace or hyphens. (Mnemonic: a "colon" in poetry is a part of a line.)
format_formfeed HANDLE EXPR
$FORMAT_FORMFEED
$^L
What formats output as a form feed. Default is \f.
$ACCUMULATOR
$^A
The current value of the write() accumulator for format() lines. A format contains formline() calls that put their result into $^A. After calling its format, write() prints out the contents of $^A and empties. So you never really see the contents of $^A unless you call formline() yourself and then look at it. See perlform and "formline()" in perlfunc.
$CHILD_ERROR
$?
The status returned by the last pipe close, backtick (``) command, successful call to wait() or waitpid(), or from the system() operator. This is just the 16-bit status word returned by the wait() system call (or else is made up to look like it). Thus, the exit value of the subprocess is really ($? >> 8), and $? & 127 gives which signal, if any, the process died from, and $? & 128 reports whether there was a core dump. (Mnemonic: similar to sh and ksh.)
Additionally, if the h_errno variable is supported in C, its value is returned via $? if any gethost*() function fails.
If you have installed a signal handler for SIGCHLD, the value of $? will usually be wrong outside that handler.
Inside an END subroutine $? contains the value that is going to be given to exit(). You can modify $? in an END subroutine to change the exit status of your program. For example:
END {
$? = 1 if $? == 255; # die would make it 255
}
Under VMS, the pragma use vmsish 'status' makes $? reflect the actual VMS exit status, instead of the default emulation of POSIX status.
Also see "Error Indicators".
$OS_ERROR
$ERRNO
$!
If used numerically, yields the current value of the C errno variable, with all the usual caveats. (This means that you shouldn't depend on the value of $! to be anything in particular unless you've gotten a specific error return indicating a system error.) If used an a string, yields the corresponding system error string. You can assign a number to $! to set errno if, for instance, you want "$!" to return the string for error n, or you want to set the exit value for the die() operator. (Mnemonic: What just went bang?)
Also see "Error Indicators".
$EXTENDED_OS_ERROR
$^E
Error information specific to the current operating system. At the moment, this differs from $! under only VMS, OS/2, and Win32 (and for MacPerl). On all other platforms, $^E is always just the same as $!.
Under VMS, $^E provides the VMS status value from the last system error. This is more specific information about the last system error than that provided by $!. This is particularly important when $! is set to EVMSERR.
Under OS/2, $^E is set to the error code of the last call to OS/2 API either via CRT, or directly from perl.
Under Win32, $^E always returns the last error information reported by the Win32 call GetLastError() which describes the last error from within the Win32 API. Most Win32-specific code will report errors via $^E. ANSI C and Unix-like calls set errno and so most portable Perl code will report errors via $!.
Caveats mentioned in the description of $! generally apply to $^E, also. (Mnemonic: Extra error explanation.)
Also see "Error Indicators".
$EVAL_ERROR
$@
The Perl syntax error message from the last eval() operator. If null, the last eval() parsed and executed correctly (although the operations you invoked may have failed in the normal fashion). (Mnemonic: Where was the syntax error "at"?)
Warning messages are not collected in this variable. You can, however, set up a routine to process warnings by setting $SIG{__WARN__} as described below.
Also see "Error Indicators".
$PROCESS_ID
$PID
$$
The process number of the Perl running this script. You should consider this variable read-only, although it will be altered across fork() calls. (Mnemonic: same as shells.)
$REAL_USER_ID
$UID
$<
The real uid of this process. (Mnemonic: it's the uid you came from, if you're running setuid.)
$EFFECTIVE_USER_ID
$EUID
$>
The effective uid of this process. Example:
$< = $>; # set real to effective uid
($<,$>) = ($>,$<); # swap real and effective uid
(Mnemonic: it's the uid you went to, if you're running setuid.) $< and $> can be swapped only on machines supporting setreuid().
$REAL_GROUP_ID
$GID
$(
The real gid of this process. If you are on a machine that supports membership in multiple groups simultaneously, gives a space separated list of groups you are in. The first number is the one returned by getgid(), and the subsequent ones by getgroups(), one of which may be the same as the first number.
However, a value assigned to $( must be a single number used to set the real gid. So the value given by $( should not be assigned back to $( without being forced numeric, such as by adding zero.
(Mnemonic: parentheses are used to group things. The real gid is the group you left, if you're running setgid.)
$EFFECTIVE_GROUP_ID
$EGID
$)
The effective gid of this process. If you are on a machine that supports membership in multiple groups simultaneously, gives a space separated list of groups you are in. The first number is the one returned by getegid(), and the subsequent ones by getgroups(), one of which may be the same as the first number.
Similarly, a value assigned to $) must also be a space-separated list of numbers. The first number sets the effective gid, and the rest (if any) are passed to setgroups(). To get the effect of an empty list for setgroups(), just repeat the new effective gid; that is, to force an effective gid of 5 and an effectively empty setgroups() list, say $) = "5 5" .
(Mnemonic: parentheses are used to group things. The effective gid is the group that's right for you, if you're running setgid.)
$<, $>, $( and $) can be set only on machines that support the corresponding set[re][ug]id() routine. $( and $) can be swapped only on machines supporting setregid().
$PROGRAM_NAME
$0
Contains the name of the program being executed. On some operating systems assigning to $0 modifies the argument area that the ps program sees. This is more useful as a way of indicating the current program state than it is for hiding the program you're running. (Mnemonic: same as sh and ksh.)
Note for BSD users: setting $0 does not completely remove "perl" from the ps(1) output. For example, setting $0 to "foobar" will result in "perl: foobar (perl)". This is an operating system feature.
$[
The index of the first element in an array, and of the first character in a substring. Default is 0, but you could theoretically set it to 1 to make Perl behave more like awk (or Fortran) when subscripting and when evaluating the index() and substr() functions. (Mnemonic: [ begins subscripts.)
As of release 5 of Perl, assignment to $[ is treated as a compiler directive, and cannot influence the behavior of any other file. Its use is highly discouraged.
$]
The version + patchlevel / 1000 of the Perl interpreter. This variable can be used to determine whether the Perl interpreter executing a script is in the right range of versions. (Mnemonic: Is this version of perl in the right bracket?) Example:
warn "No checksumming!\n" if $] < 3.019;
See also the documentation of use VERSION and require VERSION for a convenient way to fail if the running Perl interpreter is too old.
The use of this variable is deprecated. The floating point representation can sometimes lead to inaccurate numeric comparisons. See $^V for a more modern representation of the Perl version that allows accurate string comparisons.
$COMPILING
$^C
The current value of the flag associated with the -c switch. Mainly of use with -MO=... to allow code to alter its behavior when being compiled, such as for example to AUTOLOAD at compile time rather than normal, deferred loading. See perlcc. Setting $^C = 1 is similar to calling B::minus_c.
$DEBUGGING
$^D
The current value of the debugging flags. (Mnemonic: value of -D switch.)
$SYSTEM_FD_MAX
$^F
The maximum system file descriptor, ordinarily 2. System file descriptors are passed to exec()ed processes, while higher file descriptors are not. Also, during an open(), system file descriptors are preserved even if the open() fails. (Ordinary file descriptors are closed before the open() is attempted.) The close-on-exec status of a file descriptor will be decided according to the value of $^F when the corresponding file, pipe, or socket was opened, not the time of the exec().
$^H
WARNING: This variable is strictly for internal use only. Its availability, behavior, and contents are subject to change without notice.
This variable contains compile-time hints for the Perl interpreter. At the end of compilation of a BLOCK the value of this variable is restored to the value when the interpreter started to compile the BLOCK.
When perl begins to parse any block construct that provides a lexical scope (e.g., eval body, required file, subroutine body, loop body, or conditional block), the existing value of $^H is saved, but its value is left unchanged. When the compilation of the block is completed, it regains the saved value. Between the points where its value is saved and restored, code that executes within BEGIN blocks is free to change the value of $^H.
This behavior provides the semantic of lexical scoping, and is used in, for instance, the use strict pragma.
The contents should be an integer; different bits of it are used for different pragmatic flags. Here's an example:
sub add_100 { $^H |= 0x100 }
sub foo {
BEGIN { add_100() }
bar->baz($boon);
}
Consider what happens during execution of the BEGIN block. At this point the BEGIN block has already been compiled, but the body of foo() is still being compiled. The new value of $^H will therefore be visible only while the body of foo() is being compiled.
Substitution of the above BEGIN block with:
BEGIN { require strict; strict->import('vars') }
demonstrates how use strict 'vars' is implemented. Here's a conditional version of the same lexical pragma:
BEGIN { require strict; strict->import('vars') if $condition }
%^H
WARNING: This variable is strictly for internal use only. Its availability, behavior, and contents are subject to change without notice.
The %^H hash provides the same scoping semantic as $^H. This makes it useful for implementation of lexically scoped pragmas.
$INPLACE_EDIT
$^I
The current value of the inplace-edit extension. Use undef to disable inplace editing. (Mnemonic: value of -i switch.)
$^M
By default, running out of memory is an untrappable, fatal error. However, if suitably built, Perl can use the contents of $^M as an emergency memory pool after die()ing. Suppose that your Perl were compiled with -DPERL_EMERGENCY_SBRK and used Perl's malloc. Then
$^M = 'a' x (1 << 16);
would allocate a 64K buffer for use in an emergency. See the INSTALL file in the Perl distribution for information on how to enable this option. To discourage casual use of this advanced feature, there is no English long name for this variable.
$OSNAME
$^O
The name of the operating system under which this copy of Perl was built, as determined during the configuration process. The value is identical to $Config{'osname'}. See also Config and the -V command-line switch documented in perlrun.
$PERLDB
$^P
The internal variable for debugging support. The meanings of the various bits are subject to change, but currently indicate:
0x01
Debug subroutine enter/exit.
0x02
Line-by-line debugging.
0x04
Switch off optimizations.
0x08
Preserve more data for future interactive inspections.
0x10
Keep info about source lines on which a subroutine is defined.
0x20
Start with single-step on.
0x40
Use subroutine address instead of name when reporting.
0x80
Report goto &subroutine as well.
0x100
Provide informative "file" names for evals based on the place they were compiled.
0x200
Provide informative names to anonymous subroutines based on the place they were compiled.
Some bits may be relevant at compile-time only, some at run-time only. This is a new mechanism and the details may change.
$LAST_REGEXP_CODE_RESULT
$^R
The result of evaluation of the last successful (?{ code }) regular expression assertion (see perlre). May be written to.
$EXCEPTIONS_BEING_CAUGHT
$^S
Current state of the interpreter. Undefined if parsing of the current module/eval is not finished (may happen in $SIG{__DIE__} and $SIG{__WARN__} handlers). True if inside an eval(), otherwise false.
$BASETIME
$^T
The time at which the program began running, in seconds since the epoch (beginning of 1970). The values returned by the -M, -A, and -C filetests are based on this value.
$PERL_VERSION
$^V
The revision, version, and subversion of the Perl interpreter, represented as a string composed of characters with those ordinals. Thus in Perl v5.6.0 it equals chr(5) . chr(6) . chr(0) and will return true for $^V eq v5.6.0. Note that the characters in this string value can potentially be in Unicode range.
This can be used to determine whether the Perl interpreter executing a script is in the right range of versions. (Mnemonic: use ^V for Version Control.) Example:
warn "No \"our\" declarations!\n" if $^V and $^V lt v5.6.0;
See the documentation of use VERSION and require VERSION for a convenient way to fail if the running Perl interpreter is too old.
See also $] for an older representation of the Perl version.
$WARNING
$^W
The current value of the warning switch, initially true if -w was used, false otherwise, but directly modifiable. (Mnemonic: related to the -w switch.) See also warnings.
${^WARNING_BITS}
The current set of warning checks enabled by the use warnings pragma. See the documentation of warnings for more details.
${^WIDE_SYSTEM_CALLS}
Global flag that enables system calls made by Perl to use wide character APIs native to the system, if available. This is currently only implemented on the Windows platform.
This can also be enabled from the command line using the -C switch.
The initial value is typically 0 for compatibility with Perl versions earlier than 5.6, but may be automatically set to 1 by Perl if the system provides a user-settable default (e.g., $ENV{LC_CTYPE}).
The bytes pragma always overrides the effect of this flag in the current lexical scope. See bytes.
$EXECUTABLE_NAME
$^X
The name that the Perl binary itself was executed as, from C's argv[0]. This may not be a full pathname, nor even necessarily in your path.
$ARGV
contains the name of the current file when reading from <>.
@ARGV
The array @ARGV contains the command-line arguments intended for the script. $#ARGV is generally the number of arguments minus one, because $ARGV[0] is the first argument, not the program's command name itself. See $0 for the command name.
@INC
The array @INC contains the list of places that the do EXPR, require, or use constructs look for their library files. It initially consists of the arguments to any -I command-line switches, followed by the default Perl library, probably /usr/local/lib/perl, followed by ".", to represent the current directory. If you need to modify this at runtime, you should use the use lib pragma to get the machine-dependent library properly loaded also:
use lib '/mypath/libdir/';
use SomeMod;
@_
Within a subroutine the array @_ contains the parameters passed to that subroutine. See perlsub.
%INC
The hash %INC contains entries for each filename included via the do, require, or use operators. The key is the filename you specified (with module names converted to pathnames), and the value is the location of the file found. The require operator uses this hash to determine whether a particular file has already been included.
%ENV
$ENV{expr}
The hash %ENV contains your current environment. Setting a value in ENV changes the environment for any child processes you subsequently fork() off.
%SIG
$SIG{expr}
The hash %SIG contains signal handlers for signals. For example:
sub handler { # 1st argument is signal name
my($sig) = @_;
print "Caught a SIG$sig--shutting down\n";
close(LOG);
exit(0);
}
$SIG{'INT'} = \&handler;
$SIG{'QUIT'} = \&handler;
...
$SIG{'INT'} = 'DEFAULT'; # restore default action
$SIG{'QUIT'} = 'IGNORE'; # ignore SIGQUIT
Using a value of 'IGNORE' usually has the effect of ignoring the signal, except for the CHLD signal. See perlipc for more about this special case.
Here are some other examples:
$SIG{"PIPE"} = "Plumber"; # assumes main::Plumber (not recommended)
$SIG{"PIPE"} = \&Plumber; # just fine; assume current Plumber
$SIG{"PIPE"} = *Plumber; # somewhat esoteric
$SIG{"PIPE"} = Plumber(); # oops, what did Plumber() return??
Be sure not to use a bareword as the name of a signal handler, lest you inadvertently call it.
If your system has the sigaction() function then signal handlers are installed using it. This means you get reliable signal handling. If your system has the SA_RESTART flag it is used when signals handlers are installed. This means that system calls for which restarting is supported continue rather than returning when a signal arrives. If you want your system calls to be interrupted by signal delivery then do something like this:
use POSIX ':signal_h';
my $alarm = 0;
sigaction SIGALRM, new POSIX::SigAction sub { $alarm = 1 }
or die "Error setting SIGALRM handler: $!\n";
See POSIX.
Certain internal hooks can be also set using the %SIG hash. The routine indicated by $SIG{__WARN__} is called when a warning message is about to be printed. The warning message is passed as the first argument. The presence of a __WARN__ hook causes the ordinary printing of warnings to STDERR to be suppressed. You can use this to save warnings in a variable, or turn warnings into fatal errors, like this:
local $SIG{__WARN__} = sub { die $_[0] };
eval $proggie;
The routine indicated by $SIG{__DIE__} is called when a fatal exception is about to be thrown. The error message is passed as the first argument. When a __DIE__ hook routine returns, the exception processing continues as it would have in the absence of the hook, unless the hook routine itself exits via a goto, a loop exit, or a die(). The __DIE__ handler is explicitly disabled during the call, so that you can die from a __DIE__ handler. Similarly for __WARN__.
Due to an implementation glitch, the $SIG{__DIE__} hook is called even inside an eval(). Do not use this to rewrite a pending exception in $@, or as a bizarre substitute for overriding CORE::GLOBAL::die(). This strange action at a distance may be fixed in a future release so that $SIG{__DIE__} is only called if your program is about to exit, as was the original intent. Any other use is deprecated.
__DIE__/__WARN__ handlers are very special in one respect: they may be called to report (probable) errors found by the parser. In such a case the parser may be in inconsistent state, so any attempt to evaluate Perl code from such a handler will probably result in a segfault. This means that warnings or errors that result from parsing Perl should be used with extreme caution, like this:
require Carp if defined $^S;
Carp::confess("Something wrong") if defined &Carp::confess;
die "Something wrong, but could not load Carp to give backtrace...
To see backtrace try starting Perl with -MCarp switch";
Here the first line will load Carp unless it is the parser who called the handler. The second line will print backtrace and die if Carp was available. The third line will be executed only if Carp was not available.
See "die" in perlfunc, "warn" in perlfunc, "eval" in perlfunc, and warnings for additional information.
Error Indicators
The variables $@, $!, $^E, and $? contain information about different types of error conditions that may appear during execution of a Perl program. The variables are shown ordered by the "distance" between the subsystem which reported the error and the Perl process. They correspond to errors detected by the Perl interpreter, C library, operating system, or an external program, respectively.
To illustrate the differences between these variables, consider the following Perl expression, which uses a single-quoted string:
eval q{
open PIPE, "/cdrom/install |";
@res = ;
close PIPE or die "bad pipe: $?, $!";
};
After execution of this statement all 4 variables may have been set.
$@ is set if the string to be eval-ed did not compile (this may happen if open or close were imported with bad prototypes), or if Perl code executed during evaluation die()d . In these cases the value of $@ is the compile error, or the argument to die (which will interpolate $! and $?!). (See also Fatal, though.)
When the eval() expression above is executed, open(), , and close are translated to calls in the C run-time library and thence to the operating system kernel. $! is set to the C library's errno if one of these calls fails.
Under a few operating systems, $^E may contain a more verbose error indicator, such as in this case, "CDROM tray not closed." Systems that do not support extended error messages leave $^E the same as $!.
Finally, $? may be set to non-0 value if the external program /cdrom/install fails. The upper eight bits reflect specific error conditions encountered by the program (the program's exit() value). The lower eight bits reflect mode of failure, like signal death and core dump information See wait(2) for details. In contrast to $! and $^E, which are set only if error condition is detected, the variable $? is set on each wait or pipe close, overwriting the old value. This is more like $@, which on every eval() is always set on failure and cleared on success.
For more details, see the individual descriptions at $@, $!, $^E, and $?.
Technical Note on the Syntax of Variable Names
Variable names in Perl can have several formats. Usually, they must begin with a letter or underscore, in which case they can be arbitrarily long (up to an internal limit of 251 characters) and may contain letters, digits, underscores, or the special sequence :: or '. In this case, the part before the last :: or ' is taken to be a package qualifier; see perlmod.
Perl variable names may also be a sequence of digits or a single punctuation or control character. These names are all reserved for special uses by Perl; for example, the all-digits names are used to hold data captured by backreferences after a regular expression match. Perl has a special syntax for the single-control-character names: It understands ^X (caret X) to mean the control-X character. For example, the notation $^W (dollar-sign caret W) is the scalar variable whose name is the single character control-W. This is better than typing a literal control-W into your program.
Finally, new in Perl 5.6, Perl variable names may be alphanumeric strings that begin with control characters (or better yet, a caret). These variables must be written in the form ${^Foo}; the braces are not optional. ${^Foo} denotes the scalar variable whose name is a control-F followed by two o's. These variables are reserved for future special uses by Perl, except for the ones that begin with ^_ (control-underscore or caret-underscore). No control-character name that begins with ^_ will acquire a special meaning in any future version of Perl; such names may therefore be used safely in programs. $^_ itself, however, is reserved.
Perl identifiers that begin with digits, control characters, or punctuation characters are exempt from the effects of the package declaration and are always forced to be in package main. A few other names are also exempt:
ENV STDIN
INC STDOUT
ARGV STDERR
ARGVOUT
SIG
In particular, the new special ${^_XYZ} variables are always taken to be in package main, regardless of any package declarations presently in scope.
BUGS
Due to an unfortunate accident of Perl's implementation, use English imposes a considerable performance penalty on all regular expression matches in a program, regardless of whether they occur in the scope of use English. For that reason, saying use English in libraries is strongly discouraged. See the Devel::SawAmpersand module documentation from CPAN (http://www.perl.com/CPAN/modules/by-module/Devel/) for more information.
Having to even think about the $^S variable in your exception handlers is simply wrong. $SIG{__DIE__} as currently implemented invites grievous and difficult to track down errors. Avoid it and use an END{} or CORE::GLOBAL::die override instead.
Pod-Simple-3.32/t/corpus2/ 0000755 0001750 0001750 00000000000 12562034636 013713 5 ustar cs3516 cs3516 Pod-Simple-3.32/t/corpus2/polish_utf16le_bom.txt 0000644 0001750 0001750 00000005762 12553003563 020162 0 ustar cs3516 cs3516 ÿþ
= h e a d 1 N A M E
W ZR Ó D N O C N E J C I S Z Y - - i m p l i c i t l y u t f 8 t e s t d o c u m e n t i n P o l i s h
= h e a d 1 D E S C R I P T I O N
T h i s i s a t e s t P o d d o c u m e n t i n U T F 8 . I t s c o n t e n t i s t h e l y r i c s t o
t h e P o l i s h C h r i s t m a s c a r o l " W [r ó d n o c n e j c i s z y " .
W [r ó d n o c n e j c i s z y g Bo s s i r o z c h o d z i : /
W s t a Dc i e , p a s t e r z e , B ó g s i n a m r o d z i ! /
C z y m p r d z e j s i w y b i e r a j c i e , /
D o B e t l e j e m p o s p i e s z a j c i e /
P r z y w i t a P a n a .
P o s z l i , z n a l e zl i D z i e c i t k o w |Bo b i e /
Z w s z y s t k i m i z n a k i d a n y m i s o b i e . /
J a k o B o g u c z e [ M u d a l i , /
A w i t a j c z a w o Ba l i /
Z w i e l k i e j r a d o [c i :
A c h , w i t a j Z b a w c o z d a w n o |d a n y , /
W i e l e t y s i c y l a t w y g l d a n y /
N a C i e b i e k r ó l e , p r o r o c y /
C z e k a l i , a T y [ t e j n o c y /
N a m s i o b j a w i B.
I m y c z e k a m y n a C i e b i e , P a n a , /
A s k o r o p r z y j d z i e s z n a g Bo s k a p Ba n a , /
P a d n i e m y n a t w a r z p r z e d T o b , /
W i e r z c , |e [ j e s t p o d o s Bo n /
C h l e b a i w i n a .
= h e a d 2 A s V e r b a t i m
A n d n o w a s v e r b a t i m t e x t :
W [r ó d n o c n e j c i s z y g Bo s s i r o z c h o d z i :
W s t a Dc i e , p a s t e r z e , B ó g s i n a m r o d z i !
C z y m p r d z e j s i w y b i e r a j c i e ,
D o B e t l e j e m p o s p i e s z a j c i e
P r z y w i t a P a n a .
P o s z l i , z n a l e zl i D z i e c i t k o w |Bo b i e
Z w s z y s t k i m i z n a k i d a n y m i s o b i e .
J a k o B o g u c z e [ M u d a l i ,
A w i t a j c z a w o Ba l i
Z w i e l k i e j r a d o [c i :
A c h , w i t a j Z b a w c o z d a w n o |d a n y ,
W i e l e t y s i c y l a t w y g l d a n y
N a C i e b i e k r ó l e , p r o r o c y
C z e k a l i , a T y [ t e j n o c y
N a m s i o b j a w i B.
I m y c z e k a m y n a C i e b i e , P a n a ,
A s k o r o p r z y j d z i e s z n a g Bo s k a p Ba n a ,
P a d n i e m y n a t w a r z p r z e d T o b ,
W i e r z c , |e [ j e s t p o d o s Bo n
C h l e b a i w i n a .
[ e n d ]
= c u t
Pod-Simple-3.32/t/corpus2/polish_utf8_bom2.xml 0000644 0001750 0001750 00000005602 12553003563 017616 0 ustar cs3516 cs3516
NAME
WÅRÃD NOCNEJ CISZY -- implicitly utf8
test document in Polish
DESCRIPTION
This is a test Pod document in UTF8. Its content is the
lyrics to the Polish Christmas carol "WÅród
nocnej ciszy".
WÅród nocnej ciszy gÅos
siÄ rozchodzi: / WstaÅcie, pasterze,
Bóg siÄ nam rodzi! / Czym prÄdzej
siÄ wybierajcie, / Do Betlejem pospieszajcie
/ PrzywitaÄ Pana.
Poszli, znaleźli DzieciÄ tko w żÅobie
/ Z wszystkimi znaki danymi sobie. / Jako Bogu czeÅÄ
Mu dali, / A witajÄ c zawoÅali / Z wielkiej
radoÅci:
Ach, witaj Zbawco z dawno Å¼Ä dany, / Wiele
tysiÄcy lat wyglÄ dany / Na Ciebie króle,
prorocy / Czekali, a TyÅ tej nocy / Nam siÄ
objawiÅ.
I my czekamy na Ciebie, Pana, / A skoro przyjdziesz na gÅos
kapÅana, / Padniemy na twarz przed TobÄ
, / WierzÄ c, żeÅ jest pod osÅonÄ
/ Chleba i wina.
As Verbatim
And now as verbatim text:
WÅród nocnej ciszy gÅos
siÄ rozchodzi:
WstaÅcie, pasterze, Bóg siÄ
nam rodzi!
Czym prÄdzej siÄ wybierajcie,
Do Betlejem pospieszajcie
PrzywitaÄ Pana.
Poszli, znaleźli DzieciÄ
tko w żÅobie
Z wszystkimi znaki danymi sobie.
Jako Bogu czeÅÄ Mu dali,
A witajÄ
c zawoÅali
Z wielkiej radoÅci:
Ach, witaj Zbawco z dawno żÄ
dany,
Wiele tysiÄcy lat wyglÄ
dany
Na Ciebie króle, prorocy
Czekali, a TyÅ tej nocy
Nam siÄ objawiÅ.
I my czekamy na Ciebie, Pana,
A skoro przyjdziesz na gÅos kapÅana,
Padniemy na twarz przed TobÄ
,
WierzÄ
c, żeŠjest pod
osÅonÄ
Chleba i wina.
[end]
Pod-Simple-3.32/t/corpus2/polish_utf8_bom.xml 0000644 0001750 0001750 00000005602 12553003563 017534 0 ustar cs3516 cs3516
NAME
WÅRÃD NOCNEJ CISZY -- implicitly utf8
test document in Polish
DESCRIPTION
This is a test Pod document in UTF8. Its content is the
lyrics to the Polish Christmas carol "WÅród
nocnej ciszy".
WÅród nocnej ciszy gÅos
siÄ rozchodzi: / WstaÅcie, pasterze,
Bóg siÄ nam rodzi! / Czym prÄdzej
siÄ wybierajcie, / Do Betlejem pospieszajcie
/ PrzywitaÄ Pana.
Poszli, znaleźli DzieciÄ tko w żÅobie
/ Z wszystkimi znaki danymi sobie. / Jako Bogu czeÅÄ
Mu dali, / A witajÄ c zawoÅali / Z wielkiej
radoÅci:
Ach, witaj Zbawco z dawno Å¼Ä dany, / Wiele
tysiÄcy lat wyglÄ dany / Na Ciebie króle,
prorocy / Czekali, a TyÅ tej nocy / Nam siÄ
objawiÅ.
I my czekamy na Ciebie, Pana, / A skoro przyjdziesz na gÅos
kapÅana, / Padniemy na twarz przed TobÄ
, / WierzÄ c, żeÅ jest pod osÅonÄ
/ Chleba i wina.
As Verbatim
And now as verbatim text:
WÅród nocnej ciszy gÅos
siÄ rozchodzi:
WstaÅcie, pasterze, Bóg siÄ
nam rodzi!
Czym prÄdzej siÄ wybierajcie,
Do Betlejem pospieszajcie
PrzywitaÄ Pana.
Poszli, znaleźli DzieciÄ
tko w żÅobie
Z wszystkimi znaki danymi sobie.
Jako Bogu czeÅÄ Mu dali,
A witajÄ
c zawoÅali
Z wielkiej radoÅci:
Ach, witaj Zbawco z dawno żÄ
dany,
Wiele tysiÄcy lat wyglÄ
dany
Na Ciebie króle, prorocy
Czekali, a TyÅ tej nocy
Nam siÄ objawiÅ.
I my czekamy na Ciebie, Pana,
A skoro przyjdziesz na gÅos kapÅana,
Padniemy na twarz przed TobÄ
,
WierzÄ
c, żeŠjest pod
osÅonÄ
Chleba i wina.
[end]
Pod-Simple-3.32/t/corpus2/fiqhakbar_iso6.xml 0000644 0001750 0001750 00000022511 12553003563 017321 0 ustar cs3516 cs3516
NAME
متن الفقه
الاكبر -- test document:
"al-Fiqh al-Akbar" as ISO-8859-6
DESCRIPTION
This document is Abu Hanifah's "al-Fiqh al-Akbar"
as ISO-8859-6, presented as an item-number list:
متن الفقه
الاكبر
المنسوب الى
ابي حنيفة
النعمان بن
ثابت
لا نكفر أحدا
بذنب ولا ننفي
أحدا من الايمان
.
إنا نأمر بالمعروف
وننهي عن المنكر
.
واعلم أن ما
أصابك لم يكن
ليخطئك ، وما
أخطأك لم يكن
ليصيبك .
لا نتبرأ من
أحد من أصحاب
رسول الله
صلى الله عليه
وسلم ولا يتوالى
أحد دون أحد
.
إنا نرد أمر
عثمان وعلي
الى الله وهو
عالم السر
والخفيات
.
الفقه في الدين
أفضل من الفقه
في العلم .
واختلاف الامة
رحمة .
من آمن بجميع
ما يؤمر به
الا أنه قال
لا أعرف موسى
وعيسى عليهما
السلام أمن
المرسلين
أم من غير المرسلين
فإنه يكفر
.
من قال لا أعرف
الله أفي السماء
أم في الارض
فقد كفر .
من قال لا أعرف
عذاب القبر
فهو من الطبقة
الجهمية والهالكية
.
And now run together as a paragraph:
لا نكفر أحدا
بذنب ولا ننفي
أحدا من الايمان
. إنا نأمر بالمعروف
وننهي عن المنكر
. واعلم أن ما
أصابك لم يكن
ليخطئك ، وما
أخطأك لم يكن
ليصيبك . لا
نتبرأ من أحد
من أصحاب رسول
الله صلى الله
عليه وسلم
ولا يتوالى
أحد دون أحد
. إنا نرد أمر
عثمان وعلي
الى الله وهو
عالم السر
والخفيات
. الفقه في الدين
أفضل من الفقه
في العلم . واختلاف
الامة رحمة
. من آمن بجميع
ما يؤمر به
الا أنه قال
لا أعرف موسى
وعيسى عليهما
السلام أمن
المرسلين
أم من غير المرسلين
فإنه يكفر
. من قال لا أعرف
الله أفي السماء
أم في الارض
فقد كفر . من
قال لا أعرف
عذاب القبر
فهو من الطبقة
الجهمية والهالكية
.
And now the first three as a verbatim section:
لا نكفر أحدا
بذنب ولا ننفي
أحدا من الايمان
.
إنا نأمر بالمعروف
وننهي عن المنكر
.
واعلم أن ما
أصابك لم يكن
ليخطئك ، وما
أخطأك لم يكن
ليصيبك .
[end]
Pod-Simple-3.32/t/corpus2/polish_utf8_bom2.txt 0000644 0001750 0001750 00000003002 12553003563 017625 0 ustar cs3516 cs3516 =head1 NAME
WŚRÓD NOCNEJ CISZY -- implicitly utf8 test document in Polish
=head1 DESCRIPTION
This is a test Pod document in UTF8. Its content is the lyrics to
the Polish Christmas carol "Wśród nocnej ciszy".
Wśród nocnej ciszy głos się rozchodzi: /
Wstańcie, pasterze, Bóg się nam rodzi! /
Czym prędzej się wybierajcie, /
Do Betlejem pospieszajcie /
Przywitać Pana.
Poszli, znaleźli Dzieciątko w żłobie /
Z wszystkimi znaki danymi sobie. /
Jako Bogu cześć Mu dali, /
A witając zawołali /
Z wielkiej radości:
Ach, witaj Zbawco z dawno żądany, /
Wiele tysięcy lat wyglądany /
Na Ciebie króle, prorocy /
Czekali, a TyÅ› tej nocy /
Nam się objawił.
I my czekamy na Ciebie, Pana, /
A skoro przyjdziesz na głos kapłana, /
Padniemy na twarz przed TobÄ…, /
Wierząc, żeś jest pod osłoną /
Chleba i wina.
=head2 As Verbatim
And now as verbatim text:
Wśród nocnej ciszy głos się rozchodzi:
Wstańcie, pasterze, Bóg się nam rodzi!
Czym prędzej się wybierajcie,
Do Betlejem pospieszajcie
Przywitać Pana.
Poszli, znaleźli Dzieciątko w żłobie
Z wszystkimi znaki danymi sobie.
Jako Bogu cześć Mu dali,
A witając zawołali
Z wielkiej radości:
Ach, witaj Zbawco z dawno żądany,
Wiele tysięcy lat wyglądany
Na Ciebie króle, prorocy
Czekali, a TyÅ› tej nocy
Nam się objawił.
I my czekamy na Ciebie, Pana,
A skoro przyjdziesz na głos kapłana,
Padniemy na twarz przed TobÄ…,
Wierząc, żeś jest pod osłoną
Chleba i wina.
[end]
=cut
Pod-Simple-3.32/t/corpus2/polish_utf16be_bom.txt 0000644 0001750 0001750 00000005762 12553003563 020150 0 ustar cs3516 cs3516 þÿ
= h e a d 1 N A M E
WZ R Ó D N O C N E J C I S Z Y - - i m p l i c i t l y u t f 8 t e s t d o c u m e n t i n P o l i s h
= h e a d 1 D E S C R I P T I O N
T h i s i s a t e s t P o d d o c u m e n t i n U T F 8 . I t s c o n t e n t i s t h e l y r i c s t o
t h e P o l i s h C h r i s t m a s c a r o l " W[ r ó d n o c n e j c i s z y " .
W[ r ó d n o c n e j c i s z y gB o s s i r o z c h o d z i : /
W s t aD c i e , p a s t e r z e , B ó g s i n a m r o d z i ! /
C z y m p r d z e j s i w y b i e r a j c i e , /
D o B e t l e j e m p o s p i e s z a j c i e /
P r z y w i t a P a n a .
P o s z l i , z n a l ez l i D z i e c i t k o w |B o b i e /
Z w s z y s t k i m i z n a k i d a n y m i s o b i e . /
J a k o B o g u c z e[ M u d a l i , /
A w i t a j c z a w oB a l i /
Z w i e l k i e j r a d o[ c i :
A c h , w i t a j Z b a w c o z d a w n o | d a n y , /
W i e l e t y s i c y l a t w y g l d a n y /
N a C i e b i e k r ó l e , p r o r o c y /
C z e k a l i , a T y[ t e j n o c y /
N a m s i o b j a w iB .
I m y c z e k a m y n a C i e b i e , P a n a , /
A s k o r o p r z y j d z i e s z n a gB o s k a pB a n a , /
P a d n i e m y n a t w a r z p r z e d T o b , /
W i e r z c , | e[ j e s t p o d o sB o n /
C h l e b a i w i n a .
= h e a d 2 A s V e r b a t i m
A n d n o w a s v e r b a t i m t e x t :
W[ r ó d n o c n e j c i s z y gB o s s i r o z c h o d z i :
W s t aD c i e , p a s t e r z e , B ó g s i n a m r o d z i !
C z y m p r d z e j s i w y b i e r a j c i e ,
D o B e t l e j e m p o s p i e s z a j c i e
P r z y w i t a P a n a .
P o s z l i , z n a l ez l i D z i e c i t k o w |B o b i e
Z w s z y s t k i m i z n a k i d a n y m i s o b i e .
J a k o B o g u c z e[ M u d a l i ,
A w i t a j c z a w oB a l i
Z w i e l k i e j r a d o[ c i :
A c h , w i t a j Z b a w c o z d a w n o | d a n y ,
W i e l e t y s i c y l a t w y g l d a n y
N a C i e b i e k r ó l e , p r o r o c y
C z e k a l i , a T y[ t e j n o c y
N a m s i o b j a w iB .
I m y c z e k a m y n a C i e b i e , P a n a ,
A s k o r o p r z y j d z i e s z n a gB o s k a pB a n a ,
P a d n i e m y n a t w a r z p r z e d T o b ,
W i e r z c , | e[ j e s t p o d o sB o n
C h l e b a i w i n a .
[ e n d ]
= c u t
Pod-Simple-3.32/t/corpus2/polish_utf8_bom.txt 0000644 0001750 0001750 00000003002 12553003563 017543 0 ustar cs3516 cs3516 
=head1 NAME
WŚRÓD NOCNEJ CISZY -- implicitly utf8 test document in Polish
=head1 DESCRIPTION
This is a test Pod document in UTF8. Its content is the lyrics to
the Polish Christmas carol "Wśród nocnej ciszy".
Wśród nocnej ciszy głos się rozchodzi: /
Wstańcie, pasterze, Bóg się nam rodzi! /
Czym prędzej się wybierajcie, /
Do Betlejem pospieszajcie /
Przywitać Pana.
Poszli, znaleźli Dzieciątko w żłobie /
Z wszystkimi znaki danymi sobie. /
Jako Bogu cześć Mu dali, /
A witając zawołali /
Z wielkiej radości:
Ach, witaj Zbawco z dawno żądany, /
Wiele tysięcy lat wyglądany /
Na Ciebie króle, prorocy /
Czekali, a TyÅ› tej nocy /
Nam się objawił.
I my czekamy na Ciebie, Pana, /
A skoro przyjdziesz na głos kapłana, /
Padniemy na twarz przed TobÄ…, /
Wierząc, żeś jest pod osłoną /
Chleba i wina.
=head2 As Verbatim
And now as verbatim text:
Wśród nocnej ciszy głos się rozchodzi:
Wstańcie, pasterze, Bóg się nam rodzi!
Czym prędzej się wybierajcie,
Do Betlejem pospieszajcie
Przywitać Pana.
Poszli, znaleźli Dzieciątko w żłobie
Z wszystkimi znaki danymi sobie.
Jako Bogu cześć Mu dali,
A witając zawołali
Z wielkiej radości:
Ach, witaj Zbawco z dawno żądany,
Wiele tysięcy lat wyglądany
Na Ciebie króle, prorocy
Czekali, a TyÅ› tej nocy
Nam się objawił.
I my czekamy na Ciebie, Pana,
A skoro przyjdziesz na głos kapłana,
Padniemy na twarz przed TobÄ…,
Wierząc, żeś jest pod osłoną
Chleba i wina.
[end]
=cut
Pod-Simple-3.32/t/corpus2/fiqhakbar_iso6.txt 0000644 0001750 0001750 00000003371 12553003563 017343 0 ustar cs3516 cs3516
=encoding iso-8859-6
=head1 NAME
åÊæ Çäáâç ÇäÇãÈÑ -- test document: "al-Fiqh al-Akbar" as ISO-8859-6
=head1 DESCRIPTION
This document is Abu Hanifah's "al-Fiqh al-Akbar" as ISO-8859-6, presented
as an item-number list:
åÊæ Çäáâç ÇäÇãÈÑ
ÇäåæÓèÈ Çäé ÇÈê ÍæêáÉ ÇäæÙåÇæ Èæ ËÇÈÊ
=over
=item 1
äÇ æãáÑ ÃÍÏÇ ÈÐæÈ èäÇ ææáê ÃÍÏÇ åæ ÇäÇêåÇæ .
=item 2
ÅæÇ æÃåÑ ÈÇäåÙÑèá èææçê Ùæ ÇäåæãÑ .
=item 3
èÇÙäå Ãæ åÇ ÃÕÇÈã äå êãæ äêÎ×Æã ¬ èåÇ ÃÎ×Ãã äå êãæ äêÕêÈã .
=item 4
äÇ æÊÈÑÃ åæ ÃÍÏ åæ ÃÕÍÇÈ ÑÓèä Çääç Õäé Çääç Ùäêç èÓäå èäÇ êÊèÇäé ÃÍÏ Ïèæ ÃÍÏ .
=item 5
ÅæÇ æÑÏ ÃåÑ ÙËåÇæ èÙäê Çäé Çääç èçè ÙÇäå ÇäÓÑ èÇäÎáêÇÊ .
=item 6
Çäáâç áê ÇäÏêæ ÃáÖä åæ Çäáâç áê ÇäÙäå .
=item 7
èÇÎÊäÇá ÇäÇåÉ ÑÍåÉ .
=item 8
åæ Âåæ ÈÌåêÙ åÇ êÄåÑ Èç ÇäÇ Ãæç âÇä äÇ ÃÙÑá åèÓé èÙêÓé ÙäêçåÇ ÇäÓäÇå Ãåæ ÇäåÑÓäêæ Ãå åæ ÚêÑ ÇäåÑÓäêæ áÅæç êãáÑ .
=item 9
åæ âÇä äÇ ÃÙÑá Çääç Ãáê ÇäÓåÇÁ Ãå áê ÇäÇÑÖ áâÏ ãáÑ .
=item 10
åæ âÇä äÇ ÃÙÑá ÙÐÇÈ ÇäâÈÑ áçè åæ Çä×ÈâÉ ÇäÌçåêÉ èÇäçÇäãêÉ .
=back
And now run together as a paragraph:
äÇ æãáÑ ÃÍÏÇ ÈÐæÈ èäÇ ææáê ÃÍÏÇ åæ ÇäÇêåÇæ .
ÅæÇ æÃåÑ ÈÇäåÙÑèá èææçê Ùæ ÇäåæãÑ .
èÇÙäå Ãæ åÇ ÃÕÇÈã äå êãæ äêÎ×Æã ¬ èåÇ ÃÎ×Ãã äå êãæ äêÕêÈã .
äÇ æÊÈÑÃ åæ ÃÍÏ åæ ÃÕÍÇÈ ÑÓèä Çääç Õäé Çääç Ùäêç èÓäå èäÇ êÊèÇäé ÃÍÏ Ïèæ ÃÍÏ .
ÅæÇ æÑÏ ÃåÑ ÙËåÇæ èÙäê Çäé Çääç èçè ÙÇäå ÇäÓÑ èÇäÎáêÇÊ .
Çäáâç áê ÇäÏêæ ÃáÖä åæ Çäáâç áê ÇäÙäå .
èÇÎÊäÇá ÇäÇåÉ ÑÍåÉ .
åæ Âåæ ÈÌåêÙ åÇ êÄåÑ Èç ÇäÇ Ãæç âÇä äÇ ÃÙÑá åèÓé èÙêÓé ÙäêçåÇ ÇäÓäÇå Ãåæ ÇäåÑÓäêæ Ãå åæ ÚêÑ ÇäåÑÓäêæ áÅæç êãáÑ .
åæ âÇä äÇ ÃÙÑá Çääç Ãáê ÇäÓåÇÁ Ãå áê ÇäÇÑÖ áâÏ ãáÑ .
åæ âÇä äÇ ÃÙÑá ÙÐÇÈ ÇäâÈÑ áçè åæ Çä×ÈâÉ ÇäÌçåêÉ èÇäçÇäãêÉ .
And now the first three as a verbatim section:
äÇ æãáÑ ÃÍÏÇ ÈÐæÈ èäÇ ææáê ÃÍÏÇ åæ ÇäÇêåÇæ .
ÅæÇ æÃåÑ ÈÇäåÙÑèá èææçê Ùæ ÇäåæãÑ .
èÇÙäå Ãæ åÇ ÃÕÇÈã äå êãæ äêÎ×Æã ¬ èåÇ ÃÎ×Ãã äå êãæ äêÕêÈã .
[end]
=cut
Pod-Simple-3.32/t/corpus2/README 0000644 0001750 0001750 00000000244 12553003563 014566 0 ustar cs3516 cs3516 This is a corpus of data that hasn't been implemented yet. It's
included for future reference, and will be moved to the main corpus
directory as it is implemented.
Pod-Simple-3.32/t/corpus2/polish_implicit_utf8.txt 0000644 0001750 0001750 00000002777 12553003563 020622 0 ustar cs3516 cs3516
=head1 NAME
WŚRÓD NOCNEJ CISZY -- implicitly utf8 test document in Polish
=head1 DESCRIPTION
This is a test Pod document in UTF8. Its content is the lyrics to
the Polish Christmas carol "Wśród nocnej ciszy".
Wśród nocnej ciszy głos się rozchodzi: /
Wstańcie, pasterze, Bóg się nam rodzi! /
Czym prędzej się wybierajcie, /
Do Betlejem pospieszajcie /
Przywitać Pana.
Poszli, znaleźli Dzieciątko w żłobie /
Z wszystkimi znaki danymi sobie. /
Jako Bogu cześć Mu dali, /
A witając zawołali /
Z wielkiej radości:
Ach, witaj Zbawco z dawno żądany, /
Wiele tysięcy lat wyglądany /
Na Ciebie króle, prorocy /
Czekali, a TyÅ› tej nocy /
Nam się objawił.
I my czekamy na Ciebie, Pana, /
A skoro przyjdziesz na głos kapłana, /
Padniemy na twarz przed TobÄ…, /
Wierząc, żeś jest pod osłoną /
Chleba i wina.
=head2 As Verbatim
And now as verbatim text:
Wśród nocnej ciszy głos się rozchodzi:
Wstańcie, pasterze, Bóg się nam rodzi!
Czym prędzej się wybierajcie,
Do Betlejem pospieszajcie
Przywitać Pana.
Poszli, znaleźli Dzieciątko w żłobie
Z wszystkimi znaki danymi sobie.
Jako Bogu cześć Mu dali,
A witając zawołali
Z wielkiej radości:
Ach, witaj Zbawco z dawno żądany,
Wiele tysięcy lat wyglądany
Na Ciebie króle, prorocy
Czekali, a TyÅ› tej nocy
Nam się objawił.
I my czekamy na Ciebie, Pana,
A skoro przyjdziesz na głos kapłana,
Padniemy na twarz przed TobÄ…,
Wierząc, żeś jest pod osłoną
Chleba i wina.
[end]
=cut
Pod-Simple-3.32/t/search22.t 0000644 0001750 0001750 00000006571 12553003563 014120 0 ustar cs3516 cs3516 BEGIN {
if($ENV{PERL_CORE}) {
chdir 't';
@INC = '../lib';
}
}
use strict;
use Pod::Simple::Search;
use Test;
BEGIN { plan tests => 13 }
print "# ", __FILE__,
": Testing the scanning of several docroots...\n";
my $x = Pod::Simple::Search->new;
die "Couldn't make an object!?" unless ok defined $x;
$x->inc(0);
$x->shadows(1);
use File::Spec;
use Cwd;
my $cwd = cwd();
print "# CWD: $cwd\n";
sub source_path {
my $file = shift;
if ($ENV{PERL_CORE}) {
return "../lib/Pod/Simple/t/$file";
} else {
return $file;
}
}
my($here1, $here2, $here3);
if( -e ($here1 = source_path('testlib1' ))) {
die "But where's $here2?"
unless -e ($here2 = source_path('testlib2'));
die "But where's $here3?"
unless -e ($here3 = source_path('testlib3'));
} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'testlib1' ))) {
die "But where's $here2?"
unless -e ($here2 = File::Spec->catdir($cwd, 't', 'testlib2'));
die "But where's $here3?"
unless -e ($here3 = File::Spec->catdir($cwd, 't', 'testlib3'));
} else {
die "Can't find the test corpora";
}
print "# OK, found the test corpora\n# as $here1\n# and $here2\n# and $here3\n#\n";
ok 1;
print $x->_state_as_string;
#$x->verbose(12);
use Pod::Simple;
*pretty = \&Pod::Simple::BlackBox::pretty;
my($name2where, $where2name) = $x->survey($here1, $here2, $here3);
my $p = pretty( $where2name, $name2where )."\n";
$p =~ s/, +/,\n/g;
$p =~ s/^/# /mg;
print $p;
my $ascii_order;
if( -e ($ascii_order = source_path('ascii_order.pl'))) {
#
} elsif(-e ($ascii_order = File::Spec->catfile($cwd, 't', 'ascii_order.pl'))) {
#
} else {
die "Can't find ascii_order.pl";
}
require $ascii_order;
{
print "# won't show any shadows, since we're just looking at the name2where keys\n";
my $names = join "|", sort ascii_order keys %$name2where;
skip $^O eq 'VMS' ? '-- case may or may not be preserved' : 0,
$names,
"Blorm|Suzzle|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|perlzuk|squaa|squaa::Glunk|squaa::Vliff|squaa::Wowo|zikzik";
}
{
print "# but here we'll see shadowing:\n";
my $names = join "|", sort ascii_order values %$where2name;
skip $^O eq 'VMS' ? '-- case may or may not be preserved' : 0,
$names,
"Blorm|Suzzle|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Glunk|hinkhonk::Vliff|hinkhonk::Vliff|perlflif|perlthng|perlthng|perlzuk|squaa|squaa::Glunk|squaa::Vliff|squaa::Vliff|squaa::Vliff|squaa::Wowo|zikzik";
my %count;
for(values %$where2name) { ++$count{$_} };
#print pretty(\%count), "\n\n";
delete @count{ grep $count{$_} < 2, keys %count };
my $shadowed = join "|", sort ascii_order keys %count;
ok $shadowed, "hinkhonk::Glunk|hinkhonk::Vliff|perlthng|squaa::Vliff";
sub thar { print "# Seen $_[0] :\n", map "# {$_}\n", sort ascii_order grep $where2name->{$_} eq $_[0],keys %$where2name; return; }
ok $count{'perlthng'}, 2;
thar 'perlthng';
ok $count{'squaa::Vliff'}, 3;
thar 'squaa::Vliff';
}
ok( ($name2where->{'squaa'} || 'huh???'), '/squaa\.pm$/');
ok grep( m/squaa\.pm/, keys %$where2name ), 1;
ok( ($name2where->{'perlthng'} || 'huh???'), '/[^\^]testlib1/' );
ok( ($name2where->{'squaa::Vliff'} || 'huh???'), '/[^\^]testlib1/' );
# Some sanity:
skip $^O eq 'VMS' ? '-- case may or may not be preserved' : 0,
($name2where->{'squaa::Wowo'} || 'huh???'),
'/testlib2/';
print "# OK, bye from ", __FILE__, "\n";
ok 1;
__END__
Pod-Simple-3.32/t/perlcyg.pod 0000644 0001750 0001750 00000047665 12553003563 014504 0 ustar cs3516 cs3516 If you read this file _as_is_, just ignore the funny characters you
see. It is written in the POD format (see pod/perlpod.pod) which is
specially designed to be readable as is.
=head1 NAME
README.cygwin - Perl for Cygwin
=head1 SYNOPSIS
This document will help you configure, make, test and install Perl
on Cygwin. This document also describes features of Cygwin that will
affect how Perl behaves at runtime.
B There are pre-built Perl packages available for Cygwin and a
version of Perl is provided on the Cygwin CD. If you do not need to
customize the configuration, consider using one of these packages:
http://cygutils.netpedia.net/
=head1 PREREQUISITES
=head2 Cygwin = GNU+Cygnus+Windows (Don't leave UNIX without it)
The Cygwin tools are ports of the popular GNU development tools for Win32
platforms. They run thanks to the Cygwin library which provides the UNIX
system calls and environment these programs expect. More information
about this project can be found at:
http://www.cygwin.com/
A recent net or commercial release of Cygwin is required.
At the time this document was last updated, Cygwin 1.1.5 was current.
B At this point, minimal effort has been made to provide
compatibility with old (beta) Cygwin releases. The focus has been to
provide a high quality release and not worry about working around old
bugs. If you wish to use Perl with Cygwin B20.1 or earlier, consider
using perl5.005_03, which is available in source and binary form at
C . If there is significant demand,
a patch kit can be developed to port back to earlier Cygwin versions.
=head2 Cygwin Configuration
While building Perl some changes may be necessary to your Cygwin setup so
that Perl builds cleanly. These changes are B required for normal
Perl usage.
B The binaries that are built will run on all Win32 versions.
They do not depend on your host system (Win9x/WinME, WinNT/Win2K)
or your Cygwin configuration (I, I, binary/text mounts).
The only dependencies come from hard-coded pathnames like C.
However, your host system and Cygwin configuration will affect Perl's
runtime behavior (see L"TEST">).
=over 4
=item * C
Set the C environment variable so that Configure finds the Cygwin
versions of programs. Any Windows directories should be removed or
moved to the end of your C.
=item * I
If you do not have I (which is part of the I package),
Configure will B prompt you to install I pages.
=item * Permissions
On WinNT with either the I or I C settings, directory
and file permissions may not be set correctly. Since the build process
creates directories and files, to be safe you may want to run a `C' on the entire Perl source tree.
Also, it is a well known WinNT "feature" that files created by a login
that is a member of the I group will be owned by the
I group. Depending on your umask, you may find that you
can not write to files that you just created (because you are no longer
the owner). When using the I C setting, this is not an
issue because it "corrects" the ownership to what you would expect on
a UNIX system.
=back
=head1 CONFIGURE
The default options gathered by Configure with the assistance of
F will build a Perl that supports dynamic loading
(which requires a shared F).
This will run Configure and keep a record:
./Configure 2>&1 | tee log.configure
If you are willing to accept all the defaults run Configure with B<-de>.
However, several useful customizations are available.
=head2 Strip Binaries
It is possible to strip the EXEs and DLLs created by the build process.
The resulting binaries will be significantly smaller. If you want the
binaries to be stripped, you can either add a B<-s> option when Configure
prompts you,
Any additional ld flags (NOT including libraries)? [none] -s
Any special flags to pass to gcc to use dynamic linking? [none] -s
Any special flags to pass to ld2 to create a dynamically loaded library?
[none] -s
or you can edit F and uncomment the relevant variables
near the end of the file.
=head2 Optional Libraries
Several Perl functions and modules depend on the existence of
some optional libraries. Configure will find them if they are
installed in one of the directories listed as being used for library
searches. Pre-built packages for most of these are available at
C .
=over 4
=item * C<-lcrypt>
The crypt package distributed with Cygwin is a Linux compatible 56-bit
DES crypt port by Corinna Vinschen.
Alternatively, the crypt libraries in GNU libc have been ported to Cygwin.
The DES based Ultra Fast Crypt port was done by Alexey Truhan:
ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Okhapkin_Sergey/cw32crypt-dist-0.tgz
NOTE: There are various export restrictions on DES implementations,
see the glibc README for more details.
The MD5 port was done by Andy Piper:
ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Okhapkin_Sergey/libcrypt.tgz
=item * C<-lgdbm> (C)
GDBM is available for Cygwin. GDBM's ndbm/dbm compatibility feature
also makes C and C possible (although they add
little extra value).
NOTE: The ndbm/dbm emulations only completely work on NTFS partitions.
=item * C<-ldb> (C)
BerkeleyDB is available for Cygwin. Some details can be found in
F.
NOTE: The BerkeleyDB library only completely works on NTFS partitions.
=item * C<-lcygipc> (C)
A port of SysV IPC is available for Cygwin.
NOTE: This has B been extensively tested. In particular,
C is undefined because it fails a Configure test
and on Win9x the I functions seem to hang. It also creates
a compile time dependency because F includes F<>
and F<> (which will be required in the future when compiling
CPAN modules).
=back
=head2 Configure-time Options
The F document describes several Configure-time options. Some of
these will work with Cygwin, others are not yet possible. Also, some of
these are experimental. You can either select an option when Configure
prompts you or you can define (undefine) symbols on the command line.
=over 4
=item * C<-Uusedl>
Undefining this symbol forces Perl to be compiled statically.
=item * C<-Uusemymalloc>
By default Perl uses the malloc() included with the Perl source. If you
want to force Perl to build with the system malloc() undefine this symbol.
=item * C<-Dusemultiplicity>
Multiplicity is required when embedding Perl in a C program and using
more than one interpreter instance. This works with the Cygwin port.
=item * C<-Duseperlio>
The PerlIO abstraction works with the Cygwin port.
=item * C<-Duse64bitint>
I supports 64-bit integers. However, several additional long long
functions are necessary to use them within Perl (I<{strtol,strtoul}l>).
These are B yet available with Cygwin.
=item * C<-Duselongdouble>
I supports long doubles (12 bytes). However, several additional
long double math functions are necessary to use them within Perl
(I<{atan2,cos,exp,floor,fmod,frexp,isnan,log,modf,pow,sin,sqrt}l,strtold>).
These are B yet available with Cygwin.
=item * C<-Dusethreads>
POSIX threads are B yet implemented in Cygwin.
=item * C<-Duselargefiles>
Although Win32 supports large files, Cygwin currently uses 32-bit integers
for internal size and position calculations.
=back
=head2 Suspicious Warnings
You may see some messages during Configure that seem suspicious.
=over 4
=item * I
I is needed to build dynamic libraries, but it does not exist
when dlsym() checking occurs (it is not created until `C' runs).
You will see the following message:
Checking whether your dlsym() needs a leading underscore ...
ld2: not found
I can't compile and run the test program.
I'm guessing that dlsym doesn't need a leading underscore.
Since the guess is correct, this is not a problem.
=item * Win9x and C
Win9x does not correctly report C with a non-blocking read on a
closed pipe. You will see the following messages:
But it also returns -1 to signal EOF, so be careful!
WARNING: you can't distinguish between EOF and no data!
*** WHOA THERE!!! ***
The recommended value for $d_eofnblk on this machine was "define"!
Keep the recommended value? [y]
At least for consistency with WinNT, you should keep the recommended
value.
=item * Compiler/Preprocessor defines
The following error occurs because of the Cygwin C<#define> of
C<_LONG_DOUBLE>:
Guessing which symbols your C compiler and preprocessor define...
try.c:: parse error
This failure does not seem to cause any problems.
=back
=head1 MAKE
Simply run I and wait:
make 2>&1 | tee log.make
=head2 Warnings
Warnings like these are normal:
warning: overriding commands for target
warning: ignoring old commands for target
dllwrap: no export definition file provided
dllwrap: creating one, but that may not be what you want
=head2 ld2
During `C', I will be created and installed in your $installbin
directory (where you said to put public executables). It does not
wait until the `C' process to install the I script,
this is because the remainder of the `C' refers to I without
fully specifying its path and does this from multiple subdirectories.
The assumption is that $installbin is in your current C. If this
is not the case `C' will fail at some point. If this happens,
just manually copy I from the source directory to somewhere in
your C.
=head1 TEST
There are two steps to running the test suite:
make test 2>&1 | tee log.make-test
cd t;./perl harness 2>&1 | tee ../log.harness
The same tests are run both times, but more information is provided when
running as `C<./perl harness>'.
Test results vary depending on your host system and your Cygwin
configuration. If a test can pass in some Cygwin setup, it is always
attempted and explainable test failures are documented. It is possible
for Perl to pass all the tests, but it is more likely that some tests
will fail for one of the reasons listed below.
=head2 File Permissions
UNIX file permissions are based on sets of mode bits for
{read,write,execute} for each {user,group,other}. By default Cygwin
only tracks the Win32 read-only attribute represented as the UNIX file
user write bit (files are always readable, files are executable if they
have a F<.{com,bat,exe}> extension or begin with C<#!>, directories are
always readable and executable). On WinNT with the I C
setting, the additional mode bits are stored as extended file attributes.
On WinNT with the I C setting, permissions use the standard
WinNT security descriptors and access control lists. Without one of
these options, these tests will fail:
Failed Test List of failed
------------------------------------
io/fs.t 5, 7, 9-10
lib/anydbm.t 2
lib/db-btree.t 20
lib/db-hash.t 16
lib/db-recno.t 18
lib/gdbm.t 2
lib/ndbm.t 2
lib/odbm.t 2
lib/sdbm.t 2
op/stat.t 9, 20 (.tmp not an executable extension)
=head2 Hard Links
FAT partitions do not support hard links (whereas NTFS does), in which
case Cygwin implements link() by copying the file. On remote (network)
drives Cygwin's stat() always sets C to 1, so the link count
for remote directories and files is not available. In either case,
these tests will fail:
Failed Test List of failed
------------------------------------
io/fs.t 4
op/stat.t 3
=head2 Filetime Granularity
On FAT partitions the filetime granularity is 2 seconds. The following
test will fail:
Failed Test List of failed
------------------------------------
io/fs.t 18
=head2 Tainting Checks
When Perl is running in taint mode, C<$ENV{PATH}> is considered tainted
and not used, so DLLs not in the default system directories will not
be found. While the tests are running you will see warnings popup from
the system with messages like:
Win9x
Error Starting Program
A required .DLL file, CYGWIN1.DLL, was not found
WinNT
perl.exe - Unable to Locate DLL
The dynamic link library cygwin1.dll could not be found in the
specified path ...
Just click OK and ignore them. When running `C', 2 popups
occur. During `C<./perl harness>', 4 popups occur. Also, these tests
will fail:
Failed Test List of failed
------------------------------------
op/taint.t 1, 3, 31, 37
Alternatively, you can copy F into the directory where the
tests run:
cp /bin/cygwin1.dll t
or one of the Windows system directories (although, this is B
recommended).
=head2 /etc/group
Cygwin does not require F, in which case the F
test will be skipped. The check performed by F expects to
see entries that use the members field, otherwise this test will fail:
Failed Test List of failed
------------------------------------
op/grent.t 1
=head2 Script Portability
Cygwin does an outstanding job of providing UNIX-like semantics on top of
Win32 systems. However, in addition to the items noted above, there are
some differences that you should know about. This is a very brief guide
to portability, more information can be found in the Cygwin documentation.
=over 4
=item * Pathnames
Cygwin pathnames can be separated by forward (F>) or backward (F<\>)
slashes. They may also begin with drive letters (F) or Universal
Naming Codes (F/UNC>). DOS device names (F, F, F,
F, F, F) are invalid as base filenames. However, they
can be used in extensions (e.g., F). Names may contain all
printable characters except these:
: * ? " < > |
File names are case insensitive, but case preserving. A pathname that
contains a backslash or drive letter is a Win32 pathname (and not subject
to the translations applied to POSIX style pathnames).
=item * Text/Binary
When a file is opened it is in either text or binary mode. In text mode
a file is subject to CR/LF/Ctrl-Z translations. With Cygwin, the default
mode for an open() is determined by the mode of the mount that underlies
the file. Perl provides a binmode() function to set binary mode on files
that otherwise would be treated as text. sysopen() with the C
flag sets text mode on files that otherwise would be treated as binary:
sysopen(FOO, "bar", O_WRONLY|O_CREAT|O_TEXT)
lseek(), tell() and sysseek() only work with files opened in binary mode.
The text/binary issue is covered at length in the Cygwin documentation.
=item * F<.exe>
The Cygwin stat(), lstat() and readlink() functions make the F<.exe>
extension transparent by looking for F when you ask for F
(unless a F also exists). Cygwin does not require a F<.exe>
extension, but I adds it automatically when building a program.
However, when accessing an executable as a normal file (e.g., I
in a makefile) the F<.exe> is not transparent. The I included
with Cygwin automatically appends a F<.exe> when necessary.
=item * chown()
On WinNT chown() can change a file's user and group IDs. On Win9x chown()
is a no-op, although this is appropriate since there is no security model.
=item * Miscellaneous
File locking using the C command to fcntl() is a stub that
returns C.
Win9x can not rename() an open file (although WinNT can).
The Cygwin chroot() implementation has holes (it can not restrict file
access by native Win32 programs).
=back
=head1 INSTALL
This will install Perl, including I pages.
make install | tee log.make-install
NOTE: If C is redirected `C' will B prompt
you to install I into F.
You may need to be I to run `C'. If you
are not, you must have write access to the directories in question.
Information on installing the Perl documentation in HTML format can be
found in the F document.
=head1 MANIFEST
These are the files in the Perl release that contain references to Cygwin.
These very brief notes attempt to explain the reason for all conditional
code. Hopefully, keeping this up to date will allow the Cygwin port to
be kept as clean as possible.
=over 4
=item Documentation
INSTALL README.cygwin README.win32 MANIFEST
Changes Changes5.005 Changes5.004 Changes5.6
pod/perl.pod pod/perlport.pod pod/perlfaq3.pod
pod/perldelta.pod pod/perl5004delta.pod pod/perl56delta.pod
pod/perlhist.pod pod/perlmodlib.pod pod/buildtoc.PL pod/perltoc.pod
=item Build, Configure, Make, Install
cygwin/Makefile.SHs
cygwin/ld2.in
cygwin/perlld.in
ext/IPC/SysV/hints/cygwin.pl
ext/NDBM_File/hints/cygwin.pl
ext/ODBM_File/hints/cygwin.pl
hints/cygwin.sh
Configure - help finding hints from uname,
shared libperl required for dynamic loading
Makefile.SH - linklibperl
Porting/patchls - cygwin in port list
installman - man pages with :: translated to .
installperl - install dll/ld2/perlld, install to pods
makedepend.SH - uwinfix
=item Tests
t/io/tell.t - binmode
t/lib/b.t - ignore Cwd from os_extras
t/lib/glob-basic.t - Win32 directory list access differs from read mode
t/op/magic.t - $^X/symlink WORKAROUND, s/.exe//
t/op/stat.t - no /dev, skip Win32 ftCreationTime quirk
(cache manager sometimes preserves ctime of file
previously created and deleted), no -u (setuid)
=item Compiled Perl Source
EXTERN.h - __declspec(dllimport)
XSUB.h - __declspec(dllexport)
cygwin/cygwin.c - os_extras (getcwd, spawn)
perl.c - os_extras
perl.h - binmode
doio.c - win9x can not rename a file when it is open
pp_sys.c - do not define h_errno, pp_system with spawn
util.c - use setenv
=item Compiled Module Source
ext/POSIX/POSIX.xs - tzname defined externally
ext/SDBM_File/sdbm/pair.c
- EXTCONST needs to be redefined from EXTERN.h
ext/SDBM_File/sdbm/sdbm.c
- binary open
=item Perl Modules/Scripts
lib/Cwd.pm - hook to internal Cwd::cwd
lib/ExtUtils/MakeMaker.pm
- require MM_Cygwin.pm
lib/ExtUtils/MM_Cygwin.pm
- canonpath, cflags, manifypods, perl_archive
lib/File/Find.pm - on remote drives stat() always sets st_nlink to 1
lib/File/Spec/Unix.pm - preserve //unc
lib/File/Temp.pm - no directory sticky bit
lib/perl5db.pl - use stdin not /dev/tty
utils/perldoc.PL - version comment
=back
=head1 BUGS
When I starts, it warns about overriding commands for F.
`C' does not remove library F<.def> or F<.exe.stackdump>
files.
The I script contains references to the source directory. You should
change these to $installbin after `C'.
Support for swapping real and effective user and group IDs is incomplete.
On WinNT Cygwin provides setuid(), seteuid(), setgid() and setegid().
However, additional Cygwin calls for manipulating WinNT access tokens
and security contexts are required.
When building DLLs, `C' is used to export
global symbols. It might be better to generate an explicit F<.def> file
(see F). Also, DLLs can now be build with `C'.
=head1 AUTHORS
Charles Wilson ,
Eric Fifer ,
alexander smishlajev ,
Steven Morlock ,
Sebastien Barre ,
Teun Burgers .
=head1 HISTORY
Last updated: 9 November 2000
Pod-Simple-3.32/t/search26.t 0000644 0001750 0001750 00000004217 12553003563 014117 0 ustar cs3516 cs3516 BEGIN {
if($ENV{PERL_CORE}) {
chdir 't';
@INC = '../lib';
}
}
use strict;
use Pod::Simple::Search;
use Test;
BEGIN { plan tests => 5 }
#
# "kleene" rhymes with "zany". It's a fact!
#
print "# ", __FILE__,
": Testing limit_glob ...\n";
my $x = Pod::Simple::Search->new;
die "Couldn't make an object!?" unless ok defined $x;
$x->inc(0);
$x->shadows(1);
use File::Spec;
use Cwd;
my $cwd = cwd();
print "# CWD: $cwd\n";
sub source_path {
my $file = shift;
if ($ENV{PERL_CORE}) {
return "../lib/Pod/Simple/t/$file";
} else {
return $file;
}
}
my($here1, $here2, $here3);
if( -e ($here1 = source_path( 'testlib1' ))) {
die "But where's $here2?"
unless -e ($here2 = source_path ( 'testlib2'));
die "But where's $here3?"
unless -e ($here3 = source_path( 'testlib3'));
} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'testlib1' ))) {
die "But where's $here2?"
unless -e ($here2 = File::Spec->catdir($cwd, 't', 'testlib2'));
die "But where's $here3?"
unless -e ($here3 = File::Spec->catdir($cwd, 't', 'testlib3'));
} else {
die "Can't find the test corpora";
}
print "# OK, found the test corpora\n# as $here1\n# and $here2\n# and $here3\n#\n";
ok 1;
print $x->_state_as_string;
#$x->verbose(12);
use Pod::Simple;
*pretty = \&Pod::Simple::BlackBox::pretty;
my $glob = '*k';
print "# Limiting to $glob\n";
$x->limit_glob($glob);
my($name2where, $where2name) = $x->survey($here1, $here2, $here3);
my $p = pretty( $where2name, $name2where )."\n";
$p =~ s/, +/,\n/g;
$p =~ s/^/# /mg;
print $p;
my $ascii_order;
if( -e ($ascii_order = source_path('ascii_order.pl'))) {
#
} elsif(-e ($ascii_order = File::Spec->catfile($cwd, 't', 'ascii_order.pl'))) {
#
} else {
die "Can't find ascii_order.pl";
}
require $ascii_order;
{
my $names = join "|", sort ascii_order keys %$name2where;
ok $names, "Zonk::Pronk|hinkhonk::Glunk|perlzuk|squaa::Glunk|zikzik";
}
{
my $names = join "|", sort ascii_order values %$where2name;
ok $names, "Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Glunk|perlzuk|squaa::Glunk|zikzik";
}
print "# OK, bye from ", __FILE__, "\n";
ok 1;
__END__
Pod-Simple-3.32/t/search25.t 0000644 0001750 0001750 00000005411 12553003563 014113 0 ustar cs3516 cs3516 BEGIN {
if($ENV{PERL_CORE}) {
chdir 't';
@INC = '../lib';
}
}
use strict;
#sub Pod::Simple::Search::DEBUG () {5};
use Pod::Simple::Search;
use Test;
BEGIN { plan tests => 10 }
print "# ", __FILE__,
": Testing limit_glob ...\n";
my $x = Pod::Simple::Search->new;
die "Couldn't make an object!?" unless ok defined $x;
$x->inc(0);
$x->shadows(1);
use File::Spec;
use Cwd;
my $cwd = cwd();
print "# CWD: $cwd\n";
my $dir;
sub source_path {
my $file = shift;
if ($ENV{PERL_CORE}) {
my $updir = File::Spec->updir;
$dir = File::Spec->catdir($updir, 'lib', 'Pod', 'Simple', 't');
return File::Spec->catdir ($dir, $file);
} else {
return $file;
}
}
my($here1, $here2, $here3);
if( -e ($here1 = source_path( 'testlib1' ))) {
die "But where's $here2?"
unless -e ($here2 = source_path( 'testlib2'));
die "But where's $here3?"
unless -e ($here3 = source_path( 'testlib3'));
} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'testlib1' ))) {
die "But where's $here2?"
unless -e ($here2 = File::Spec->catdir($cwd, 't', 'testlib2'));
die "But where's $here3?"
unless -e ($here3 = File::Spec->catdir($cwd, 't', 'testlib3'));
} else {
die "Can't find the test corpora: $dir";
}
print "# OK, found the test corpora\n# as $here1\n# and $here2\n# and $here3\n#\n";
ok 1;
print $x->_state_as_string;
#$x->verbose(12);
use Pod::Simple;
*pretty = \&Pod::Simple::BlackBox::pretty;
my $glob = 'squaa::*';
print "# Limiting to $glob\n";
$x->limit_glob($glob);
my($name2where, $where2name) = $x->survey($here1, $here2, $here3);
my $p = pretty( $where2name, $name2where )."\n";
$p =~ s/, +/,\n/g;
$p =~ s/^/# /mg;
print $p;
{
my $names = join "|", sort keys %$name2where;
skip $^O eq 'VMS' ? '-- case may or may not be preserved' : 0,
$names,
"squaa::Glunk|squaa::Vliff|squaa::Wowo";
}
{
my $names = join "|", sort values %$where2name;
skip $^O eq 'VMS' ? '-- case may or may not be preserved' : 0,
$names,
"squaa::Glunk|squaa::Vliff|squaa::Vliff|squaa::Vliff|squaa::Wowo";
my %count;
for(values %$where2name) { ++$count{$_} };
#print pretty(\%count), "\n\n";
delete @count{ grep $count{$_} < 2, keys %count };
my $shadowed = join "|", sort keys %count;
ok $shadowed, "squaa::Vliff";
sub thar { print "# Seen $_[0] :\n", map "# {$_}\n", sort grep $where2name->{$_} eq $_[0],keys %$where2name; return; }
ok $count{'squaa::Vliff'}, 3;
thar 'squaa::Vliff';
}
ok ! $name2where->{'squaa'}; # because squaa.pm isn't squaa::*
ok( ($name2where->{'squaa::Vliff'} || 'huh???'), '/[^\^]testlib1/' );
skip $^O eq 'VMS' ? '-- case may or may not be preserved' : 0,
($name2where->{'squaa::Wowo'} || 'huh???'),
'/testlib2/';
print "# OK, bye from ", __FILE__, "\n";
ok 1;
__END__
Pod-Simple-3.32/t/fcodes_s.t 0000644 0001750 0001750 00000030123 12553003563 014262 0 ustar cs3516 cs3516 # fcodes S
BEGIN {
if($ENV{PERL_CORE}) {
chdir 't';
@INC = '../lib';
}
}
use strict;
use Test;
BEGIN { plan tests => 80 };
#use Pod::Simple::Debug (6);
ok 1;
use Pod::Simple::XMLOutStream;
print "# Pod::Simple version $Pod::Simple::VERSION\n";
my $x = 'Pod::Simple::XMLOutStream';
sub e ($$) { $x->_duo(@_) }
$Pod::Simple::XMLOutStream::ATTR_PAD = ' ';
$Pod::Simple::XMLOutStream::SORT_ATTRS = 1; # for predictably testable output
print "# S as such...\n";
ok( $x->_out("=pod\n\nI like S.\n"),
=> '
This is an ordinary for block.