From: Chip Salzenberg Date: Thu, 19 Dec 1996 04:44:00 +0000 (+1200) Subject: [shell changes from patch from perl5.003_11 to perl5.003_12] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f2cbb5f7981d75896143accdc8bed8a11f580b2e;p=p5sagit%2Fp5-mst-13.2.git [shell changes from patch from perl5.003_11 to perl5.003_12] Change from running these commands: # create new directories test -d lib/CPAN || mkdir lib/CPAN test -d vms/ext/DCLsym || mkdir vms/ext/DCLsym # be sure that new test is executable touch t/op/recurse.t chmod +x t/op/recurse.t # get rid of old files rm -f lib/splain rm -f old_embed.pl rm -f old_global.sym rm -f old_perl_exp.SH rm -f pod/perli18n.pod rm -f t/re_tests # ready to patch exit 0 --- diff --git a/.dotest/last b/.dotest/last new file mode 100644 index 0000000..e69de29 diff --git a/lib/splain b/lib/splain deleted file mode 100755 index a8af08f..0000000 --- a/lib/splain +++ /dev/null @@ -1,507 +0,0 @@ -#!/usr/local/bin/perl -eval 'exec perl -S $0 ${1+"$@"}' - if 0; - -use Config; -if ($^O eq 'VMS') { - $diagnostics::PODFILE = VMS::Filespec::unixify($Config{'privlibexp'}) . - '/pod/perldiag.pod'; -} -else { $diagnostics::PODFILE= $Config{privlibexp} . "/pod/perldiag.pod"; } - -package diagnostics; -require 5.001; -use English; -use Carp; - -=head1 NAME - -diagnostics - Perl compiler pragma to force verbose warning diagnostics - -splain - standalone program to do the same thing - -=head1 SYNOPSIS - -As a pragma: - - use diagnostics; - use diagnostics -verbose; - - enable diagnostics; - disable diagnostics; - -Aa a program: - - perl program 2>diag.out - splain [-v] [-p] diag.out - - -=head1 DESCRIPTION - -=head2 The C Pragma - -This module extends the terse diagnostics normally emitted by both the -perl compiler and the perl interpeter, augmenting them with the more -explicative and endearing descriptions found in L. Like the -other pragmata, it affects the compilation phase of your program rather -than merely the execution phase. - -To use in your program as a pragma, merely invoke - - use diagnostics; - -at the start (or near the start) of your program. (Note -that this I enable perl's B<-w> flag.) Your whole -compilation will then be subject(ed :-) to the enhanced diagnostics. -These still go out B. - -Due to the interaction between runtime and compiletime issues, -and because it's probably not a very good idea anyway, -you may not use C to turn them off at compiletime. -However, you may control there behaviour at runtime using the -disable() and enable() methods to turn them off and on respectively. - -The B<-verbose> flag first prints out the L introduction before -any other diagnostics. The $diagnostics::PRETTY variable can generate nicer -escape sequences for pagers. - -=head2 The I Program - -While apparently a whole nuther program, I is actually nothing -more than a link to the (executable) F module, as well as -a link to the F documentation. The B<-v> flag is like -the C directive. -The B<-p> flag is like the -$diagnostics::PRETTY variable. Since you're post-processing with -I, there's no sense in being able to enable() or disable() processing. - -Output from I is directed to B, unlike the pragma. - -=head1 EXAMPLES - -The following file is certain to trigger a few errors at both -runtime and compiletime: - - use diagnostics; - print NOWHERE "nothing\n"; - print STDERR "\n\tThis message should be unadorned.\n"; - warn "\tThis is a user warning"; - print "\nDIAGNOSTIC TESTER: Please enter a here: "; - my $a, $b = scalar ; - print "\n"; - print $x/$y; - -If you prefer to run your program first and look at its problem -afterwards, do this: - - perl -w test.pl 2>test.out - ./splain < test.out - -Note that this is not in general possible in shells of more dubious heritage, -as the theoretical - - (perl -w test.pl >/dev/tty) >& test.out - ./splain < test.out - -Because you just moved the existing B to somewhere else. - -If you don't want to modify your source code, but still have on-the-fly -warnings, do this: - - exec 3>&1; perl -w test.pl 2>&1 1>&3 3>&- | splain 1>&2 3>&- - -Nifty, eh? - -If you want to control warnings on the fly, do something like this. -Make sure you do the C first, or you won't be able to get -at the enable() or disable() methods. - - use diagnostics; # checks entire compilation phase - print "\ntime for 1st bogus diags: SQUAWKINGS\n"; - print BOGUS1 'nada'; - print "done with 1st bogus\n"; - - disable diagnostics; # only turns off runtime warnings - print "\ntime for 2nd bogus: (squelched)\n"; - print BOGUS2 'nada'; - print "done with 2nd bogus\n"; - - enable diagnostics; # turns back on runtime warnings - print "\ntime for 3rd bogus: SQUAWKINGS\n"; - print BOGUS3 'nada'; - print "done with 3rd bogus\n"; - - disable diagnostics; - print "\ntime for 4th bogus: (squelched)\n"; - print BOGUS4 'nada'; - print "done with 4th bogus\n"; - -=head1 INTERNALS - -Diagnostic messages derive from the F file when available at -runtime. Otherwise, they may be embedded in the file itself when the -splain package is built. See the F for details. - -If an extant $SIG{__WARN__} handler is discovered, it will continue -to be honored, but only after the diagnostics::splainthis() function -(the module's $SIG{__WARN__} interceptor) has had its way with your -warnings. - -There is a $diagnostics::DEBUG variable you may set if you're desperately -curious what sorts of things are being intercepted. - - BEGIN { $diagnostics::DEBUG = 1 } - - -=head1 BUGS - -Not being able to say "no diagnostics" is annoying, but may not be -insurmountable. - -The C<-pretty> directive is called too late to affect matters. -You have to to this instead, and I you load the module. - - BEGIN { $diagnostics::PRETTY = 1 } - -I could start up faster by delaying compilation until it should be -needed, but this gets a "panic: top_level" -when using the pragma form in 5.001e. - -While it's true that this documentation is somewhat subserious, if you use -a program named I, you should expect a bit of whimsy. - -=head1 AUTHOR - -Tom Christiansen Ftchrist@mox.perl.comE>, 25 June 1995. - -=cut - -$DEBUG ||= 0; -my $WHOAMI = ref bless []; # nobody's business, prolly not even mine - -$OUTPUT_AUTOFLUSH = 1; - -local $_; - -CONFIG: { - $opt_p = $opt_d = $opt_v = $opt_f = ''; - %HTML_2_Troff = %HTML_2_Latin_1 = %HTML_2_ASCII_7 = (); - %exact_duplicate = (); - - unless (caller) { - $standalone++; - require Getopt::Std; - Getopt::Std::getopts('pdvf:') || die "Usage: $0 [-v] [-p] [-f splainpod]"; - $PODFILE = $opt_f if $opt_f; - $DEBUG = 2 if $opt_d; - $VERBOSE = $opt_v; - $PRETTY = $opt_p; - } - - if (open(POD_DIAG, $PODFILE)) { - warn "Happy happy podfile from real $PODFILE\n" if $DEBUG; - last CONFIG; - } - - if (caller) { - INCPATH: { - for $file ( (map { "$_/$WHOAMI.pm" } @INC), $0) { - warn "Checking $file\n" if $DEBUG; - if (open(POD_DIAG, $file)) { - while () { - next unless /^__END__\s*# wish diag dbase were more accessible/; - print STDERR "podfile is $file\n" if $DEBUG; - last INCPATH; - } - } - } - } - } else { - print STDERR "podfile is \n" if $DEBUG; - *POD_DIAG = *main::DATA; - } -} -if (eof(POD_DIAG)) { - die "couldn't find diagnostic data in $PODFILE @INC $0"; -} - - -%HTML_2_Troff = ( - 'amp' => '&', # ampersand - 'lt' => '<', # left chevron, less-than - 'gt' => '>', # right chevron, greater-than - 'quot' => '"', # double quote - - "Aacute" => "A\\*'", # capital A, acute accent - # etc - -); - -%HTML_2_Latin_1 = ( - 'amp' => '&', # ampersand - 'lt' => '<', # left chevron, less-than - 'gt' => '>', # right chevron, greater-than - 'quot' => '"', # double quote - - "Aacute" => "\xC1" # capital A, acute accent - - # etc -); - -%HTML_2_ASCII_7 = ( - 'amp' => '&', # ampersand - 'lt' => '<', # left chevron, less-than - 'gt' => '>', # right chevron, greater-than - 'quot' => '"', # double quote - - "Aacute" => "A" # capital A, acute accent - # etc -); - -*HTML_Escapes = do { - if ($standalone) { - $PRETTY ? \%HTML_2_Latin_1 : \%HTML_2_ASCII_7; - } else { - \%HTML_2_Latin_1; - } -}; - -*THITHER = $standalone ? *STDOUT : *STDERR; - -$transmo = <) { - #s/(.*)\n//; - #$header = $1; - - unescape(); - if ($PRETTY) { - sub noop { return $_[0] } # spensive for a noop - sub bold { my $str =$_[0]; $str =~ s/(.)/$1\b$1/g; return $str; } - sub italic { my $str = $_[0]; $str =~ s/(.)/_\b$1/g; return $str; } - s/[BC]<(.*?)>/bold($1)/ges; - s/[LIF]<(.*?)>/italic($1)/ges; - } else { - s/[BC]<(.*?)>/$1/gs; - s/[LIF]<(.*?)>/$1/gs; - } - unless (/^=/) { - if (defined $header) { - if ( $header eq 'DESCRIPTION' && - ( /Optional warnings are enabled/ - || /Some of these messages are generic./ - ) ) - { - next; - } - s/^/ /gm; - $msg{$header} .= $_; - } - next; - } - unless ( s/=item (.*)\s*\Z//) { - - if ( s/=head1\sDESCRIPTION//) { - $msg{$header = 'DESCRIPTION'} = ''; - } - next; - } - $header = $1; - - if ($header =~ /%[sd]/) { - $rhs = $lhs = $header; - #if ($lhs =~ s/(.*?)%d(?!%d)(.*)/\Q$1\E\\d+\Q$2\E\$/g) { - if ($lhs =~ s/(.*?)%d(?!%d)(.*)/\Q$1\E\\d+\Q$2\E/g) { - $lhs =~ s/\\%s/.*?/g; - } else { - # if i had lookbehind negations, i wouldn't have to do this \377 noise - $lhs =~ s/(.*?)%s/\Q$1\E.*?\377/g; - #$lhs =~ s/\377([^\377]*)$/\Q$1\E\$/; - $lhs =~ s/\377([^\377]*)$/\Q$1\E/; - $lhs =~ s/\377//g; - } - $transmo .= " s{^$lhs}\n {\Q$rhs\E}\n\t&& return 1;\n"; - } else { - $transmo .= " m{^\Q$header\E} && return 1;\n"; - } - - print STDERR "Already saw $header" if $msg{$header}; - - $msg{$header} = ''; - } - - - close POD_DIAG unless *main::DATA eq *POD_DIAG; - - die "No diagnostics?" unless %msg; - - $transmo .= " return 0;\n}\n"; - print STDERR $transmo if $DEBUG; - eval $transmo; - die $@ if $@; - $RS = "\n"; -### } - -if ($standalone) { - if (!@ARGV and -t STDIN) { print STDERR "$0: Reading from STDIN\n" } - while ($error = <>) { - splainthis($error) || print THITHER $error; - } - exit; -} else { - $old_w = 0; $oldwarn = ''; $olddie = ''; -} - -sub import { - shift; - $old_w = $^W; - $^W = 1; # yup, clobbered the global variable; tough, if you - # want diags, you want diags. - return if $SIG{__WARN__} eq \&warn_trap; - - for (@_) { - - /^-d(ebug)?$/ && do { - $DEBUG++; - next; - }; - - /^-v(erbose)?$/ && do { - $VERBOSE++; - next; - }; - - /^-p(retty)?$/ && do { - print STDERR "$0: I'm afraid it's too late for prettiness.\n"; - $PRETTY++; - next; - }; - - warn "Unknown flag: $_"; - } - - $oldwarn = $SIG{__WARN__}; - $olddie = $SIG{__DIE__}; - $SIG{__WARN__} = \&warn_trap; - $SIG{__DIE__} = \&death_trap; -} - -sub enable { &import } - -sub disable { - shift; - $^W = $old_w; - return unless $SIG{__WARN__} eq \&warn_trap; - $SIG{__WARN__} = $oldwarn; - $SIG{__DIE__} = $olddie; -} - -sub warn_trap { - my $warning = $_[0]; - if (caller eq $WHOAMI or !splainthis($warning)) { - print STDERR $warning; - } - &$oldwarn if defined $oldwarn and $oldwarn and $oldwarn ne \&warn_trap; -}; - -sub death_trap { - my $exception = $_[0]; - splainthis($exception); - if (caller eq $WHOAMI) { print STDERR "INTERNAL EXCEPTION: $exception"; } - &$olddie if defined $olddie and $olddie and $olddie ne \&death_trap; - $SIG{__DIE__} = $SIG{__WARN__} = ''; - local($Carp::CarpLevel) = 1; - confess "Uncaught exception from user code:\n\t$exception"; - # up we go; where we stop, nobody knows, but i think we die now - # but i'm deeply afraid of the &$olddie guy reraising and us getting - # into an indirect recursion loop -}; - -sub splainthis { - local $_ = shift; - ### &finish_compilation unless %msg; - s/\.?\n+$//; - my $orig = $_; - # return unless defined; - if ($exact_duplicate{$_}++) { - return 1; - } - s/, <.*?> (?:line|chunk).*$//; - $real = s/(.*?) at .*? (?:line|chunk) \d+.*/$1/; - s/^\((.*)\)$/$1/; - return 0 unless &transmo; - $orig = shorten($orig); - if ($old_diag{$_}) { - autodescribe(); - print THITHER "$orig (#$old_diag{$_})\n"; - $wantspace = 1; - } else { - autodescribe(); - $old_diag{$_} = ++$count; - print THITHER "\n" if $wantspace; - $wantspace = 0; - print THITHER "$orig (#$old_diag{$_})\n"; - if ($msg{$_}) { - print THITHER $msg{$_}; - } else { - if (0 and $standalone) { - print THITHER " **** Error #$old_diag{$_} ", - ($real ? "is" : "appears to be"), - " an unknown diagnostic message.\n\n"; - } - return 0; - } - } - return 1; -} - -sub autodescribe { - if ($VERBOSE and not $count) { - print THITHER &{$PRETTY ? \&bold : \&noop}("DESCRIPTION OF DIAGNOSTICS"), - "\n$msg{DESCRIPTION}\n"; - } -} - -sub unescape { - s { - E< - ( [A-Za-z]+ ) - > - } { - do { - exists $HTML_Escapes{$1} - ? do { $HTML_Escapes{$1} } - : do { - warn "Unknown escape: $& in $_"; - "E<$1>"; - } - } - }egx; -} - -sub shorten { - my $line = $_[0]; - if (length $line > 79) { - my $space_place = rindex($line, ' ', 79); - if ($space_place != -1) { - substr($line, $space_place, 1) = "\n\t"; - } - } - return $line; -} - - -# have to do this: RS isn't set until run time, but we're executing at compile time -$RS = "\n"; - -1 unless $standalone; # or it'll complain about itself -__END__ # wish diag dbase were more accessible diff --git a/old_embed.pl b/old_embed.pl deleted file mode 100755 index 9453feb..0000000 --- a/old_embed.pl +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/perl -# -# FOR BACKWARDS COMPATIBILITY WITH OLD VERSIONS OF PERL -# -# This script uses an old method of creating "embed.h". Use it -# if you need to maintain binary compatibility with older versions -# Perl with the EMBED feature enabled. -# - -unlink "embed.h"; -open(EM, ">embed.h") || die "Can't create embed.h: $!\n"; - -print EM <<'END'; -/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! - This file is built by old_embed.pl from old_global.sym and interp.sym. - Any changes made here will be lost. - THIS FILE IS FOR BINARY COMPATIBILITY WITH OLD PERL VERSIONS. - Run "embed.pl" to get an up-to-date version. -*/ - -/* (Doing namespace management portably in C is really gross.) */ - -/* EMBED has no run-time penalty, but helps keep the Perl namespace - from colliding with that used by other libraries pulled in - by extensions or by embedding perl. Allow a cc -DNO_EMBED - override, however, to keep binary compatability with previous - versions of perl. -*/ -#ifndef NO_EMBED -# define EMBED 1 -#endif - -#ifdef EMBED - -/* globals we need to hide from the world */ -END - -open(GL, ") { - s/[ \t]*#.*//; # Delete comments. - next unless /\S/; - s/^\s*(\S+).*$/#define $1\t\tPerl_$1/; - $global{$1} = 1; - s/(................\t)\t/$1/; - print EM $_; -} - -close(GL) || warn "Can't close old_global.sym: $!\n"; - -print EM <<'END'; - -#endif /* EMBED */ - -/* Put interpreter specific symbols into a struct? */ - -#ifdef MULTIPLICITY - -/* Undefine symbols that were defined by EMBED. Somewhat ugly */ - -END - - -open(INT, ") { - s/[ \t]*#.*//; # Delete comments. - next unless /\S/; - s/^\s*(\S*).*$/#undef $1/; - print EM $_ if (exists $global{$1}); -} -close(INT) || warn "Can't close interp.sym: $!\n"; - -print EM "\n"; - -open(INT, ") { - s/[ \t]*#.*//; # Delete comments. - next unless /\S/; - s/^\s*(\S+).*$/#define $1\t\t(curinterp->I$1)/; - s/(................\t)\t/$1/; - print EM $_; -} -close(INT) || warn "Can't close interp.sym: $!\n"; - -print EM <<'END'; - -#else /* not multiple, so translate interpreter symbols the other way... */ - -END - -open(INT, ") { - s/[ \t]*#.*//; # Delete comments. - next unless /\S/; - s/^\s*(\S+).*$/#define I$1\t\t$1/; - s/(................\t)\t/$1/; - print EM $_; -} -close(INT) || warn "Can't close interp.sym: $!\n"; - -print EM <<'END'; - -#endif /* MULTIPLICITY */ -END - diff --git a/old_global.sym b/old_global.sym deleted file mode 100644 index 5c7409d..0000000 --- a/old_global.sym +++ /dev/null @@ -1,1116 +0,0 @@ -# Global symbols that need to be hidden in embedded applications. - -# Variables - -AMG_names -No -Sv -He -Xpv -Yes -abs_amg -add_amg -add_ass_amg -additem -amagic_generation -an -atan2_amg -band_amg -bool__amg -bor_amg -buf -bufend -bufptr -bxor_amg -check -collation_ix -collation_name -collation_standard -collxfrm_base -collxfrm_mult -compiling -compl_amg -compcv -comppad -comppad_name -comppad_name_fill -concat_amg -concat_ass_amg -cop_seqmax -cos_amg -cryptseen -cshlen -cshname -curcop -curcopdb -curinterp -curpad -cv_const_sv -dc -dec_amg -di -div_amg -div_ass_amg -ds -egid -envgv -eq_amg -error_count -euid -evalseq -exp_amg -expect -expectterm -fallback_amg -filter_add -filter_del -filter_read -fold -fold_locale -freq -ge_amg -gid -gt_amg -hexdigit -hints -in_my -inc_amg -io_close -know_next -last_lop -last_lop_op -last_uni -le_amg -lex_state -lex_defer -lex_expect -lex_brackets -lex_formbrack -lex_fakebrack -lex_casemods -lex_dojoin -lex_starts -lex_stuff -lex_repl -lex_op -lex_inpat -lex_inwhat -lex_brackstack -lex_casestack -linestr -log_amg -lshift_amg -lshift_ass_amg -lt_amg -markstack -markstack_max -markstack_ptr -maxo -max_intro_pending -min_intro_pending -mod_amg -mod_ass_amg -mult_amg -mult_ass_amg -multi_close -multi_end -multi_open -multi_start -na -ncmp_amg -nextval -nexttype -nexttoke -ne_amg -neg_amg -nexttype -nextval -no_aelem -no_dir_func -no_func -no_helem -no_mem -no_modify -no_security -no_sock_func -no_usym -nointrp -nomem -nomemok -nomethod_amg -not_amg -numeric_local -numeric_name -numeric_standard -numer_amg -oldbufptr -oldoldbufptr -op -op_desc -op_name -op_seqmax -opargs -origalen -origenviron -osname -padix -patleave -pow_amg -pow_ass_amg -ppaddr -profiledata -provide_ref -psig_ptr -psig_name -qrt_amg -rcsid -reall_srchlen -regarglen -regbol -regcode -regdummy -regendp -regeol -reginput -regkind -reglastparen -regmyendp -regmyp_size -regmystartp -regnarrate -regnaughty -regnpar -regparse -regprecomp -regprev -regsawback -regsize -regstartp -regtill -regxend -repeat_amg -repeat_ass_amg -retstack -retstack_ix -retstack_max -rsfp -rsfp_filters -rshift_amg -rshift_ass_amg -save_pptr -savestack -savestack_ix -savestack_max -saw_return -scmp_amg -scopestack -scopestack_ix -scopestack_max -scrgv -seq_amg -sge_amg -sgt_amg -sh_path -sig_name -sig_num -siggv -sighandler -simple -sin_amg -sle_amg -slt_amg -sne_amg -stack_base -stack_max -stack_sp -statbuf -string_amg -sub_generation -subline -subname -subtr_amg -subtr_ass_amg -sv_no -sv_undef -sv_yes -tainting -thisexpr -timesbuf -tokenbuf -uid -varies -vert -vtbl_amagic -vtbl_amagicelem -vtbl_arylen -vtbl_bm -vtbl_collxfrm -vtbl_dbline -vtbl_env -vtbl_envelem -vtbl_fm -vtbl_glob -vtbl_isa -vtbl_isaelem -vtbl_mglob -vtbl_nkeys -vtbl_pack -vtbl_packelem -vtbl_pos -vtbl_sig -vtbl_sigelem -vtbl_substr -vtbl_sv -vtbl_taint -vtbl_uvar -vtbl_vec -warn_nl -warn_nosemi -warn_reserved -watchaddr -watchok -yychar -yycheck -yydebug -yydefred -yydgoto -yyerrflag -yygindex -yylen -yylhs -yylval -yyname -yynerrs -yyrindex -yyrule -yysindex -yytable -yyval - -# Functions - -Gv_AMupdate -amagic_call -append_elem -append_list -apply -assertref -av_clear -av_extend -av_fake -av_fetch -av_fill -av_len -av_make -av_pop -av_push -av_shift -av_store -av_undef -av_unshift -bind_match -block_end -block_start -calllist -cando -cast_ulong -check_uni -checkcomma -ck_aelem -ck_bitop -ck_concat -ck_delete -ck_eof -ck_eval -ck_exec -ck_ftst -ck_fun -ck_fun_locale -ck_glob -ck_grep -ck_gvconst -ck_index -ck_lengthconst -ck_lfun -ck_listiob -ck_match -ck_null -ck_repeat -ck_require -ck_retarget -ck_rfun -ck_rvconst -ck_scmp -ck_select -ck_shift -ck_sort -ck_spair -ck_split -ck_subr -ck_svconst -ck_trunc -convert -cpytill -croak -cv_clone -cv_undef -cx_dump -cxinc -deb -deb_growlevel -debop -debprofdump -debstack -debstackptrs -deprecate -die -die_where -do_aexec -do_chomp -do_chop -do_close -do_eof -do_exec -do_execfree -do_ipcctl -do_ipcget -do_join -do_kv -do_msgrcv -do_msgsnd -do_open -do_pipe -do_print -do_readline -do_seek -do_semop -do_shmio -do_sprintf -do_tell -do_trans -do_vecset -do_vop -doeval -dofindlabel -dopoptoeval -dounwind -dowantarray -dump_all -dump_eval -dump_fds -dump_form -dump_gv -dump_mstats -dump_op -dump_packsubs -dump_pm -dump_sub -fbm_compile -fbm_instr -fetch_gv -fetch_io -filter_add -filter_del -filter_read -fold_constants -force_ident -force_list -force_next -force_word -free_tmps -gen_constant_list -gp_free -gp_ref -gv_AVadd -gv_HVadd -gv_IOadd -gv_check -gv_efullname -gv_efullname3 -gv_fetchfile -gv_fetchmeth -gv_fetchmethod -gv_fetchpv -gv_fullname -gv_fullname3 -gv_init -gv_stashpv -gv_stashpvn -gv_stashsv -he_delayfree -he_free -he_root -hoistmust -hv_clear -hv_delete -hv_delete_ent -hv_exists -hv_exists_ent -hv_fetch -hv_fetch_ent -hv_iterinit -hv_iterkey -hv_iterkeysv -hv_iternext -hv_iternextsv -hv_iterval -hv_ksplit -hv_magic -hv_stashpv -hv_store -hv_store_ent -hv_undef -ibcmp -ibcmp_locale -ingroup -instr -intro_my -intuit_more -invert -jmaybe -keyword -leave_scope -lex_end -lex_start -linklist -list -listkids -localize -looks_like_number -magic_clearenv -magic_clearpack -magic_clearsig -magic_existspack -magic_get -magic_getarylen -magic_getglob -magic_getpack -magic_getpos -magic_getsig -magic_gettaint -magic_getuvar -magic_len -magic_nextpack -magic_set -magic_setamagic -magic_setarylen -magic_setbm -magic_setfm -magic_setcollxfrm -magic_setdbline -magic_setenv -magic_setglob -magic_setisa -magic_setmglob -magic_setnkeys -magic_setpack -magic_setpos -magic_setsig -magic_setsubstr -magic_settaint -magic_setuvar -magic_setvec -magic_wipepack -magicname -markstack_grow -mem_collxfrm -mess -mg_clear -mg_copy -mg_find -mg_free -mg_get -mg_len -mg_magical -mg_set -mod -modkids -moreswitches -mstats -my -my_bcopy -my_bzero -my_chsize -my_exit -my_htonl -my_lstat -my_memcmp -my_ntohl -my_pclose -my_popen -my_setenv -my_stat -my_swap -my_unexec -newANONHASH -newANONLIST -newANONSUB -newASSIGNOP -newAV -newAVREF -newBINOP -newCONDOP -newCVREF -newFORM -newFOROP -newGVOP -newGVREF -newGVgen -newHV -newHVREF -newIO -newLISTOP -newLOGOP -newLOOPEX -newLOOPOP -newNULLLIST -newOP -newPMOP -newPROG -newPVOP -newRANGE -newRV -newSLICEOP -newSTATEOP -newSUB -newSV -newSVOP -newSVREF -newSViv -newSVnv -newSVpv -newSVrv -newSVsv -newUNOP -newWHILEOP -newXS -newXSUB -nextargv -ninstr -no_fh_allowed -no_op -oopsAV -oopsCV -oopsHV -op_free -package -pad_alloc -pad_allocmy -pad_findmy -pad_free -pad_leavemy -pad_reset -pad_sv -pad_swipe -peep -pidgone -pmflag -pmruntime -pmtrans -pop_return -pop_scope -pp_aassign -pp_abs -pp_accept -pp_add -pp_aelem -pp_aelemfast -pp_alarm -pp_and -pp_andassign -pp_anoncode -pp_anonhash -pp_anonlist -pp_aslice -pp_atan2 -pp_av2arylen -pp_backtick -pp_bind -pp_binmode -pp_bit_and -pp_bit_or -pp_bit_xor -pp_bless -pp_caller -pp_chdir -pp_chmod -pp_chomp -pp_chop -pp_chown -pp_chr -pp_chroot -pp_close -pp_closedir -pp_complement -pp_concat -pp_cond_expr -pp_connect -pp_const -pp_cos -pp_crypt -pp_cswitch -pp_dbmclose -pp_dbmopen -pp_dbstate -pp_defined -pp_delete -pp_die -pp_divide -pp_dofile -pp_dump -pp_each -pp_egrent -pp_ehostent -pp_enetent -pp_enter -pp_entereval -pp_enteriter -pp_enterloop -pp_entersub -pp_entersubr -pp_entertry -pp_enterwrite -pp_eof -pp_eprotoent -pp_epwent -pp_eq -pp_eservent -pp_evalonce -pp_exec -pp_exists -pp_exit -pp_exp -pp_fcntl -pp_fileno -pp_flip -pp_flock -pp_flop -pp_fork -pp_formline -pp_ftatime -pp_ftbinary -pp_ftblk -pp_ftchr -pp_ftctime -pp_ftdir -pp_fteexec -pp_fteowned -pp_fteread -pp_ftewrite -pp_ftfile -pp_ftis -pp_ftlink -pp_ftmtime -pp_ftpipe -pp_ftrexec -pp_ftrowned -pp_ftrread -pp_ftrwrite -pp_ftsgid -pp_ftsize -pp_ftsock -pp_ftsuid -pp_ftsvtx -pp_fttext -pp_fttty -pp_ftzero -pp_ge -pp_gelem -pp_getc -pp_getlogin -pp_getpeername -pp_getpgrp -pp_getppid -pp_getpriority -pp_getsockname -pp_ggrent -pp_ggrgid -pp_ggrnam -pp_ghbyaddr -pp_ghbyname -pp_ghostent -pp_glob -pp_gmtime -pp_gnbyaddr -pp_gnbyname -pp_gnetent -pp_goto -pp_gpbyname -pp_gpbynumber -pp_gprotoent -pp_gpwent -pp_gpwnam -pp_gpwuid -pp_grepstart -pp_grepwhile -pp_gsbyname -pp_gsbyport -pp_gservent -pp_gsockopt -pp_gt -pp_gv -pp_gvsv -pp_helem -pp_hex -pp_hslice -pp_i_add -pp_i_divide -pp_i_eq -pp_i_ge -pp_i_gt -pp_i_le -pp_i_lt -pp_i_modulo -pp_i_multiply -pp_i_ncmp -pp_i_ne -pp_i_negate -pp_i_subtract -pp_index -pp_indread -pp_int -pp_interp -pp_ioctl -pp_iter -pp_join -pp_keys -pp_kill -pp_last -pp_lc -pp_lcfirst -pp_le -pp_leave -pp_leaveeval -pp_leaveloop -pp_leavesub -pp_leavetry -pp_leavewrite -pp_left_shift -pp_length -pp_lineseq -pp_link -pp_list -pp_listen -pp_localtime -pp_log -pp_lslice -pp_lstat -pp_lt -pp_map -pp_mapstart -pp_mapwhile -pp_match -pp_method -pp_mkdir -pp_modulo -pp_msgctl -pp_msgget -pp_msgrcv -pp_msgsnd -pp_multiply -pp_ncmp -pp_ne -pp_negate -pp_next -pp_nextstate -pp_not -pp_nswitch -pp_null -pp_oct -pp_open -pp_open_dir -pp_or -pp_orassign -pp_ord -pp_pack -pp_padany -pp_padav -pp_padhv -pp_padsv -pp_pipe_op -pp_pop -pp_pos -pp_postdec -pp_postinc -pp_pow -pp_predec -pp_preinc -pp_print -pp_prototype -pp_prtf -pp_push -pp_pushmark -pp_pushre -pp_quotemeta -pp_rand -pp_range -pp_rcatline -pp_read -pp_readdir -pp_readline -pp_readlink -pp_recv -pp_redo -pp_ref -pp_refgen -pp_regcmaybe -pp_regcomp -pp_rename -pp_repeat -pp_require -pp_reset -pp_return -pp_reverse -pp_rewinddir -pp_right_shift -pp_rindex -pp_rmdir -pp_rv2av -pp_rv2cv -pp_rv2gv -pp_rv2hv -pp_rv2sv -pp_sassign -pp_scalar -pp_schomp -pp_schop -pp_scmp -pp_scope -pp_seek -pp_seekdir -pp_select -pp_semctl -pp_semget -pp_semop -pp_send -pp_seq -pp_setpgrp -pp_setpriority -pp_sge -pp_sgrent -pp_sgt -pp_shift -pp_shmctl -pp_shmget -pp_shmread -pp_shmwrite -pp_shostent -pp_shutdown -pp_sin -pp_sle -pp_sleep -pp_slt -pp_sne -pp_snetent -pp_socket -pp_sockpair -pp_sort -pp_splice -pp_split -pp_sprintf -pp_sprotoent -pp_spwent -pp_sqrt -pp_srand -pp_srefgen -pp_sselect -pp_sservent -pp_ssockopt -pp_stat -pp_stringify -pp_stub -pp_study -pp_subst -pp_substcont -pp_substr -pp_subtract -pp_symlink -pp_syscall -pp_sysopen -pp_sysread -pp_system -pp_syswrite -pp_tell -pp_telldir -pp_tie -pp_tied -pp_time -pp_tms -pp_trans -pp_truncate -pp_uc -pp_ucfirst -pp_umask -pp_undef -pp_unlink -pp_unpack -pp_unshift -pp_unstack -pp_untie -pp_utime -pp_values -pp_vec -pp_wait -pp_waitpid -pp_wantarray -pp_warn -pp_xor -pregcomp -pregexec -pregfree -prepend_elem -push_return -push_scope -q -ref -refkids -regdump -regnext -regprop -repeatcpy -rninstr -rsignal -rsignal_save -rsignal_state -rsignal_restore -runops -same_dirent -save_I16 -save_I32 -save_aptr -save_ary -save_clearsv -save_delete -save_destructor -save_freeop -save_freepv -save_freesv -save_hash -save_hptr -save_int -save_item -save_list -save_long -save_nogv -save_pptr -save_scalar -save_sptr -save_svref -savepv -savepvn -savestack_grow -sawparens -scalar -scalarkids -scalarseq -scalarvoid -scan_const -scan_formline -scan_heredoc -scan_hex -scan_ident -scan_inputsymbol -scan_num -scan_oct -scan_pat -scan_prefix -scan_str -scan_subst -scan_trans -scan_word -scope -screaminstr -setdefout -setenv_getix -share_hek -sharepvn -sighandler -skipspace -stack_grow -start_subparse -sublex_done -sublex_start -sv_2bool -sv_2cv -sv_2io -sv_2iv -sv_2mortal -sv_2nv -sv_2pv -sv_2uv -sv_add_arena -sv_backoff -sv_bless -sv_catpv -sv_catpvn -sv_catsv -sv_chop -sv_clean_all -sv_clean_objs -sv_clear -sv_cmp -sv_cmp_locale -sv_collxfrm -sv_dec -sv_derived_from -sv_dump -sv_eq -sv_free -sv_free_arenas -sv_gets -sv_grow -sv_inc -sv_insert -sv_isa -sv_isobject -sv_len -sv_magic -sv_mortalcopy -sv_newmortal -sv_newref -sv_peek -sv_pvn_force -sv_ref -sv_reftype -sv_replace -sv_report_used -sv_reset -sv_setiv -sv_setnv -sv_setptrobj -sv_setpv -sv_setpvn -sv_setref_iv -sv_setref_nv -sv_setref_pv -sv_setref_pvn -sv_setsv -sv_setuv -sv_taint -sv_tainted -sv_unmagic -sv_unref -sv_untaint -sv_upgrade -sv_usepvn -taint_env -taint_proper -too_few_arguments -too_many_arguments -unlnk -unshare_hek -unsharepvn -utilize -wait4pid -warn -watch -whichsig -xiv_arenaroot -xiv_root -xnv_root -xpv_root -xrv_root -yyerror -yylex -yyparse -yywarn diff --git a/old_perl_exp.SH b/old_perl_exp.SH deleted file mode 100755 index 123ae0c..0000000 --- a/old_perl_exp.SH +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -# Written: Nov 1994 Wayne Scott (wscott@ichips.intel.com) - -# Create the export list for perl based on 'old_global.sym'. -# Needed by AIX to do dynamic linking. - -# This simple program relys on 'old_global.sym' being up to date -# with all of the global symbols that a dynamicly link library -# might want to access. - -# All symbols have a Perl_ prefix because that's what embed.h -# sticks in front of them. - -echo "Extracting perl.exp" - -rm -f perl.exp -echo "#!" > perl.exp - -sed -n '/^[A-Za-z]/ s/^/Perl_/p' old_global.sym >> perl.exp - -# -# also add symbols from interp.sym -# They are only needed if -DMULTIPLICITY is not set but it -# doesn't hurt to include them anyway. -sed -n '/^[A-Za-z]/ p' interp.sym >> perl.exp - -# extra globals not included above. -cat <> perl.exp -perl_init_i18nl10n -perl_init_i18nl14n -perl_new_collate -perl_new_ctype -perl_new_numeric -perl_set_numeric_local -perl_set_numeric_standard -perl_alloc -perl_construct -perl_destruct -perl_free -perl_parse -perl_run -perl_get_sv -perl_get_av -perl_get_hv -perl_get_cv -perl_call_argv -perl_call_pv -perl_call_method -perl_call_sv -perl_requirepv -END diff --git a/pod/perli18n.pod b/pod/perli18n.pod deleted file mode 100644 index aea6b4a..0000000 --- a/pod/perli18n.pod +++ /dev/null @@ -1,234 +0,0 @@ -=head1 NAME - -perl18n - Perl i18n (internalization) - -=head1 DESCRIPTION - -Perl supports the language-specific notions of data like -"is this a letter" and "which letter comes first". These -are very important issues especially for languages other -than English -- but also for English: it would be very -naïve indeed to think that C defines all the "letters". - -Perl understands the language-specific data via the standardized -(ISO C, XPG4, POSIX 1.c) method called "the locale system". -The locale system is controlled per application using one -function call and several environment variables. - -=head1 USING LOCALES - -If your operating system supports the locale system and you have -installed the locale system and you have set your locale environment -variables correctly (please see below) before running Perl, Perl will -understand your data correctly according to your locale settings. - -In runtime you can switch locales using the POSIX::setlocale(). - - # setlocale is the function call - # LC_CTYPE will be explained later - - use POSIX qw(setlocale LC_CTYPE); - - # query and save the old locale. - $old_locale = setlocale(LC_CTYPE); - - setlocale(LC_CTYPE, "fr_CA.ISO8859-1"); - # LC_CTYPE now in locale "French, Canada, codeset ISO 8859-1" - - setlocale(LC_CTYPE, ""); - # LC_CTYPE now in locale what the LC_ALL / LC_CTYPE / LANG define. - # see below for documentation about the LC_ALL / LC_CTYPE / LANG. - - # restore the old locale - setlocale(LC_CTYPE, $old_locale); - -The first argument of C is called B and the -second argument B. The category tells in what aspect of -data processing we want to apply language-specific rules, the locale -tells in what language-country/territory-codeset - but read on for the -naming of the locales: not all systems name locales as in the example. - -For further information about the categories, please consult your -L manual. For the locales available in your system, -also consult the L manual and see whether it leads you -to the list of the available locales (search for the C -section). If that fails, try out in command line the following -commands: - -=over 12 - -=item locale -a - -=item nlsinfo - -=item ls /usr/lib/nls/loc - -=item ls /usr/lib/locale - -=item ls /usr/lib/nls - -=back - -and see whether they list something resembling these - - en_US.ISO8859-1 de_DE.ISO8859-1 ru_RU.ISO8859-5 - en_US de_DE ru_RU - en de ru - english german russian - english.iso88591 german.iso88591 russian.iso88595 - -Sadly enough even if the calling interface has been standardized the -names of the locales are not. The naming usually is -language_country/territory.codeset but the latter parts may not be -present. - -Two special locales are worth special mention: C<"C"> and C<"POSIX">. -Currently and effectively these are the same locale: the difference is -mainly that the first one is defined by the C standard and the second -one is defined by the POSIX standard. What they mean and define is -the B in which every program does start in. The -language is (American) English and the character codeset C. -B: Not all systems have the C<"POSIX"> locale (not all systems -are POSIX), so use the C<"C"> locale when you need the default locale. - -=head2 The C Pragma - -By default, Perl ignores the current locale. The C pragma -tells Perl to use the current locale for some operations: The -comparison functions (lt, le, eq, cmp, ne, ge, gt, sort) use -C; regular expressions and case-modification functions -(uc, lc, ucfirst, lcfirst) use C; and formatting functions -(printf and sprintf) use C. The default behavior returns -with C or by reaching the end of the enclosing block. - -Note that the result of any operation that uses locale information is -tainted, since locales can be created by unprivileged users on some -systems (see L). - -=head2 Category LC_COLLATE: Collation - -When in the scope of C, Perl obeys the B -environment variable which controls application's notions on the -collation (ordering) of the characters. C does in most Latin -alphabets follow the C but where do the C<Á> and C<Ä> belong? - -B: Comparing and sorting by locale is usually slower than the -default sorting; factors of 2 to 4 have been observed. It will also -consume more memory: while a Perl scalar variable is participating in -any string comparison or sorting operation and obeying the locale -collation rules it will take about 3-15 (the exact value depends on -the operating system) times more memory than normally. These downsides -are dictated more by the operating system implementation of the locale -system than by Perl. - -Here is a code snippet that will tell you what are the alphanumeric -characters in the current locale, in the locale order: - - use POSIX qw(setlocale LC_COLLATE); - use locale; - - setlocale(LC_COLLATE, ""); - print +(sort grep /\w/, map { chr() } 0..255), "\n"; - -The default collation must be used for example for sorting raw binary -data whereas the locale collation is useful for natural text. - -B: In some locales some characters may have no collation value -at all -- this means for example if the C<'-'> is such a character the -C and C may sort to the same place. - -B: For certain environments the locale support by the operating -system is very simply broken and cannot be used or fixed by Perl. Such -deficiencies can and will result in mysterious hangs and/or Perl core -dumps. One such example is IRIX before the release 6.2, the -C support simply does not work. When confronted with such -systems, please report in excruciating detail to C, -complain to your vendor, maybe some bug fixes exist for your operating -system for these problems? Sometimes such bug fixes are called an -operating system upgrade. - -B: In the pre-5.003_06 Perl releases the per-locale collation -was possible using the C library module. This is now -mildly obsolete and to be avoided. The C functionality is -integrated into the Perl core language and one can use scalar data -completely normally -- there is no need to juggle with the scalar -references of C. - -=head2 Category LC_CTYPE: Character Types - -When in the scope of C, Perl obeys the C locale -information which controls application's notions on which characters -are alphabetic characters. This affects in Perl the regular expression -metanotation C<\\w> which stands for alphanumeric characters, that is, -alphabetic and numeric characters (please consult L for more -information about regular expressions). Thanks to the C, -depending on your locale settings, characters like C<Æ>, C<É>, -C<ß>, C<ø>, may be understood as C<\w> characters. - -=head2 Category LC_NUMERIC: Numeric Formatting - -When in the scope of C, Perl obeys the C -locale information which controls application's notions on how numbers -should be formatted for input and output. This affects in Perl the -printf and fprintf function, as well as POSIX::strtod. - -=head1 ENVIRONMENT - -=over 12 - -=item PERL_BADLANG - -A string that controls whether Perl warns in its startup about failed -locale settings. This can happen if the locale support in the -operating system is lacking (broken) is some way. If this string has -an integer value differing from zero, Perl will not complain. - -B: This is just hiding the warning message. The message tells -about some problem in your system's locale support and you should -investigate what the problem is. - -=back - -The following environment variables are not specific to Perl: They are -part of the standardized (ISO C, XPG4, POSIX 1.c) setlocale method to -control an application's opinion on data. - -=over 12 - -=item LC_ALL - -C is the "override-all" locale environment variable. If it is -set, it overrides all the rest of the locale environment variables. - -=item LC_CTYPE - -In the absence of C, C chooses the character type -locale. In the absence of both C and C, C -chooses the character type locale. - -=item LC_COLLATE - -In the absence of C, C chooses the collation -locale. In the absence of both C and C, C -chooses the collation locale. - -=item LC_NUMERIC - -In the absence of C, C chooses the numeric format -locale. In the absence of both C and C, C -chooses the numeric format. - -=item LANG - -C is the "catch-all" locale environment variable. If it is set, -it is used as the last resort after the overall C and the -category-specific C. - -=back - -There are further locale-controlling environment variables -(C) but Perl B currently -use them, except possibly as they affect the behavior of library -functions called by Perl extensions. - -=cut diff --git a/t/op/recurse.t b/t/op/recurse.t new file mode 100755 index 0000000..e69de29 diff --git a/t/re_tests b/t/re_tests deleted file mode 100644 index 2ac666a..0000000 --- a/t/re_tests +++ /dev/null @@ -1,3 +0,0 @@ -a.+?c abcabc y $& abc -(a+|b)* ab y $&-$1 ab-b -(a+|b){0,} ab y $&-$1 ab-b