diff options
author | Charles Bailey <bailey@newman.upenn.edu> | 2000-02-26 07:04:55 +0000 |
---|---|---|
committer | bailey <bailey@newman.upenn.edu> | 2000-02-26 07:04:55 +0000 |
commit | 2841d78411ddadd05a6fbe13e0be06f765fad3fb (patch) | |
tree | 5654902690bfb2994f8fe0a17c4bb3c1d7e46797 /lib | |
parent | cdc0122e98f2421b6507acbc7231bee768f9d260 (diff) | |
parent | ffb04cf170fa14d0606f2c3643c438d43784ee46 (diff) | |
download | perl-2841d78411ddadd05a6fbe13e0be06f765fad3fb.tar.gz |
Resync with mainline
p4raw-id: //depot/vmsperl@5269
Diffstat (limited to 'lib')
117 files changed, 1462 insertions, 1264 deletions
diff --git a/lib/Carp.pm b/lib/Carp.pm index eaa4d53d8a..43524ddbe5 100644 --- a/lib/Carp.pm +++ b/lib/Carp.pm @@ -94,7 +94,7 @@ sub export_fail { # each function call on the stack. sub longmess { - require Carp::Heavy; + { local $@; require Carp::Heavy; } # XXX fix require to not clear $@? goto &longmess_heavy; } @@ -106,7 +106,7 @@ sub longmess { # you always get a stack trace sub shortmess { # Short-circuit &longmess if called via multiple packages - require Carp::Heavy; + { local $@; require Carp::Heavy; } # XXX fix require to not clear $@? goto &shortmess_heavy; } diff --git a/lib/English.pm b/lib/English.pm index 4e3210b12c..f6e3ec0021 100644 --- a/lib/English.pm +++ b/lib/English.pm @@ -87,7 +87,6 @@ sub import { *EGID *PROGRAM_NAME *PERL_VERSION - *PERL_VERSION_TUPLE *ACCUMULATOR *DEBUGGING *SYSTEM_FD_MAX @@ -97,6 +96,8 @@ sub import { *WARNING *EXECUTABLE_NAME *OSNAME + *LAST_REGEXP_CODE_RESULT + *EXCEPTIONS_BEING_CAUGHT ); # The ground of all being. @ARG is deprecated (5.005 makes @_ lexical) @@ -165,14 +166,15 @@ sub import { # Internals. - *PERL_VERSION = *] ; - *PERL_VERSION_TUPLE = *^V ; + *PERL_VERSION = *^V ; *ACCUMULATOR = *^A ; *COMPILING = *^C ; *DEBUGGING = *^D ; *SYSTEM_FD_MAX = *^F ; *INPLACE_EDIT = *^I ; *PERLDB = *^P ; + *LAST_REGEXP_CODE_RESULT = *^R ; + *EXCEPTIONS_BEING_CAUGHT = *^S ; *BASETIME = *^T ; *WARNING = *^W ; *EXECUTABLE_NAME = *^X ; @@ -183,5 +185,6 @@ sub import { # *ARRAY_BASE = *[ ; # *OFMT = *# ; # *MULTILINE_MATCHING = ** ; +# *OLD_PERL_VERSION = *] ; 1; diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index c5cf7066bf..428a3f7c67 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -455,10 +455,11 @@ EOT my(@otherfiles) = values %{$self->{XS}}; # .c files from *.xs files push(@otherfiles, $attribs{FILES}) if $attribs{FILES}; push(@otherfiles, qw[./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all - perlmain.c mon.out core so_locations pm_to_blib + perlmain.c mon.out core core.*perl.*.? + *perl.core so_locations pm_to_blib *~ */*~ */*/*~ *$(OBJ_EXT) *$(LIB_EXT) perl.exe $(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def - $(BASEEXT).exp + $(BASEEXT).exp .nfs* .*.c ]); push @m, "\t-$self->{RM_RF} @otherfiles\n"; # See realclean and ext/utils/make_ext for usage of Makefile.old @@ -555,7 +556,7 @@ sub constants { INSTALLSITEARCH INSTALLBIN INSTALLSCRIPT PERL_LIB PERL_ARCHLIB SITELIBEXP SITEARCHEXP LIBPERL_A MYEXTLIB FIRST_MAKEFILE MAKE_APERL_FILE PERLMAINCC PERL_SRC - PERL_INC PERL FULLPERL + PERL_INC PERL FULLPERL FULL_AR / ) { next unless defined $self->{$tmp}; @@ -3179,9 +3180,18 @@ END # then copy that to $(INST_STATIC) and add $(OBJECT) into it. push(@m, "\t$self->{CP} \$(MYEXTLIB) \$\@\n") if $self->{MYEXTLIB}; + my $ar; + if (exists $self->{FULL_AR} && -x $self->{FULL_AR}) { + # Prefer the absolute pathed ar if available so that PATH + # doesn't confuse us. Perl itself is built with the full_ar. + $ar = 'FULL_AR'; + } else { + $ar = 'AR'; + } push @m, -q{ $(AR) $(AR_STATIC_ARGS) $@ $(OBJECT) && $(RANLIB) $@ - $(CHMOD) $(PERM_RWX) $@ + "\t\$($ar) ".'$(AR_STATIC_ARGS) $@ $(OBJECT) && $(RANLIB) $@'."\n"; + push @m, +q{ $(CHMOD) $(PERM_RWX) $@ }.$self->{NOECHO}.q{echo "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)/extralibs.ld }; # Old mechanism - still available: diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index c4b75539bf..cdd8e4b0ad 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -259,7 +259,8 @@ sub full_setup { @Get_from_Config = qw( ar cc cccdlflags ccdlflags dlext dlsrc ld lddlflags ldflags libc - lib_ext obj_ext osname osvers ranlib sitelibexp sitearchexp so exe_ext + lib_ext obj_ext osname osvers ranlib sitelibexp sitearchexp so + exe_ext full_ar ); my $item; diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp index 4fedd3bb41..49d167dc0b 100755 --- a/lib/ExtUtils/xsubpp +++ b/lib/ExtUtils/xsubpp @@ -273,7 +273,7 @@ $END = "!End!\n\n"; # "impossible" keyword (multiple newline) $BLOCK_re= '\s*(' . join('|', qw( REQUIRE BOOT CASE PREINIT INPUT INIT CODE PPCODE OUTPUT CLEANUP ALIAS PROTOTYPES PROTOTYPE VERSIONCHECK INCLUDE - SCOPE INTERFACE INTERFACE_MACRO C_ARGS + SCOPE INTERFACE INTERFACE_MACRO C_ARGS POST_CALL )) . "|$END)\\s*:"; # Input: ($_, @line) == unparsed input. @@ -284,6 +284,19 @@ sub check_keyword { s/^(\s*)($_[0])\s*:\s*(?:#.*)?/$1/s && $2; } +my ($C_group_rex, $C_arg); +# Group in C (no support for comments or literals) +$C_group_rex = qr/ [({\[] + (?: (?> [^()\[\]{}]+ ) | (?p{ $C_group_rex }) )* + [)}\]] /x ; +# Chunk in C without comma at toplevel (no comments): +$C_arg = qr/ (?: (?> [^()\[\]{},"']+ ) + | (?p{ $C_group_rex }) + | " (?: (?> [^\\"]+ ) + | \\. + )* " # String literal + | ' (?: (?> [^\\']+ ) | \\. )* ' # Char literal + )* /xs; if ($WantLineNumbers) { { @@ -372,6 +385,9 @@ sub CASE_handler { $_ = '' ; } +my $process_inout = 1; +my $process_argtypes = 1; + sub INPUT_handler { for (; !/^$BLOCK_re/o; $_ = shift(@line)) { last if /^\s*NOT_IMPLEMENTED_YET/; @@ -394,7 +410,8 @@ sub INPUT_handler { # Check for duplicate definitions blurt ("Error: duplicate definition of argument '$var_name' ignored"), next - if $arg_list{$var_name} ++ ; + if $arg_list{$var_name}++ + or defined $arg_types{$var_name} and not $processing_arg_with_types; $thisdone |= $var_name eq "THIS"; $retvaldone |= $var_name eq "RETVAL"; @@ -418,7 +435,9 @@ sub INPUT_handler { $var_addr{$var_name} = 1; $func_args =~ s/\b($var_name)\b/&$1/; } - if ($var_init =~ /^[=;]\s*NO_INIT\s*;?\s*$/) { + if ($var_init =~ /^[=;]\s*NO_INIT\s*;?\s*$/ + or $in_out{$var_name} and $in_out{$var_name} eq 'outlist' + and $var_init !~ /\S/) { if ($name_printed) { print ";\n"; } else { @@ -503,6 +522,7 @@ EOF sub CLEANUP_handler() { print_section() } sub PREINIT_handler() { print_section() } +sub POST_CALL_handler() { print_section() } sub INIT_handler() { print_section() } sub GetAliases @@ -872,7 +892,7 @@ sub fetch_para { my $tmp_line; $lastline .= $tmp_line while ($lastline =~ /\\$/ && defined($tmp_line = <$FH>)); - + chomp $lastline; $lastline =~ s/^\s+$//; } @@ -939,15 +959,23 @@ while (fetch_para()) { undef($static); undef($elipsis); undef($wantRETVAL) ; + undef($RETVAL_no_return) ; undef(%arg_list) ; undef(@proto_arg) ; + undef(@arg_with_types) ; + undef($processing_arg_with_types) ; + undef(%arg_types) ; + undef(@in_out) ; + undef(%in_out) ; undef($proto_in_this_xsub) ; undef($scope_in_this_xsub) ; undef($interface); + undef($prepush_done); $interface_macro = 'XSINTERFACE_FUNC' ; $interface_macro_set = 'XSINTERFACE_FUNC_SET' ; $ProtoThisXSUB = $WantPrototypes ; $ScopeThisXSUB = 0; + $xsreturn = 0; $_ = shift(@line); while ($kwd = check_keyword("REQUIRE|PROTOTYPES|VERSIONCHECK|INCLUDE")) { @@ -967,6 +995,7 @@ while (fetch_para()) { # extract return type, function name and arguments ($ret_type) = TidyType($_); + $RETVAL_no_return = 1 if $ret_type =~ s/^NO_OUTPUT\s+//; # a function definition needs at least 2 lines blurt ("Error: Function definition too short '$ret_type'"), next PARAGRAPH @@ -976,7 +1005,7 @@ while (fetch_para()) { $func_header = shift(@line); blurt ("Error: Cannot parse function definition from '$func_header'"), next PARAGRAPH - unless $func_header =~ /^(?:([\w:]*)::)?(\w+)\s*\(\s*(.*?)\s*\)\s*(const)?\s*$/s; + unless $func_header =~ /^(?:([\w:]*)::)?(\w+)\s*\(\s*(.*?)\s*\)\s*(const)?\s*(;\s*)?$/s; ($class, $func_name, $orig_args) = ($1, $2, $3) ; $class = "$4 $class" if $4; @@ -995,40 +1024,98 @@ while (fetch_para()) { %XsubAliases = %XsubAliasValues = %Interfaces = (); $DoSetMagic = 1; - my $temp_args = $orig_args; - $temp_args =~ s/\\\s*//g; - @args = split(/\s*,\s*/, $temp_args); + $orig_args =~ s/\\\s*/ /g; # process line continuations + + my %out_vars; + if ($process_argtypes and $orig_args =~ /\S/) { + my $args = "$orig_args ,"; + if ($args =~ /^( (?p{ $C_arg }) , )* $ /x) { + @args = ($args =~ /\G ( (?p{ $C_arg }) ) , /xg); + for ( @args ) { + s/^\s+//; + s/\s+$//; + my $arg = $_; + my $default; + ($arg, $default) = / ( [^=]* ) ( (?: = .* )? ) /x; + my ($pre, $name) = ($arg =~ /(.*?) \s* \b(\w+) \s* $ /x); + next unless length $pre; + my $out_type; + my $inout_var; + if ($process_inout and s/^(in|in_outlist|outlist)\s+//) { + my $type = $1; + $out_type = $type if $type ne 'in'; + $arg =~ s/^(in|in_outlist|outlist)\s+//; + } + if (/\W/) { # Has a type + push @arg_with_types, $arg; + # warn "pushing '$arg'\n"; + $arg_types{$name} = $arg; + $_ = "$name$default"; + } + $out_vars{$_} = 1 if $out_type eq 'outlist'; + push @in_out, $name if $out_type; + $in_out{$name} = $out_type if $out_type; + } + } else { + @args = split(/\s*,\s*/, $orig_args); + Warn("Warning: cannot parse argument list '$orig_args', fallback to split"); + } + } else { + @args = split(/\s*,\s*/, $orig_args); + for (@args) { + if ($process_inout and s/^(in|in_outlist|outlist)\s+//) { + my $out_type = $1; + next if $out_type eq 'in'; + $out_vars{$_} = 1 if $out_type eq 'outlist'; + push @in_out, $name; + $in_out{$_} = $out_type; + } + } + } if (defined($class)) { my $arg0 = ((defined($static) or $func_name eq 'new') ? "CLASS" : "THIS"); unshift(@args, $arg0); - ($orig_args = "$arg0, $orig_args") =~ s/^$arg0, $/$arg0/; + ($report_args = "$arg0, $report_args") =~ s/^\w+, $/$arg0/; } - $orig_args =~ s/"/\\"/g; - $min_args = $num_args = @args; - foreach $i (0..$num_args-1) { + my $extra_args = 0; + @args_num = (); + $num_args = 0; + my $report_args = ''; + foreach $i (0 .. $#args) { if ($args[$i] =~ s/\.\.\.//) { $elipsis = 1; - $min_args--; - if ($args[$i] eq '' && $i == $num_args - 1) { + if ($args[$i] eq '' && $i == $#args) { + $report_args .= ", ..."; pop(@args); last; } } + if ($out_vars{$args[$i]}) { + push @args_num, undef; + } else { + push @args_num, ++$num_args; + $report_args .= ", $args[$i]"; + } if ($args[$i] =~ /^([^=]*[^\s=])\s*=\s*(.*)/s) { - $min_args--; + $extra_args++; $args[$i] = $1; $defaults{$args[$i]} = $2; $defaults{$args[$i]} =~ s/"/\\"/g; } $proto_arg[$i+1] = "\$" ; } - if (defined($class)) { - $func_args = join(", ", @args[1..$#args]); - } else { - $func_args = join(", ", @args); + $min_args = $num_args - $extra_args; + $report_args =~ s/"/\\"/g; + $report_args =~ s/^,\s+//; + my @func_args = @args; + shift @func_args if defined($class); + + for (@func_args) { + s/^/&/ if $in_out{$_}; } - @args_match{@args} = 1..@args; + $func_args = join(", ", @func_args); + @args_match{@args} = @args_num; $PPCODE = grep(/^\s*PPCODE\s*:/, @line); $CODE = grep(/^\s*CODE\s*:/, @line); @@ -1039,6 +1126,8 @@ while (fetch_para()) { $ALIAS = grep(/^\s*ALIAS\s*:/, @line); $INTERFACE = grep(/^\s*INTERFACE\s*:/, @line); + $xsreturn = 1 if $EXPLICIT_RETURN; + # print function header print Q<<"EOF"; #XS(XS_${Full_func_name}) @@ -1069,12 +1158,12 @@ EOF if ($ALIAS) { print Q<<"EOF" if $cond } # if ($cond) -# Perl_croak(aTHX_ "Usage: %s($orig_args)", GvNAME(CvGV(cv))); +# Perl_croak(aTHX_ "Usage: %s($report_args)", GvNAME(CvGV(cv))); EOF else { print Q<<"EOF" if $cond } # if ($cond) -# Perl_croak(aTHX_ "Usage: $pname($orig_args)"); +# Perl_croak(aTHX_ "Usage: $pname($report_args)"); EOF print Q<<"EOF" if $PPCODE; @@ -1137,6 +1226,12 @@ EOF if $WantOptimize and $targetable{$type_kind{$ret_type}}; } + if (@arg_with_types) { + unshift @line, @arg_with_types, $_; + $_ = ""; + $processing_arg_with_types = 1; + INPUT_handler() ; + } print $deferred; process_keyword("INIT|ALIAS|PROTOTYPE|INTERFACE_MACRO|INTERFACE|C_ARGS") ; @@ -1178,10 +1273,12 @@ EOF } # do output variables - $gotRETVAL = 0; - undef $RETVAL_code ; + $gotRETVAL = 0; # 1 if RETVAL seen in OUTPUT section; + undef $RETVAL_code ; # code to set RETVAL (from OUTPUT section); + # $wantRETVAL set if 'RETVAL =' autogenerated + ($wantRETVAL, $ret_type) = (0, 'void') if $RETVAL_no_return; undef %outargs ; - process_keyword("OUTPUT|ALIAS|PROTOTYPE"); + process_keyword("POST_CALL|OUTPUT|ALIAS|PROTOTYPE"); # all OUTPUT done, so now push the return value on the stack if ($gotRETVAL && $RETVAL_code) { @@ -1198,6 +1295,7 @@ EOF warn $@ if $@; print "\tsv_setpv(TARG, $what); XSprePUSH; PUSHTARG;\n"; + $prepush_done = 1; } elsif ($t) { my $what = eval qq("$t->[2]"); @@ -1208,6 +1306,7 @@ EOF $size = eval qq("$size"); warn $@ if $@; print "\tXSprePUSH; PUSH$t->[0]($what$size);\n"; + $prepush_done = 1; } else { # RETVAL almost never needs SvSETMAGIC() @@ -1215,6 +1314,14 @@ EOF } } + $xsreturn = 1 if $ret_type ne "void"; + my $num = $xsreturn; + my $c = @in_out; + print "\tXSprePUSH;" if $c and not $prepush_done; + print "\tEXTEND(SP,$c);\n" if $c; + $xsreturn += $c; + generate_output($var_types{$_}, $num++, $_, 0, 1) for @in_out; + # do cleanup process_keyword("CLEANUP|ALIAS|PROTOTYPE") ; @@ -1250,9 +1357,9 @@ EOF # Perl_croak(aTHX_ errbuf); EOF - if ($ret_type ne "void" or $EXPLICIT_RETURN) { + if ($xsreturn) { print Q<<EOF unless $PPCODE; -# XSRETURN(1); +# XSRETURN($xsreturn); EOF } else { print Q<<EOF unless $PPCODE; @@ -1469,7 +1576,11 @@ sub generate_init { eval qq/print "\\t$var;\\n"/; warn $@ if $@; } - $deferred .= eval qq/"\\n\\tif (items < $num)\\n\\t $var = $defaults{$var};\\n\\telse {\\n$expr;\\n\\t}\\n"/; + if ($defaults{$var} eq 'NO_INIT') { + $deferred .= eval qq/"\\n\\tif (items >= $num) {\\n$expr;\\n\\t}\\n"/; + } else { + $deferred .= eval qq/"\\n\\tif (items < $num)\\n\\t $var = $defaults{$var};\\n\\telse {\\n$expr;\\n\\t}\\n"/; + } warn $@ if $@; } elsif ($ScopeThisXSUB or $expr !~ /^\t\$var =/) { if ($name_printed) { @@ -1489,7 +1600,7 @@ sub generate_init { } sub generate_output { - local($type, $num, $var, $do_setmagic) = @_; + local($type, $num, $var, $do_setmagic, $do_push) = @_; local($arg) = "ST(" . ($num - ($num != 0)) . ")"; local($argoff) = $num - 1; local($ntype); @@ -1528,8 +1639,8 @@ sub generate_output { # mortalize it. eval "print qq\a$expr\a"; warn $@ if $@; - print "\tsv_2mortal(ST(0));\n"; - print "\tSvSETMAGIC(ST(0));\n" if $do_setmagic; + print "\tsv_2mortal(ST($num));\n"; + print "\tSvSETMAGIC(ST($num));\n" if $do_setmagic; } elsif ($expr =~ /^\s*\$arg\s*=/) { # We expect that $arg has refcnt >=1, so we need @@ -1550,6 +1661,13 @@ sub generate_output { # new mortals don't have set magic } } + elsif ($do_push) { + print "\tPUSHs(sv_newmortal());\n"; + $arg = "ST($num)"; + eval "print qq\a$expr\a"; + warn $@ if $@; + print "\tSvSETMAGIC($arg);\n" if $do_setmagic; + } elsif ($arg =~ /^ST\(\d+\)$/) { eval "print qq\a$expr\a"; warn $@ if $@; diff --git a/lib/File/Spec/Mac.pm b/lib/File/Spec/Mac.pm index e1f3c175ab..14da25a773 100644 --- a/lib/File/Spec/Mac.pm +++ b/lib/File/Spec/Mac.pm @@ -218,6 +218,174 @@ sub path { return split(/,/, $ENV{Commands}); } +=item splitpath + +=cut + +sub splitpath { + my ($self,$path, $nofile) = @_; + + my ($volume,$directory,$file) = ('','',''); + + if ( $nofile ) { + ( $volume, $directory ) = $path =~ m@((?:[^:]+(?::|$))?)(.*)@; + } + else { + $path =~ + m@^( (?: [^:]+: )? ) + ( (?: .*: )? ) + ( .* ) + @x; + $volume = $1; + $directory = $2; + $file = $3; + } + + # Make sure non-empty volumes and directories end in ':' + $volume .= ':' if $volume =~ m@[^:]$@ ; + $directory .= ':' if $directory =~ m@[^:]$@ ; + return ($volume,$directory,$file); +} + + +=item splitdir + +=cut + +sub splitdir { + my ($self,$directories) = @_ ; + # + # split() likes to forget about trailing null fields, so here we + # check to be sure that there will not be any before handling the + # simple case. + # + if ( $directories !~ m@:$@ ) { + return split( m@:@, $directories ); + } + else { + # + # since there was a trailing separator, add a file name to the end, + # then do the split, then replace it with ''. + # + my( @directories )= split( m@:@, "${directories}dummy" ) ; + $directories[ $#directories ]= '' ; + return @directories ; + } +} + + +=item catpath + +=cut + +sub catpath { + my $self = shift ; + + my $result = shift ; + $result =~ s@^([^/])@/$1@ ; + + my $segment ; + for $segment ( @_ ) { + if ( $result =~ m@[^/]$@ && $segment =~ m@^[^/]@ ) { + $result .= "/$segment" ; + } + elsif ( $result =~ m@/$@ && $segment =~ m@^/@ ) { + $result =~ s@/+$@/@; + $segment =~ s@^/+@@; + $result .= "$segment" ; + } + else { + $result .= $segment ; + } + } + + return $result ; +} + +=item abs2rel + +=cut + +sub abs2rel { + my($self,$path,$base) = @_; + + # Clean up $path + if ( ! $self->file_name_is_absolute( $path ) ) { + $path = $self->rel2abs( $path ) ; + } + + # Figure out the effective $base and clean it up. + if ( !defined( $base ) || $base eq '' ) { + $base = cwd() ; + } + elsif ( ! $self->file_name_is_absolute( $base ) ) { + $base = $self->rel2abs( $base ) ; + } + + # Now, remove all leading components that are the same + my @pathchunks = $self->splitdir( $path ); + my @basechunks = $self->splitdir( $base ); + + while (@pathchunks && @basechunks && $pathchunks[0] eq $basechunks[0]) { + shift @pathchunks ; + shift @basechunks ; + } + + $path = join( ':', @pathchunks ); + + # @basechunks now contains the number of directories to climb out of. + $base = ':' x @basechunks ; + + return "$base:$path" ; +} + +=item rel2abs + +Converts a relative path to an absolute path. + + $abs_path = $File::Spec->rel2abs( $destination ) ; + $abs_path = $File::Spec->rel2abs( $destination, $base ) ; + +If $base is not present or '', then L<cwd()> is used. If $base is relative, +then it is converted to absolute form using L</rel2abs()>. This means that it +is taken to be relative to L<cwd()>. + +On systems with the concept of a volume, this assumes that both paths +are on the $base volume, and ignores the $destination volume. + +On systems that have a grammar that indicates filenames, this ignores the +$base filename as well. Otherwise all path components are assumed to be +directories. + +If $path is absolute, it is cleaned up and returned using L</canonpath()>. + +Based on code written by Shigio Yamaguchi. + +No checks against the filesystem are made. + +=cut + +sub rel2abs($;$;) { + my ($self,$path,$base ) = @_; + + if ( ! $self->file_name_is_absolute( $path ) ) { + if ( !defined( $base ) || $base eq '' ) { + $base = cwd() ; + } + elsif ( ! $self->file_name_is_absolute( $base ) ) { + $base = $self->rel2abs( $base ) ; + } + else { + $base = $self->canonpath( $base ) ; + } + + $path = $self->canonpath("$base$path") ; + } + + return $path ; +} + + =back =head1 SEE ALSO diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm index 85df2c2d3b..d47a60e9cc 100644 --- a/lib/File/Spec/Unix.pm +++ b/lib/File/Spec/Unix.pm @@ -26,28 +26,15 @@ No physical check on the filesystem, but a logical cleanup of a path. On UNIX eliminated successive slashes and successive "/.". $cpath = File::Spec->canonpath( $path ) ; - $cpath = File::Spec->canonpath( $path, $reduce_ricochet ) ; - -If $reduce_ricochet is present and true, then "dirname/.." -constructs are eliminated from the path. Without $reduce_ricochet, -if dirname is a symbolic link, then "a/dirname/../b" will often -take you to someplace other than "a/b". This is sometimes desirable. -If it's not, setting $reduce_ricochet causes the "dirname/.." to -be removed from this path, resulting in "a/b". This may make -your perl more portable and robust, unless you want to -ricochet (some scripts depend on it). =cut sub canonpath { - my ($self,$path,$reduce_ricochet) = @_; + my ($self,$path) = @_; $path =~ s|/+|/|g unless($^O eq 'cygwin'); # xx////xx -> xx/xx $path =~ s|(/\.)+/|/|g; # xx/././xx -> xx/xx $path =~ s|^(\./)+|| unless $path eq "./"; # ./xx -> xx $path =~ s|^/(\.\./)+|/|; # /../../xx -> xx - if ( $reduce_ricochet ) { - while ( $path =~ s@[^/]+/\.\.(?:/|$)@@ ) {}# xx/.. -> xx - } $path =~ s|/$|| unless $path eq "/"; # xx/ -> xx return $path; } @@ -281,8 +268,8 @@ sub splitdir { =item catpath Takes volume, directory and file portions and returns an entire path. Under -Unix, $volume is ignored, and this is just like catfile(). On other OSs, -the $volume become significant. +Unix, $volume is ignored, and directory and file are catenated. A '/' is +inserted if need be. On other OSs, $volume is significant. =cut diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm index 79491463cd..71c38f222f 100644 --- a/lib/File/Spec/VMS.pm +++ b/lib/File/Spec/VMS.pm @@ -263,6 +263,220 @@ sub file_name_is_absolute { $file =~ /:[^<\[]/); } +=item splitpath + + ($volume,$directories,$file) = File::Spec->splitpath( $path ); + ($volume,$directories,$file) = File::Spec->splitpath( $path, $no_file ); + +Splits a VMS path in to volume, directory, and filename portions. +Ignores $no_file, if present, since VMS paths indicate the 'fileness' of a +file. + +The results can be passed to L</catpath()> to get back a path equivalent to +(usually identical to) the original path. + +=cut + +sub splitpath { + my $self = shift ; + my ($path, $nofile) = @_; + + my ($volume,$directory,$file) ; + + if ( $path =~ m{/} ) { + $path =~ + m{^ ( (?: /[^/]* )? ) + ( (?: .*/(?:[^/]+.dir)? )? ) + (.*) + }x; + $volume = $1; + $directory = $2; + $file = $3; + } + else { + $path =~ + m{^ ( (?: (?: (?: [\w\$-]+ (?: "[^"]*")?:: )? [\w\$-]+: )? ) ) + ( (?:\[.*\])? ) + (.*) + }x; + $volume = $1; + $directory = $2; + $file = $3; + } + + $directory = $1 + if $directory =~ /^\[(.*)\]$/ ; + + return ($volume,$directory,$file); +} + + +=item splitdir + +The opposite of L</catdir()>. + + @dirs = File::Spec->splitdir( $directories ); + +$directories must be only the directory portion of the path. + +'[' and ']' delimiters are optional. An empty string argument is +equivalent to '[]': both return an array with no elements. + +=cut + +sub splitdir { + my $self = shift ; + my $directories = $_[0] ; + + return File::Spec::Unix::splitdir( $self, @_ ) + if ( $directories =~ m{/} ) ; + + $directories =~ s/^\[(.*)\]$/$1/ ; + + # + # split() likes to forget about trailing null fields, so here we + # check to be sure that there will not be any before handling the + # simple case. + # + if ( $directories !~ m{\.$} ) { + return split( m{\.}, $directories ); + } + else { + # + # since there was a trailing separator, add a file name to the end, + # then do the split, then replace it with ''. + # + my( @directories )= split( m{\.}, "${directories}dummy" ) ; + $directories[ $#directories ]= '' ; + return @directories ; + } +} + + +sub catpath { + my $self = shift; + + return File::Spec::Unix::catpath( $self, @_ ) + if ( join( '', @_ ) =~ m{/} ) ; + + my ($volume,$directory,$file) = @_; + + $volume .= ':' + if $volume =~ /[^:]$/ ; + + $directory = "[$directory" + if $directory =~ /^[^\[]/ ; + + $directory .= ']' + if $directory =~ /[^\]]$/ ; + + return "$volume$directory$file" ; +} + + +sub abs2rel { + my $self = shift; + + return File::Spec::Unix::abs2rel( $self, @_ ) + if ( join( '', @_ ) =~ m{/} ) ; + + my($path,$base) = @_; + + # Note: we use '/' to glue things together here, then let canonpath() + # clean them up at the end. + + # Clean up $path + if ( ! $self->file_name_is_absolute( $path ) ) { + $path = $self->rel2abs( $path ) ; + } + else { + $path = $self->canonpath( $path ) ; + } + + # Figure out the effective $base and clean it up. + if ( ! $self->file_name_is_absolute( $base ) ) { + $base = $self->rel2abs( $base ) ; + } + elsif ( !defined( $base ) || $base eq '' ) { + $base = cwd() ; + } + else { + $base = $self->canonpath( $base ) ; + } + + # Split up paths + my ( undef, $path_directories, $path_file ) = + $self->splitpath( $path, 1 ) ; + + $path_directories = $1 + if $path_directories =~ /^\[(.*)\]$/ ; + + my ( undef, $base_directories, undef ) = + $self->splitpath( $base, 1 ) ; + + $base_directories = $1 + if $base_directories =~ /^\[(.*)\]$/ ; + + # Now, remove all leading components that are the same + my @pathchunks = $self->splitdir( $path_directories ); + my @basechunks = $self->splitdir( $base_directories ); + + while ( @pathchunks && + @basechunks && + lc( $pathchunks[0] ) eq lc( $basechunks[0] ) + ) { + shift @pathchunks ; + shift @basechunks ; + } + + # @basechunks now contains the directories to climb out of, + # @pathchunks now has the directories to descend in to. + $path_directories = '-.' x @basechunks . join( '.', @pathchunks ) ; + $path_directories =~ s{\.$}{} ; + return $self->catpath( '', $path_directories, $path_file ) ; +} + + +sub rel2abs($;$;) { + my $self = shift ; + return File::Spec::Unix::rel2abs( $self, @_ ) + if ( join( '', @_ ) =~ m{/} ) ; + + my ($path,$base ) = @_; + # Clean up and split up $path + if ( ! $self->file_name_is_absolute( $path ) ) { + # Figure out the effective $base and clean it up. + if ( !defined( $base ) || $base eq '' ) { + $base = cwd() ; + } + elsif ( ! $self->file_name_is_absolute( $base ) ) { + $base = $self->rel2abs( $base ) ; + } + else { + $base = $self->canonpath( $base ) ; + } + + # Split up paths + my ( undef, $path_directories, $path_file ) = + $self->splitpath( $path ) ; + + my ( $base_volume, $base_directories, undef ) = + $self->splitpath( $base ) ; + + my $sep = '' ; + $sep = '.' + if ( $base_directories =~ m{[^.]$} && + $path_directories =~ m{^[^.]} + ) ; + $base_directories = "$base_directories$sep$path_directories" ; + + $path = $self->catpath( $base_volume, $base_directories, $path_file ); + } + + return $self->canonpath( $path ) ; +} + + =back =head1 SEE ALSO diff --git a/lib/File/Spec/Win32.pm b/lib/File/Spec/Win32.pm index 120b799cd2..f1c6ccf8c7 100644 --- a/lib/File/Spec/Win32.pm +++ b/lib/File/Spec/Win32.pm @@ -95,7 +95,7 @@ path. On UNIX eliminated successive slashes and successive "/.". =cut sub canonpath { - my ($self,$path,$reduce_ricochet) = @_; + my ($self,$path) = @_; $path =~ s/^([a-z]:)/\u$1/; $path =~ s|/|\\|g; $path =~ s|([^\\])\\+|$1\\|g; # xx////xx -> xx/xx @@ -120,7 +120,7 @@ Separators accepted are \ and /. Volumes can be drive letters or UNC sharenames (\\server\share). -The results can be passed to L</catpath()> to get back a path equivalent to +The results can be passed to L</catpath> to get back a path equivalent to (usually identical to) the original path. =cut @@ -130,21 +130,21 @@ sub splitpath { my ($volume,$directory,$file) = ('','',''); if ( $nofile ) { $path =~ - m@^( (?:[a-zA-Z]:|(?:\\\\\\\\|//)[^\\\\/]+[\\\\/][^\\\\/]+)? ) + m{^( (?:[a-zA-Z]:|(?:\\\\|//)[^\\/]+[\\/][^\\/]+)? ) (.*) - @x; + }x; $volume = $1; $directory = $2; } else { $path =~ - m@^ ( (?: [a-zA-Z]: | - (?:\\\\\\\\|//)[^\\\\/]+[\\\\/][^\\\\/]+ + m{^ ( (?: [a-zA-Z]: | + (?:\\\\|//)[^\\/]+[\\/][^\\/]+ )? ) ( (?:.*[\\\\/](?:\.\.?$)?)? ) (.*) - @x; + }x; $volume = $1; $directory = $2; $file = $3; @@ -221,8 +221,8 @@ sub catpath { # If the volume is not just A:, make sure the glue separator is # there, reusing whatever separator is first in the $volume if possible. if ( $volume !~ m@^[a-zA-Z]:$@ && - $volume !~ m@[\\/]$@ && - $file !~ m@^[\\/]@ + $volume =~ m@[^\\/]$@ && + $file =~ m@[^\\/]@ ) { $volume =~ m@([\\/])@ ; my $sep = $1 ? $1 : '\\' ; @@ -248,7 +248,7 @@ then it is converted to absolute form using L</rel2abs()>. This means that it is taken to be relative to L<cwd()>. On systems with the concept of a volume, this assumes that both paths -are on the $destination volume, and ignores the $base volume. +are on the $destination volume, and ignores the $base volume. On systems that have a grammar that indicates filenames, this ignores the $base filename as well. Otherwise all path components are assumed to be @@ -325,8 +325,11 @@ sub abs2rel { $path_directories = "$base_directories$path_directories" ; } + # It makes no sense to add a relative path to a UNC volume + $path_volume = '' unless $path_volume =~ m{^[A-Z]:}i ; + return $self->canonpath( - $self->catpath( $path_volume, $path_directories, $path_file ) + $self->catpath($path_volume, $path_directories, $path_file ) ) ; } @@ -359,10 +362,8 @@ No checks against the filesystem are made. sub rel2abs($;$;) { my ($self,$path,$base ) = @_; - # Clean up and split up $path if ( ! $self->file_name_is_absolute( $path ) ) { - # Figure out the effective $base and clean it up. if ( ! $self->file_name_is_absolute( $base ) ) { $base = $self->rel2abs( $base ) ; } @@ -373,7 +374,6 @@ sub rel2abs($;$;) { $base = $self->canonpath( $base ) ; } - # Split up paths my ( undef, $path_directories, $path_file ) = $self->splitpath( $path, 1 ) ; diff --git a/lib/Pod/Checker.pm b/lib/Pod/Checker.pm index c661c7527e..b5f980bba7 100644 --- a/lib/Pod/Checker.pm +++ b/lib/Pod/Checker.pm @@ -10,7 +10,7 @@ package Pod::Checker; use vars qw($VERSION); -$VERSION = 1.096; ## Current version of this package +$VERSION = 1.097; ## Current version of this package require 5.004; ## requires this Perl version or later use Pod::ParseUtils; ## for hyperlinks and lists @@ -111,6 +111,11 @@ very robust conversions. =over 4 +=item * empty =headn + +A heading (C<=head1> or C<=head2>) without any text? That ain't no +heading! + =item * =over on line I<N> without closing =back The C<=over> command does not have a corresponding C<=back> before the @@ -134,7 +139,7 @@ A standalone C<=end> command was found. =item * Nested =begin's -There were at least two concecutive C<=begin> commands without +There were at least two consecutive C<=begin> commands without the corresponding C<=end>. Only one C<=begin> may be active at a time. @@ -168,13 +173,29 @@ does not make sense. =item * garbled entity I<STRING> -The I<STRING> found cannot be interpreted as an character entity. +The I<STRING> found cannot be interpreted as a character entity. + +=item * Entity number out of range + +An entity specified by number (dec, hex, oct) is out of range (1-255). =item * malformed link LE<lt>E<gt> The link found cannot be parsed because it does not conform to the syntax described in L<perlpod>. +=item * nonempty ZE<lt>E<gt> + +The C<ZE<lt>E<gt>> sequence is supposed to be empty. + +=item * Spurious text after =pod / =cut + +The commands C<=pod> and C<=cut> do not take any arguments. + +=item * Spurious character(s) after =back + +The C<=back> command does not take any arguments. + =back =head2 Warnings @@ -183,14 +204,43 @@ These may not necessarily cause trouble, but indicate mediocre style. =over 4 +=item * multiple occurence of link target I<name> + +The POD file has some C<=item> and/or C<=head> commands that have +the same text. Potential hyperlinks to such a text cannot be unique then. + +=item * line containing nothing but whitespace in paragraph + +There is some whitespace on a seemingly empty line. POD is very sensitive +to such things, so this is flagged. B<vi> users switch on the B<list> +option to avoid this problem. + +=item * file does not start with =head + +The file starts with a different POD directive than head. +This is most probably something you do not want. + =item * No numeric argument for =over The C<=over> command is supposed to have a numeric argument (the indentation). -=item * Spurious character(s) after =back +=item * previous =item has no contents -The C<=back> command does not take any arguments. +There is a list C<=item> right above the flagged line that has no +text contents. You probably want to delete empty items. + +=item * preceding non-item paragraph(s) + +A list introduced by C<=over> starts with a text or verbatim paragraph, +but continues with C<=item>s. Move the non-item paragraph out of the +C<=over>/C<=back> block. + +=item * =item type mismatch (I<one> vs. I<two>) + +A list started with e.g. a bulletted C<=item> and continued with a +numbered one. This is obviously inconsistent. For most translators the +type of the I<first> C<=item> determines the type of the list. =item * I<N> unescaped C<E<lt>E<gt>> in paragraph @@ -198,14 +248,14 @@ Angle brackets not written as C<E<lt>ltE<gt>> and C<E<lt>gtE<gt>> can potentially cause errors as they could be misinterpreted as markup commands. -=item * Non-standard entity +=item * Unknown entity A character entity was found that does not belong to the standard -ISO set. +ISO set or the POD specials C<verbar> and C<sol>. =item * No items in =over -The list does not contain any items. +The list opened with C<=over> does not contain any items. =item * No argument for =item @@ -214,6 +264,12 @@ by C<*> to indicate an unordered list, by a number (optionally followed by a dot) to indicate an ordered (numbered) list or simple text for a definition list. +=item * empty section in previous paragraph + +The previous section (introduced by a C<=head> command) does not contain +any text. This usually indicates that something is missing. Note: A +C<=head1> followed immediately by C<=head2> does not trigger this warning. + =item * Verbatim paragraph in NAME section The NAME section (C<=head1 NAME>) should consist of a single paragraph @@ -395,6 +451,10 @@ my %ENTITIES = ( iquest => '¿', 'times' => '×', # times is a keyword in perl divide => '÷', + +# some POD special entities + verbar => '|', + sol => '/' ); ##--------------------------------------------------------------------------- @@ -413,6 +473,7 @@ sub podchecker( $ ; $ % ) { ## Now create a pod checker my $checker = new Pod::Checker(%options); + $checker->parseopts(-process_cut_cmd => 1); ## Now check the pod document for errors $checker->parse_from_file($infile, $outfile); @@ -427,15 +488,15 @@ sub podchecker( $ ; $ % ) { ## Method definitions begin here ##------------------------------- -sub new { - my $this = shift; - my $class = ref($this) || $this; - my %params = @_; - my $self = {%params}; - bless $self, $class; - $self->initialize(); - return $self; -} +## sub new { +## my $this = shift; +## my $class = ref($this) || $this; +## my %params = @_; +## my $self = {%params}; +## bless $self, $class; +## $self->initialize(); +## return $self; +## } sub initialize { my $self = shift; @@ -462,6 +523,10 @@ sub poderror { chomp( my $msg = ($opts{-msg} || "")."@_" ); my $line = (exists $opts{-line}) ? " at line $opts{-line}" : ""; my $file = (exists $opts{-file}) ? " in file $opts{-file}" : ""; + unless (exists $opts{-severity}) { + ## See if can find severity in message prefix + $opts{-severity} = $1 if ( $msg =~ s/^\**\s*([A-Z]{3,}):\s+// ); + } my $severity = (exists $opts{-severity}) ? "*** $opts{-severity}: " : ""; ## Increment error count and print message " @@ -487,9 +552,12 @@ sub name { sub node { my ($self,$text) = @_; if(defined $text) { - $text =~ s/[\s\n]+$//; # strip trailing whitespace - # add node + $text =~ s/\s+$//s; # strip trailing whitespace + $text =~ s/\s+/ /gs; # collapse whitespace + # add node, order important! push(@{$self->{_nodes}}, $text); + # keep also a uniqueness counter + $self->{_unique_nodes}->{$text}++; return $text; } @{$self->{_nodes}}; @@ -508,56 +576,63 @@ sub hyperlink { ## overrides for Pod::Parser sub end_pod { - ## Do some final checks and - ## print the number of errors found - my $self = shift; - my $infile = $self->input_file(); - my $out_fh = $self->output_handle(); - - if(@{$self->{_list_stack}}) { - # _TODO_ display, but don't count them for now - my $list; - while($list = shift(@{$self->{_list_stack}})) { - $self->poderror({ -line => 'EOF', -file => $infile, - -severity => 'ERROR', -msg => "=over on line " . - $list->start() . " without closing =back" }); #" - } - } - - # check validity of document internal hyperlinks - # first build the node names from the paragraph text - my %nodes; - foreach($self->node()) { - $nodes{$_} = 1; - if(/^(\S+)\s+/) { - # we have more than one word. Use the first as a node, too. - # This is used heavily in perlfunc.pod - $nodes{$1} ||= 2; # derived node - } - } - foreach($self->hyperlink()) { - my $line = ''; - s/^(\d+):// && ($line = $1); - if($_ && !$nodes{$_}) { - $self->poderror({ -line => $line, -file => $infile, - -severity => 'ERROR', - -msg => "unresolved internal link `$_'"}); - } - } - - ## Print the number of errors found - my $num_errors = $self->num_errors(); - if ($num_errors > 0) { - printf $out_fh ("$infile has $num_errors pod syntax %s.\n", + ## Do some final checks and + ## print the number of errors found + my $self = shift; + my $infile = $self->input_file(); + my $out_fh = $self->output_handle(); + + if(@{$self->{_list_stack}}) { + # _TODO_ display, but don't count them for now + my $list; + while(($list = $self->_close_list('EOF',$infile)) && + $list->indent() ne 'auto') { + $self->poderror({ -line => 'EOF', -file => $infile, + -severity => 'ERROR', -msg => "=over on line " . + $list->start() . " without closing =back" }); #" + } + } + + # check validity of document internal hyperlinks + # first build the node names from the paragraph text + my %nodes; + foreach($self->node()) { + $nodes{$_} = 1; + if(/^(\S+)\s+/) { + # we have more than one word. Use the first as a node, too. + # This is used heavily in perlfunc.pod + $nodes{$1} ||= 2; # derived node + } + } + foreach($self->hyperlink()) { + my $line = ''; + s/^(\d+):// && ($line = $1); + if($_ && !$nodes{$_}) { + $self->poderror({ -line => $line, -file => $infile, + -severity => 'ERROR', + -msg => "unresolved internal link '$_'"}); + } + } + foreach(grep($self->{_unique_nodes}->{$_} > 1, + keys %{$self->{_unique_nodes}})) { + $self->poderror({ -line => '-', -file => $infile, + -severity => 'WARNING', + -msg => "multiple occurence of link target '$_'"}); + } + + ## Print the number of errors found + my $num_errors = $self->num_errors(); + if ($num_errors > 0) { + printf $out_fh ("$infile has $num_errors pod syntax %s.\n", ($num_errors == 1) ? "error" : "errors"); - } - elsif($self->{_commands} == 0) { - print $out_fh "$infile does not contain any pod commands.\n"; - $self->num_errors(-1); - } - else { - print $out_fh "$infile pod syntax OK.\n"; - } + } + elsif($self->{_commands} == 0) { + print $out_fh "$infile does not contain any pod commands.\n"; + $self->num_errors(-1); + } + else { + print $out_fh "$infile pod syntax OK.\n"; + } } # check a POD command directive @@ -568,10 +643,15 @@ sub command { my $arg; # this will hold the command argument if (! $VALID_COMMANDS{$cmd}) { $self->poderror({ -line => $line, -file => $file, -severity => 'ERROR', - -msg => "Unknown command \"$cmd\"" }); + -msg => "Unknown command '$cmd'" }); } else { - $self->{_commands}++; # found a valid command + # found a valid command + if(!$self->{_commands}++ && $cmd !~ /^head/) { + $self->poderror({ -line => $line, -file => $file, + -severity => 'WARNING', + -msg => "file does not start with =head" }); + } ## check syntax of particular command if($cmd eq 'over') { # check for argument @@ -585,10 +665,7 @@ sub command { -msg => "No numeric argument for =over"}); } # start a new list - unshift(@{$self->{_list_stack}}, Pod::List->new( - -indent => $indent, - -start => $line, - -file => $file)); + $self->_open_list($indent,$line,$file); } elsif($cmd eq 'item') { # are we in a list? @@ -597,22 +674,60 @@ sub command { -severity => 'ERROR', -msg => "=item without previous =over" }); # auto-open in case we encounter many more - unshift(@{$self->{_list_stack}}, - Pod::List->new( - -indent => 'auto', - -start => $line, - -file => $file)); + $self->_open_list('auto',$line,$file); + } + my $list = $self->{_list_stack}->[0]; + # check whether the previous item had some contents + if(defined $self->{_list_item_contents} && + $self->{_list_item_contents} == 0) { + $self->poderror({ -line => $line, -file => $file, + -severity => 'WARNING', + -msg => "previous =item has no contents" }); + } + if($list->{_has_par}) { + $self->poderror({ -line => $line, -file => $file, + -severity => 'WARNING', + -msg => "preceding non-item paragraph(s)" }); + delete $list->{_has_par}; } # check for argument $arg = $self->interpolate_and_check($paragraph, $line, $file); - unless($arg && $arg =~ /(\S+)/) { + if($arg && $arg =~ /(\S+)/) { + $arg =~ s/[\s\n]+$//; + my $type; + if($arg =~ /^[*]\s*(\S*.*)/) { + $type = 'bullet'; + $self->{_list_item_contents} = $1 ? 1 : 0; + $arg = $1; + } + elsif($arg =~ /^\d+\.?\s*(\S*)/) { + $type = 'number'; + $self->{_list_item_contents} = $1 ? 1 : 0; + $arg = $1; + } + else { + $type = 'definition'; + $self->{_list_item_contents} = 1; + } + my $first = $list->type(); + if($first && $first ne $type) { + $self->poderror({ -line => $line, -file => $file, + -severity => 'WARNING', + -msg => "=item type mismatch ('$first' vs. '$type')"}); + } + else { # first item + $list->type($type); + } + } + else { $self->poderror({ -line => $line, -file => $file, -severity => 'WARNING', -msg => "No argument for =item" }); $arg = ' '; # empty + $self->{_list_item_contents} = 0; } # add this item - $self->{_list_stack}[0]->item($arg); + $list->item($arg); # remember this node $self->node($arg); } @@ -628,11 +743,11 @@ sub command { $arg = $self->interpolate_and_check($paragraph, $line,$file); if($arg && $arg =~ /\S/) { $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', + -severity => 'ERROR', -msg => "Spurious character(s) after =back" }); } # close list - my $list = shift @{$self->{_list_stack}}; + my $list = $self->_close_list($line,$file); # check for empty lists if(!$list->item() && $self->{-warnings}) { $self->poderror({ -line => $line, -file => $file, @@ -642,11 +757,22 @@ sub command { } } } - elsif($cmd =~ /^head/) { + elsif($cmd =~ /^head(\d+)/) { + if(defined $self->{_commands_in_head} && + $self->{_commands_in_head} == 0 && + defined $self->{_last_head} && + $self->{_last_head} >= $1) { + $self->poderror({ -line => $line, -file => $file, + -severity => 'WARNING', + -msg => "empty section in previous paragraph"}); + } + $self->{_commands_in_head} = -1; + $self->{_last_head} = $1; # check if there is an open list if(@{$self->{_list_stack}}) { my $list; - while($list = shift(@{$self->{_list_stack}})) { + while(($list = $self->_close_list($line,$file)) && + $list->indent() ne 'auto') { $self->poderror({ -line => $line, -file => $file, -severity => 'ERROR', -msg => "=over on line ". $list->start() . @@ -655,9 +781,14 @@ sub command { } # remember this node $arg = $self->interpolate_and_check($paragraph, $line,$file); - $self->node($arg) if($arg); + $arg =~ s/[\s\n]+$//s; + $self->node($arg); + unless(length($arg)) { + $self->poderror({ -line => $line, -file => $file, + -severity => 'ERROR', + -msg => "empty =$cmd"}); + } if($cmd eq 'head1') { - $arg =~ s/[\s\n]+$//; $self->{_current_head1} = $arg; } else { $self->{_current_head1} = ''; @@ -711,12 +842,48 @@ sub command { } $arg = ''; # do not expand paragraph below } + elsif($cmd =~ /^(pod|cut)$/) { + # check for argument + $arg = $self->interpolate_and_check($paragraph, $line,$file); + if($arg && $arg =~ /(\S+)/) { + $self->poderror({ -line => $line, -file => $file, + -severity => 'ERROR', + -msg => "Spurious text after =$cmd"}); + } + } + $self->{_commands_in_head}++; ## Check the interior sequences in the command-text $self->interpolate_and_check($paragraph, $line,$file) unless(defined $arg); } } +sub _open_list +{ + my ($self,$indent,$line,$file) = @_; + my $list = Pod::List->new( + -indent => $indent, + -start => $line, + -file => $file); + unshift(@{$self->{_list_stack}}, $list); + undef $self->{_list_item_contents}; + $list; +} + +sub _close_list +{ + my ($self,$line,$file) = @_; + my $list = shift(@{$self->{_list_stack}}); + if(defined $self->{_list_item_contents} && + $self->{_list_item_contents} == 0) { + $self->poderror({ -line => $line, -file => $file, + -severity => 'WARNING', + -msg => "previous =item has no contents" }); + } + undef $self->{_list_item_contents}; + $list; +} + # process a block of some text sub interpolate_and_check { my ($self, $paragraph, $line, $file) = @_; @@ -754,7 +921,7 @@ sub _check_ptree { if (! $VALID_SEQUENCES{$cmd}) { $self->poderror({ -line => $line, -file => $file, -severity => 'ERROR', - -msg => qq(Unknown interior-sequence "$cmd")}); + -msg => qq(Unknown interior-sequence '$cmd')}); # expand it anyway $text .= $self->_check_ptree($contents, $line, $file, "$nestlist$cmd"); next; @@ -775,9 +942,28 @@ sub _check_ptree { next; } my $ent = $$contents[0]; - if($ent =~ /^\d+$/) { + my $val; + if($ent =~ /^0x[0-9a-f]+$/i) { + # hexadec entity + $val = hex($ent); + } + elsif($ent =~ /^0\d+$/) { + # octal + $val = oct($ent); + } + elsif($ent =~ /^\d+$/) { # numeric entity - $text .= chr($ent); + $val = $ent; + } + if(defined $val) { + if($val>0 && $val<256) { + $text .= chr($val); + } + else { + $self->poderror({ -line => $line, -file => $file, + -severity => 'ERROR', + -msg => "Entity number out of range " . $_->raw_text()}); + } } elsif($ENTITIES{$ent}) { # known ISO entity @@ -786,7 +972,7 @@ sub _check_ptree { else { $self->poderror({ -line => $line, -file => $file, -severity => 'WARNING', - -msg => "Non-standard entity " . $_->raw_text()}); + -msg => "Unknown entity " . $_->raw_text()}); $text .= "E<$ent>"; } } @@ -824,8 +1010,15 @@ sub _check_ptree { # add the guts $text .= $self->_check_ptree($contents, $line, $file, "$nestlist$cmd"); } - else { - # check, but add nothing to $text (X<>, Z<>) + elsif($cmd eq 'Z') { + if(length($contents->raw_text())) { + $self->poderror({ -line => $line, -file => $file, + -severity => 'ERROR', + -msg => "Nonempty Z<>"}); + } + } + else { # X<> + # check, but add nothing to $text $self->_check_ptree($contents, $line, $file, "$nestlist$cmd"); } } @@ -836,8 +1029,11 @@ sub _check_ptree { # process a block of verbatim text sub verbatim { - ## Nothing to check + ## Nothing particular to check my ($self, $paragraph, $line_num, $pod_para) = @_; + + $self->_preproc_par($paragraph); + if($self->{_current_head1} eq 'NAME') { my ($file, $line) = $pod_para->file_line; $self->poderror({ -line => $line, -file => $file, @@ -851,6 +1047,8 @@ sub textblock { my ($self, $paragraph, $line_num, $pod_para) = @_; my ($file, $line) = $pod_para->file_line; + $self->_preproc_par($paragraph); + # skip this paragraph if in a =begin block unless($self->{_have_begin}) { my $block = $self->interpolate_and_check($paragraph, $line,$file); @@ -863,4 +1061,18 @@ sub textblock { } } +sub _preproc_par +{ + my $self = shift; + $_[0] =~ s/[\s\n]+$//; + if($_[0]) { + $self->{_commands_in_head}++; + $self->{_list_item_contents}++ if(defined $self->{_list_item_contents}); + if(@{$self->{_list_stack}} && !$self->{_list_stack}->[0]->item()) { + $self->{_list_stack}->[0]->{_has_par} = 1; + } + } +} + 1; + diff --git a/lib/Pod/Find.pm b/lib/Pod/Find.pm index 399bbba252..038b090b42 100644 --- a/lib/Pod/Find.pm +++ b/lib/Pod/Find.pm @@ -3,7 +3,8 @@ # # Author: Marek Rouchal <marek@saftsack.fs.uni-bayreuth.de> # -# borrowing code from Nick Ing-Simmon's PodToHtml +# Copyright (C) 1999-2000 by Marek Rouchal (and borrowing code +# from Nick Ing-Simmon's PodToHtml). All rights reserved. # This file is part of "PodParser". Pod::Find is free software; # you can redistribute it and/or modify it under the same terms # as Perl itself. @@ -12,8 +13,8 @@ package Pod::Find; use vars qw($VERSION); -$VERSION = 0.10; ## Current version of this package -require 5.005; ## requires this Perl version or later +$VERSION = 0.11; ## Current version of this package +require 5.004; ## requires this Perl version or later ############################################################################# @@ -113,7 +114,9 @@ use vars qw(@ISA @EXPORT_OK $VERSION); # package global variables my $SIMPLIFY_RX; -# return a hash of the +# return a hash of the POD files found +# first argument may be a hashref (options), +# rest is a list of directories to search recursively sub pod_find { my %opts; @@ -145,7 +148,8 @@ sub pod_find # * remove e.g. 5.00503 # * remove pod/ if followed by *.pod (e.g. in pod/perlfunc.pod) $SIMPLIFY_RX = - qr!^(?i:site_perl/|$Config::Config{archname}/|\d+\.\d+([_.]?\d+)?/|pod/(?=.*?\.pod$))*!o; + qq!^(?i:site_perl/|\Q$Config::Config{archname}\E/|\\d+\\.\\d+([_.]?\\d+)?/|pod/(?=.*?\\.pod\$))*!; + } my %dirs_visited; @@ -166,7 +170,7 @@ sub pod_find } next; } - my $root_rx = qr!^\Q$try\E/!; + my $root_rx = qq!^\Q$try\E/!; File::Find::find( sub { my $item = $File::Find::name; if(-d) { diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm index 4d77bc0a11..e48e9b2825 100644 --- a/lib/Pod/Html.pm +++ b/lib/Pod/Html.pm @@ -245,6 +245,8 @@ $itemcache = "pod2htmi$cache_ext"; @libpods = (); # files to search for links from C<> directives $htmlroot = "/"; # http-server base directory from which all # relative paths in $podpath stem. +$htmldir = ""; # The directory to which the html pages + # will (eventually) be written. $htmlfile = ""; # write to stdout by default $podfile = ""; # read from stdin by default @podpath = (); # list of directories containing library pods. @@ -616,7 +618,7 @@ sub parse_command_line { $podfile = $opt_infile if defined $opt_infile; $htmlfile = $opt_outfile if defined $opt_outfile; - $htmldir = $opt_htmldir if defined $opt_outfile; + $htmldir = $opt_htmldir if defined $opt_htmldir; @podpath = split(":", $opt_podpath) if defined $opt_podpath; @libpods = split(":", $opt_libpods) if defined $opt_libpods; @@ -1334,7 +1336,7 @@ sub process_puretext { # skip space runs next if $word =~ /^\s*$/; # see if we can infer a link - if( $notinIS && $word =~ s/^(\w+)\((.*)\)\W*$/$1/ ) { + if( $notinIS && $word =~ /^(\w+)\((.*)\)\W*$/ ) { # has parenthesis so should have been a C<> ref ## try for a pagename (perlXXX(1))? if( $2 =~ /^\d+$/ ){ @@ -1786,7 +1788,6 @@ sub coderef($$){ my( $url ); my $fid = fragment_id( $item ); - return( $url, $fid ); if( defined( $page ) ){ # we have been given a $page... $page =~ s{::}{/}g; @@ -1801,10 +1802,12 @@ sub coderef($$){ } else { # no page - local items precede cached items - if( exists $local_items{$fid} ){ - $page = $local_items{$fid}; - } else { - $page = $items{$fid}; + if( defined( $fid ) ){ + if( exists $local_items{$fid} ){ + $page = $local_items{$fid}; + } else { + $page = $items{$fid}; + } } } @@ -1880,10 +1883,11 @@ sub htmlify { # Note: can be called with copy or modify semantics # my %E2c; -$E2c{lt} = '<'; -$E2c{gt} = '>'; -$E2c{sol} = '/'; +$E2c{lt} = '<'; +$E2c{gt} = '>'; +$E2c{sol} = '/'; $E2c{verbar} = '|'; +$E2c{amp} = '&'; # in Tk's pods sub depod1($;$); diff --git a/lib/Pod/InputObjects.pm b/lib/Pod/InputObjects.pm index 1432895e91..7544fb76c5 100644 --- a/lib/Pod/InputObjects.pm +++ b/lib/Pod/InputObjects.pm @@ -2,7 +2,7 @@ # Pod/InputObjects.pm -- package which defines objects for input streams # and paragraphs and commands when parsing POD docs. # -# Copyright (C) 1996-1999 by Bradford Appleton. All rights reserved. +# Copyright (C) 1996-2000 by Bradford Appleton. All rights reserved. # This file is part of "PodParser". PodParser is free software; # you can redistribute it and/or modify it under the same terms # as Perl itself. @@ -11,7 +11,7 @@ package Pod::InputObjects; use vars qw($VERSION); -$VERSION = 1.090; ## Current version of this package +$VERSION = 1.10; ## Current version of this package require 5.004; ## requires this Perl version or later ############################################################################# diff --git a/lib/Pod/ParseUtils.pm b/lib/Pod/ParseUtils.pm index a66e8f5e8b..2b3734fef9 100644 --- a/lib/Pod/ParseUtils.pm +++ b/lib/Pod/ParseUtils.pm @@ -1,7 +1,7 @@ ############################################################################# # Pod/ParseUtils.pm -- helpers for POD parsing and conversion # -# Copyright (C) 1999 by Marek Rouchal. All rights reserved. +# Copyright (C) 1999-2000 by Marek Rouchal. All rights reserved. # This file is part of "PodParser". PodParser is free software; # you can redistribute it and/or modify it under the same terms # as Perl itself. @@ -305,32 +305,38 @@ sub parse { #warn "DEBUG: link=$_\n"; # only page - if(m!^(\w+(?:::\w+)*)\s*(\(\w*\)|)$!) { - $page = $1 . $2; + # problem: a lot of people use (), or (1) or the like to indicate + # man page sections. But this collides with L<func()> that is supposed + # to point to an internal funtion... + # I would like the following better, here and below: + #if(m!^(\w+(?:::\w+)*)$!) { + my $page_rx = '[\w.]+(?:::[\w.]+)*'; + if(m!^($page_rx)$!o) { + $page = $1; $type = 'page'; } - # alttext, page and section - elsif(m!^(.+?)\s*[|]\s*(\w+(?:::\w+)*)\s*(\(\w*\)|)\s*/\s*"(.+)"$!) { - ($alttext, $page, $node) = ($1, $2 . $3, $4); + # alttext, page and "section" + elsif(m!^(.+?)\s*[|]\s*($page_rx)\s*/\s*"(.+)"$!o) { + ($alttext, $page, $node) = ($1, $2, $3); $type = 'section'; } - # page and section - elsif(m!^(\w+(?:::\w+)*)\s*(\(\w*\)|)\s*/\s*"(.+)"$!) { - ($page, $node) = ($1 . $2, $3); + # page and "section" + elsif(m!^($page_rx)\s*/\s*"(.+)"$!o) { + ($page, $node) = ($1, $2); $type = 'section'; } # page and item - elsif(m!^(\w+(?:::\w+)*)\s*(\(\w*\)|)\s*/\s*(.+)$!) { - ($page, $node) = ($1 . $2, $3); + elsif(m!^($page_rx)\s*/\s*(.+)$!o) { + ($page, $node) = ($1, $2); $type = 'item'; } - # only section - elsif(m!^(?:/\s*|)"(.+)"$!) { + # only "section" + elsif(m!^/?"(.+)"$!) { $node = $1; $type = 'section'; } # only item - elsif(m!^/(.+)$!) { + elsif(m!^\s*/(.+)$!) { $node = $1; $type = 'item'; } @@ -340,16 +346,16 @@ sub parse { $type = 'hyperlink'; } # alttext, page and item - elsif(m!^(.+?)\s*[|]\s*(\w+(?:::\w+)*)\s*(\(\w*\)|)\s*/\s*(.+)$!) { - ($alttext, $page, $node) = ($1, $2 . $3, $4); + elsif(m!^(.+?)\s*[|]\s*($page_rx)\s*/\s*(.+)$!o) { + ($alttext, $page, $node) = ($1, $2, $3); $type = 'item'; } # alttext and page - elsif(m!^(.+?)\s*[|]\s*(\w+(?:::\w+)*)\s*(\(\w*\)|)$!) { - ($alttext, $page) = ($1, $2 . $3); + elsif(m!^(.+?)\s*[|]\s*($page_rx)$!o) { + ($alttext, $page) = ($1, $2); $type = 'page'; } - # alttext and section + # alttext and "section" elsif(m!^(.+?)\s*[|]\s*(?:/\s*|)"(.+)"$!) { ($alttext, $node) = ($1,$2); $type = 'section'; @@ -368,9 +374,17 @@ sub parse { $node = $_; $type = 'item'; } + # collapse whitespace in nodes + $node =~ s/\s+/ /gs; - if($page =~ /[(]\w*[)]$/) { - $self->warning("section in `$page' deprecated"); + #if($page =~ /[(]\w*[)]$/) { + # $self->warning("section in '$page' deprecated"); + #} + if($node =~ m:[|/]:) { + $self->warning("node '$node' contains non-escaped | or /"); + } + if($alttext =~ m:[|/]:) { + $self->warning("alternative text '$node' contains non-escaped | or /"); } $self->{-page} = $page; $self->{-node} = $node; @@ -559,18 +573,24 @@ sub link { my $self = shift; my $link = $self->page() || ''; if($self->node()) { + my $node = $self->node(); + $text =~ s/\|/E<verbar>/g; + $text =~ s:/:E<sol>:g; if($self->type() eq 'section') { - $link .= ($link ? '/' : '') . '"' . $self->node() . '"'; + $link .= ($link ? '/' : '') . '"' . $node . '"'; } elsif($self->type() eq 'hyperlink') { $link = $self->node(); } else { # item - $link .= '/' . $self->node(); + $link .= '/' . $node; } } if($self->alttext()) { - $link = $self->alttext() . '|' . $link; + my $text = $self->alttext(); + $text =~ s/\|/E<verbar>/g; + $text =~ s:/:E<sol>:g; + $link = "$text|$link"; } $link; } diff --git a/lib/Pod/Parser.pm b/lib/Pod/Parser.pm index c727142506..22b3e49c61 100644 --- a/lib/Pod/Parser.pm +++ b/lib/Pod/Parser.pm @@ -1,7 +1,7 @@ ############################################################################# # Pod/Parser.pm -- package which defines a base class for parsing POD docs. # -# Copyright (C) 1996-1999 by Bradford Appleton. All rights reserved. +# Copyright (C) 1996-2000 by Bradford Appleton. All rights reserved. # This file is part of "PodParser". PodParser is free software; # you can redistribute it and/or modify it under the same terms # as Perl itself. @@ -10,7 +10,7 @@ package Pod::Parser; use vars qw($VERSION); -$VERSION = 1.091; ## Current version of this package +$VERSION = 1.10; ## Current version of this package require 5.004; ## requires this Perl version or later ############################################################################# @@ -55,9 +55,9 @@ Pod::Parser - base class for creating POD filters and translators sub interior_sequence { my ($parser, $seq_command, $seq_argument) = @_; ## Expand an interior sequence; sample actions might be: - return "*$seq_argument*" if ($seq_command = 'B'); - return "`$seq_argument'" if ($seq_command = 'C'); - return "_${seq_argument}_'" if ($seq_command = 'I'); + return "*$seq_argument*" if ($seq_command eq 'B'); + return "`$seq_argument'" if ($seq_command eq 'C'); + return "_${seq_argument}_'" if ($seq_command eq 'I'); ## ... other sequence commands and their resulting text } @@ -142,8 +142,8 @@ For the most part, the B<Pod::Parser> base class should be able to do most of the input parsing for you and leave you free to worry about how to intepret the commands and translate the result. -Note that all we have described here in this quick overview is -the simplest most straightforward use of B<Pod::Parser> to do stream-based +Note that all we have described here in this quick overview is the +simplest most straightforward use of B<Pod::Parser> to do stream-based parsing. It is also possible to use the B<Pod::Parser::parse_text> function to do more sophisticated tree-based parsing. See L<"TREE-BASED PARSING">. @@ -599,7 +599,7 @@ Please note that the B<preprocess_line()> method is invoked I<before> the B<preprocess_paragraph()> method. After all (possibly preprocessed) lines in a paragraph have been assembled together and either it has been determined that the paragraph is part of the POD documentation from one -of the selected sections or the C<-want_nonPODs> option is true, +of the selected sections or the C<-want_nonPODs> option is true, then B<preprocess_paragraph()> is invoked. The base class implementation of this method returns the given text. @@ -718,13 +718,6 @@ is a reference to the parse-tree object. =cut -## This global regex is used to see if the text before a '>' inside -## an interior sequence looks like '-' or '=', but not '--', '==', -## '!=', '$-', '$=' or <<op>>= -use vars qw( $ARROW_RE ); -$ARROW_RE = join('', qw{ (?: [^-+*/=!&|%^x.<>$]= | [^-$]- )$ }); -#$ARROW_RE = qr/(?:[^-+*/=!&|%^x.<>$]+=|[^-$]+-)$/; ## 5.005+ only! - sub parse_text { my $self = shift; local $_ = ''; @@ -738,7 +731,7 @@ sub parse_text { my $text = shift; my $line = shift; my $file = $self->input_file(); - my ($cmd, $prev) = ('', ''); + my $cmd = ""; ## Convert method calls into closures, for our convenience my $xseq_sub = $expand_seq; @@ -757,7 +750,7 @@ sub parse_text { ref $xseq_sub or $xseq_sub = sub { shift()->$expand_seq(@_) }; ref $xtext_sub or $xtext_sub = sub { shift()->$expand_text(@_) }; ref $xptree_sub or $xptree_sub = sub { shift()->$expand_ptree(@_) }; - + ## Keep track of the "current" interior sequence, and maintain a stack ## of "in progress" sequences. ## @@ -769,52 +762,82 @@ sub parse_text { ## my $seq = Pod::ParseTree->new(); my @seq_stack = ($seq); + my ($ldelim, $rdelim) = ('', ''); - ## Iterate over all sequence starts/stops, newlines, & text - ## (NOTE: split with capturing parens keeps the delimiters) + ## Iterate over all sequence starts text (NOTE: split with + ## capturing parens keeps the delimiters) $_ = $text; - for ( split /([A-Z]<|>|\n)/ ) { - ## Keep track of line count - ++$line if ($_ eq "\n"); + my @tokens = split /([A-Z]<(?:<+\s+)?)/; + while ( @tokens ) { + $_ = shift @tokens; ## Look for the beginning of a sequence - if ( /^([A-Z])(<)$/ ) { + if ( /^([A-Z])(<(?:<+\s+)?)$/ ) { ## Push a new sequence onto the stack of those "in-progress" + ($cmd, $ldelim) = ($1, $2); $seq = Pod::InteriorSequence->new( - -name => ($cmd = $1), - -ldelim => $2, -rdelim => '', - -file => $file, -line => $line + -name => $cmd, + -ldelim => $ldelim, -rdelim => '', + -file => $file, -line => $line ); + $ldelim =~ s/\s+$//, ($rdelim = $ldelim) =~ tr/</>/; (@seq_stack > 1) and $seq->nested($seq_stack[-1]); push @seq_stack, $seq; } - ## Look for sequence ending (preclude '->' and '=>' inside C<...>) - elsif ( (@seq_stack > 1) and - /^>$/ and ($cmd ne 'C' or $prev !~ /$ARROW_RE/o) ) - { - ## End of current sequence, record terminating delimiter - $seq->rdelim($_); - ## Pop it off the stack of "in progress" sequences - pop @seq_stack; - ## Append result to its parent in current parse tree - $seq_stack[-1]->append($expand_seq ? &$xseq_sub($self,$seq) : $seq); - ## Remember the current cmd-name - $cmd = (@seq_stack > 1) ? $seq_stack[-1]->name : ''; + ## Look for sequence ending + elsif ( @seq_stack > 1 ) { + ## Make sure we match the right kind of closing delimiter + my ($seq_end, $post_seq) = ("", ""); + if ( ($ldelim eq '<' and /\A(.*?)(>)/s) + or /\A(.*?)(\s+$rdelim)/s ) + { + ## Found end-of-sequence, capture the interior and the + ## closing the delimiter, and put the rest back on the + ## token-list + $post_seq = substr($_, length($1) + length($2)); + ($_, $seq_end) = ($1, $2); + (length $post_seq) and unshift @tokens, $post_seq; + } + if (length) { + ## In the middle of a sequence, append this text to it, and + ## dont forget to "expand" it if that's what the caller wanted + $seq->append($expand_text ? &$xtext_sub($self,$_,$seq) : $_); + $_ .= $seq_end; + } + if (length $seq_end) { + ## End of current sequence, record terminating delimiter + $seq->rdelim($seq_end); + ## Pop it off the stack of "in progress" sequences + pop @seq_stack; + ## Append result to its parent in current parse tree + $seq_stack[-1]->append($expand_seq ? &$xseq_sub($self,$seq) + : $seq); + ## Remember the current cmd-name and left-delimiter + $cmd = (@seq_stack > 1) ? $seq_stack[-1]->name : ''; + $ldelim = (@seq_stack > 1) ? $seq_stack[-1]->ldelim : ''; + $ldelim =~ s/\s+$//, ($rdelim = $ldelim) =~ tr/</>/; + } } elsif (length) { ## In the middle of a sequence, append this text to it, and ## dont forget to "expand" it if that's what the caller wanted $seq->append($expand_text ? &$xtext_sub($self,$_,$seq) : $_); } - ## Remember the "current" sequence and the previously seen token - ($seq, $prev) = ( $seq_stack[-1], $_ ); + ## Keep track of line count + $line += tr/\n//; + ## Remember the "current" sequence + $seq = $seq_stack[-1]; } ## Handle unterminated sequences my $errorsub = (@seq_stack > 1) ? $self->errorsub() : undef; while (@seq_stack > 1) { ($cmd, $file, $line) = ($seq->name, $seq->file_line); + $ldelim = $seq->ldelim; + ($rdelim = $ldelim) =~ tr/</>/; + $rdelim =~ s/^(\S+)(\s*)$/$2$1/; pop @seq_stack; - my $errmsg = "** Unterminated $cmd<...> at $file line $line\n"; + my $errmsg = "*** WARNING: unterminated ${cmd}${ldelim}...${rdelim}". + " at line $line in file $file\n"; (ref $errorsub) and &{$errorsub}($errmsg) or (defined $errorsub) and $self->$errorsub($errmsg) or warn($errmsg); @@ -1034,9 +1057,20 @@ sub parse_from_filehandle { ++$plines; } - ## See of this line is blank and ends the current paragraph. + ## See if this line is blank and ends the current paragraph. ## If it isnt, then keep iterating until it is. - next unless (($textline =~ /^\s*$/) && (length $paragraph)); + next unless (($textline =~ /^(\s*)$/) && (length $paragraph)); + + ## Issue a warning about any non-empty blank lines + if ( length($1) > 1 ) { + my $errorsub = $self->errorsub(); + my $file = $self->input_file(); + my $errmsg = "*** WARNING: line containing nothing but whitespace". + " in paragraph at line $nlines in file $file\n"; + (ref $errorsub) and &{$errorsub}($errmsg) + or (defined $errorsub) and $self->$errorsub($errmsg) + or warn($errmsg); + } ## Now process the paragraph parse_paragraph($self, $paragraph, ($nlines - $plines) + 1); diff --git a/lib/Pod/Select.pm b/lib/Pod/Select.pm index 94ded8697a..230dc8f03b 100644 --- a/lib/Pod/Select.pm +++ b/lib/Pod/Select.pm @@ -1,7 +1,7 @@ ############################################################################# # Pod/Select.pm -- function to select portions of POD docs # -# Copyright (C) 1996-1999 by Bradford Appleton. All rights reserved. +# Copyright (C) 1996-2000 by Bradford Appleton. All rights reserved. # This file is part of "PodParser". PodParser is free software; # you can redistribute it and/or modify it under the same terms # as Perl itself. @@ -10,7 +10,7 @@ package Pod::Select; use vars qw($VERSION); -$VERSION = 1.090; ## Current version of this package +$VERSION = 1.10; ## Current version of this package require 5.004; ## requires this Perl version or later ############################################################################# diff --git a/lib/Pod/Usage.pm b/lib/Pod/Usage.pm index aa3a009dcf..84a936e396 100644 --- a/lib/Pod/Usage.pm +++ b/lib/Pod/Usage.pm @@ -1,7 +1,7 @@ ############################################################################# # Pod/Usage.pm -- print usage messages for the running script. # -# Copyright (C) 1996-1999 by Bradford Appleton. All rights reserved. +# Copyright (C) 1996-2000 by Bradford Appleton. All rights reserved. # This file is part of "PodParser". PodParser is free software; # you can redistribute it and/or modify it under the same terms # as Perl itself. @@ -10,7 +10,7 @@ package Pod::Usage; use vars qw($VERSION); -$VERSION = 1.090; ## Current version of this package +$VERSION = 1.10; ## Current version of this package require 5.004; ## requires this Perl version or later =head1 NAME diff --git a/lib/Sys/Hostname.pm b/lib/Sys/Hostname.pm deleted file mode 100644 index 63415a6bfe..0000000000 --- a/lib/Sys/Hostname.pm +++ /dev/null @@ -1,128 +0,0 @@ -package Sys::Hostname; - -use Carp; -require Exporter; -@ISA = qw(Exporter); -@EXPORT = qw(hostname); - -=head1 NAME - -Sys::Hostname - Try every conceivable way to get hostname - -=head1 SYNOPSIS - - use Sys::Hostname; - $host = hostname; - -=head1 DESCRIPTION - -Attempts several methods of getting the system hostname and -then caches the result. It tries C<syscall(SYS_gethostname)>, -C<`hostname`>, C<`uname -n`>, and the file F</com/host>. -If all that fails it C<croak>s. - -All nulls, returns, and newlines are removed from the result. - -=head1 AUTHOR - -David Sundstrom E<lt>F<sunds@asictest.sc.ti.com>E<gt> - -Texas Instruments - -=cut - -sub hostname { - - # method 1 - we already know it - return $host if defined $host; - - if ($^O eq 'VMS') { - - # method 2 - no sockets ==> return DECnet node name - eval { local $SIG{__DIE__}; $host = (gethostbyname('me'))[0] }; - if ($@) { return $host = $ENV{'SYS$NODE'}; } - - # method 3 - has someone else done the job already? It's common for the - # TCP/IP stack to advertise the hostname via a logical name. (Are - # there any other logicals which TCP/IP stacks use for the host name?) - $host = $ENV{'ARPANET_HOST_NAME'} || $ENV{'INTERNET_HOST_NAME'} || - $ENV{'MULTINET_HOST_NAME'} || $ENV{'UCX$INET_HOST'} || - $ENV{'TCPWARE_DOMAINNAME'} || $ENV{'NEWS_ADDRESS'}; - return $host if $host; - - # method 4 - does hostname happen to work? - my($rslt) = `hostname`; - if ($rslt !~ /IVVERB/) { ($host) = $rslt =~ /^(\S+)/; } - return $host if $host; - - # rats! - $host = ''; - Carp::croak "Cannot get host name of local machine"; - - } - elsif ($^O eq 'MSWin32') { - ($host) = gethostbyname('localhost'); - chomp($host = `hostname 2> NUL`) unless defined $host; - return $host; - } - elsif ($^O eq 'epoc') { - $host = 'localhost'; - return $host; - } - else { # Unix - - # method 2 - syscall is preferred since it avoids tainting problems - eval { - local $SIG{__DIE__}; - require "syscall.ph"; - $host = "\0" x 65; ## preload scalar - syscall(&SYS_gethostname, $host, 65) == 0; - } - - # method 2a - syscall using systeminfo instead of gethostname - # -- needed on systems like Solaris - || eval { - local $SIG{__DIE__}; - require "sys/syscall.ph"; - require "sys/systeminfo.ph"; - $host = "\0" x 65; ## preload scalar - syscall(&SYS_systeminfo, &SI_HOSTNAME, $host, 65) != -1; - } - - # method 3 - trusty old hostname command - || eval { - local $SIG{__DIE__}; - local $SIG{CHLD}; - $host = `(hostname) 2>/dev/null`; # bsdish - } - - # method 4 - use POSIX::uname(), which strictly can't be expected to be - # correct - || eval { - local $SIG{__DIE__}; - require POSIX; - $host = (POSIX::uname())[1]; - } - - # method 5 - sysV uname command (may truncate) - || eval { - local $SIG{__DIE__}; - $host = `uname -n 2>/dev/null`; ## sysVish - } - - # method 6 - Apollo pre-SR10 - || eval { - local $SIG{__DIE__}; - ($host,$a,$b,$c,$d)=split(/[:\. ]/,`/com/host`,6); - } - - # bummer - || Carp::croak "Cannot get host name of local machine"; - - # remove garbage - $host =~ tr/\0\r\n//d; - $host; - } -} - -1; diff --git a/lib/attributes.pm b/lib/attributes.pm index bbbb8b78ee..f111645ae1 100644 --- a/lib/attributes.pm +++ b/lib/attributes.pm @@ -169,6 +169,12 @@ This has a meaning when taken together with the B<locked> attribute, as described there. It also means that a subroutine so marked will not trigger the "Ambiguous call resolved as CORE::%s" warning. +=item lvalue + +Indicates that the referenced subroutine is a valid lvalue and can +be assigned to. The subroutine must return a modifiable value such +as a scalar variable, as described in L<perlsub>. + =back There are no built-in attributes for anything other than subroutines. diff --git a/lib/byte.pm b/lib/bytes.pm index 0424e1778d..e8ab16f1bd 100644 --- a/lib/byte.pm +++ b/lib/bytes.pm @@ -1,4 +1,4 @@ -package byte; +package bytes; sub import { $^H |= 0x00000008; @@ -9,7 +9,7 @@ sub unimport { } sub AUTOLOAD { - require "byte_heavy.pl"; + require "bytes_heavy.pl"; goto &$AUTOLOAD; } @@ -20,21 +20,21 @@ __END__ =head1 NAME -byte - Perl pragma to force byte semantics rather than character semantics +bytes - Perl pragma to force byte semantics rather than character semantics =head1 SYNOPSIS - use byte; - no byte; + use bytes; + no bytes; =head1 DESCRIPTION WARNING: The implementation of Unicode support in Perl is incomplete. Expect sudden and unannounced changes! -The C<use byte> pragma disables character semantics for the rest of the -lexical scope in which it appears. C<no byte> can be used to reverse -the effect of C<use byte> within the current lexical scope. +The C<use bytes> pragma disables character semantics for the rest of the +lexical scope in which it appears. C<no bytes> can be used to reverse +the effect of C<use bytes> within the current lexical scope. Perl normally assumes character semantics in the presence of character data (i.e. data that has come from a source that has diff --git a/lib/byte_heavy.pl b/lib/bytes_heavy.pl index ec0558561d..47bdbf91b0 100644 --- a/lib/byte_heavy.pl +++ b/lib/bytes_heavy.pl @@ -1,7 +1,7 @@ -package byte; +package bytes; sub length ($) { - BEGIN { byte::import() } + BEGIN { bytes::import() } return CORE::length($_[0]); } diff --git a/lib/charnames.pm b/lib/charnames.pm index 817b4c559e..ff9d5ea891 100644 --- a/lib/charnames.pm +++ b/lib/charnames.pm @@ -30,8 +30,8 @@ sub charnames { die "Unknown charname '$name'" unless @off; my $ord = hex substr $txt, $off[0] - 4, 4; - if ($^H & 0x8) { # "use byte" in effect? - use byte; + if ($^H & 0x8) { # "use bytes" in effect? + use bytes; return chr $ord if $ord <= 255; my $hex = sprintf '%X=0%o', $ord, $ord; my $fname = substr $txt, $off[0] + 2, $off[1] - $off[0] - 2; diff --git a/lib/unicode/ArabLink.pl b/lib/unicode/ArabLink.pl index 399fa6cf3d..fd5ed8a6b1 100644 --- a/lib/unicode/ArabLink.pl +++ b/lib/unicode/ArabLink.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0622 0625 R 0626 D diff --git a/lib/unicode/ArabLnkGrp.pl b/lib/unicode/ArabLnkGrp.pl index e06c3744de..61f30d4348 100644 --- a/lib/unicode/ArabLnkGrp.pl +++ b/lib/unicode/ArabLnkGrp.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0622 0623 ALEF 0624 WAW diff --git a/lib/unicode/Bidirectional.pl b/lib/unicode/Bidirectional.pl index f2ff4e67bb..73898b8399 100644 --- a/lib/unicode/Bidirectional.pl +++ b/lib/unicode/Bidirectional.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0000 0008 BN 0009 S diff --git a/lib/unicode/Block.pl b/lib/unicode/Block.pl index 7d6990bd7f..ee680b724d 100644 --- a/lib/unicode/Block.pl +++ b/lib/unicode/Block.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0000 007F Basic Latin 0080 00FF Latin-1 Supplement diff --git a/lib/unicode/Category.pl b/lib/unicode/Category.pl index 4e3e87397f..bffd1169be 100644 --- a/lib/unicode/Category.pl +++ b/lib/unicode/Category.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0000 001f Cc 0020 Zs diff --git a/lib/unicode/CombiningClass.pl b/lib/unicode/CombiningClass.pl index 5b506ade02..a40949830c 100644 --- a/lib/unicode/CombiningClass.pl +++ b/lib/unicode/CombiningClass.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0300 0314 230 0315 232 diff --git a/lib/unicode/Decomposition.pl b/lib/unicode/Decomposition.pl index ae4cbaf6ab..ecc30b205e 100644 --- a/lib/unicode/Decomposition.pl +++ b/lib/unicode/Decomposition.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 00a0 <noBreak> 0020 00a8 <compat> 0020 0308 diff --git a/lib/unicode/Eq/Latin1.pl b/lib/unicode/Eq/Latin1.pl deleted file mode 100644 index e033d2cb8b..0000000000 --- a/lib/unicode/Eq/Latin1.pl +++ /dev/null @@ -1,21 +0,0 @@ -# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! -# This file is built by mktables.PL from e.g. Unicode.300. -# Any changes made here will be lost! -return <<'END'; -0041 00C0 00C1 00C2 00C3 00C4 00C5 -0043 00C7 -0045 00C8 00C9 00CA 00CB -0049 00CC 00CD 00CE 00CF -004E 00D1 -004F 00D2 00D3 00D4 00D5 00D6 00D8 -0055 00D9 00DA 00DB 00DC -0059 00DD -0061 00AA 00E0 00E1 00E2 00E3 00E4 00E5 -0063 00E7 -0065 00E8 00E9 00EA 00EB -0069 00EC 00ED 00EE 00EF -006E 00F1 -006F 00BA 00F2 00F3 00F4 00F5 00F6 00F8 -0075 00F9 00FA 00FB 00FC -0079 00FD 00FF -END diff --git a/lib/unicode/Eq/Unicode.pl b/lib/unicode/Eq/Unicode.pl deleted file mode 100644 index 35edd61d2e..0000000000 --- a/lib/unicode/Eq/Unicode.pl +++ /dev/null @@ -1,666 +0,0 @@ -# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! -# This file is built by mktables.PL from e.g. Unicode.300. -# Any changes made here will be lost! -return <<'END'; -0041 00C0 00C1 00C2 00C3 00C4 00C5 0100 0102 0104 01CD 0200 0202 0226 1E00 1EA0 1EA2 FF21 -0042 0181 0182 1E02 1E04 1E06 212C FF22 -0043 00C7 0106 0108 010A 010C 0187 2102 212D FF23 -0044 010E 0110 018A 018B 01C4 01C5 01F1 01F2 1E0A 1E0C 1E0E 1E10 1E12 FF24 -0045 00C8 00C9 00CA 00CB 0112 0114 0116 0118 011A 0204 0206 0228 1E18 1E1A 1EB8 1EBA 1EBC 2130 FF25 -0046 0191 1E1E 2131 FF26 -0047 011C 011E 0120 0122 0193 01E4 01E6 01F4 1E20 FF27 -0048 0124 0126 021E 1E22 1E24 1E26 1E28 1E2A 210B 210C 210D FF28 -0049 00CC 00CD 00CE 00CF 0128 012A 012C 012E 0130 0132 0197 01CF 0208 020A 1E2C 1EC8 1ECA 2110 2111 FF29 -004A 0134 FF2A -004B 0136 0198 01E8 1E30 1E32 1E34 212A FF2B -004C 0139 013B 013D 013F 0141 01C7 01C8 1E36 1E3A 1E3C 2112 FF2C -004D 1E3E 1E40 1E42 2133 FF2D -004E 00D1 0143 0145 0147 019D 01CA 01CB 01F8 1E44 1E46 1E48 1E4A 2115 FF2E -004F 00D2 00D3 00D4 00D5 00D6 00D8 014C 014E 0150 019F 01A0 01D1 01EA 020C 020E 022E 1ECC 1ECE FF2F -0050 01A4 1E54 1E56 2119 FF30 -0051 211A FF31 -0052 0154 0156 0158 0210 0212 1E58 1E5A 1E5E 211B 211C 211D FF32 -0053 015A 015C 015E 0160 0218 1E60 1E62 FF33 -0054 0162 0164 0166 01AC 01AE 021A 1E6A 1E6C 1E6E 1E70 FF34 -0055 00D9 00DA 00DB 00DC 0168 016A 016C 016E 0170 0172 01AF 01D3 0214 0216 1E72 1E74 1E76 1EE4 1EE6 FF35 -0056 01B2 1E7C 1E7E FF36 -0057 0174 1E80 1E82 1E84 1E86 1E88 FF37 -0058 1E8A 1E8C FF38 -0059 00DD 0176 0178 01B3 0232 1E8E 1EF2 1EF4 1EF6 1EF8 FF39 -005A 0179 017B 017D 01B5 0224 1E90 1E92 1E94 2124 2128 FF3A -0061 00AA 00E0 00E1 00E2 00E3 00E4 00E5 0101 0103 0105 01CE 0201 0203 0227 1E01 1E9A 1EA1 1EA3 FF41 -0062 0180 0183 0253 1E03 1E05 1E07 FF42 -0063 00E7 0107 0109 010B 010D 0188 0255 FF43 -0064 010F 0111 018C 01C6 01F3 0256 0257 1E0B 1E0D 1E0F 1E11 1E13 FF44 -0065 00E8 00E9 00EA 00EB 0113 0115 0117 0119 011B 0205 0207 0229 1E19 1E1B 1EB9 1EBB 1EBD 212F FF45 -0066 0192 1E1F FB00 FB01 FB02 FB03 FB04 FF46 -0067 011D 011F 0121 0123 01E5 01E7 01F5 0260 1E21 210A FF47 -0068 0125 0127 021F 0266 02B0 1E23 1E25 1E27 1E29 1E2B 1E96 210E FF48 -0069 00EC 00ED 00EE 00EF 0129 012B 012D 012F 0133 01D0 0209 020B 0268 1E2D 1EC9 1ECB 2139 FF49 -006A 0135 01F0 029D 02B2 FF4A -006B 0137 0199 01E9 1E31 1E33 1E35 FF4B -006C 013A 013C 013E 0140 0142 019A 01C9 026B 026C 026D 02E1 1E37 1E3B 1E3D 2113 FF4C -006D 0271 1E3F 1E41 1E43 FF4D -006E 00F1 0144 0146 0148 019E 01CC 01F9 0272 0273 1E45 1E47 1E49 1E4B 207F FF4E -006F 00BA 00F2 00F3 00F4 00F5 00F6 00F8 014D 014F 0151 01A1 01D2 01EB 020D 020F 022F 1ECD 1ECF 2134 FF4F -0070 01A5 1E55 1E57 FF50 -0071 02A0 FF51 -0072 0155 0157 0159 0211 0213 027C 027D 027E 02B3 1E59 1E5B 1E5F FF52 -0073 015B 015D 015F 0161 017F 0219 0282 02E2 1E61 1E63 FB06 FF53 -0074 0163 0165 0167 01AB 01AD 021B 0288 1E6B 1E6D 1E6F 1E71 1E97 FF54 -0075 00F9 00FA 00FB 00FC 0169 016B 016D 016F 0171 0173 01B0 01D4 0215 0217 1E73 1E75 1E77 1EE5 1EE7 FF55 -0076 028B 1E7D 1E7F FF56 -0077 0175 02B7 1E81 1E83 1E85 1E87 1E89 1E98 FF57 -0078 02E3 1E8B 1E8D FF58 -0079 00FD 00FF 0177 01B4 0233 02B8 1E8F 1E99 1EF3 1EF5 1EF7 1EF9 FF59 -007A 017A 017C 017E 01B6 0225 0290 0291 1E91 1E93 1E95 FF5A -00C2 1EA4 1EA6 1EA8 1EAA -00C4 01DE -00C5 01FA 212B -00C6 01E2 01FC -00C7 1E08 -00CA 1EBE 1EC0 1EC2 1EC4 -00CF 1E2E -00D4 1ED0 1ED2 1ED4 1ED6 -00D5 022C 1E4C 1E4E -00D6 022A -00D8 01FE -00DC 01D5 01D7 01D9 01DB -00E2 1EA5 1EA7 1EA9 1EAB -00E4 01DF -00E5 01FB -00E6 01E3 01FD -00E7 1E09 -00EA 1EBF 1EC1 1EC3 1EC5 -00EF 1E2F -00F4 1ED1 1ED3 1ED5 1ED7 -00F5 022D 1E4D 1E4F -00F6 022B -00F8 01FF -00FC 01D6 01D8 01DA 01DC -0102 1EAE 1EB0 1EB2 1EB4 -0103 1EAF 1EB1 1EB3 1EB5 -0112 1E14 1E16 -0113 1E15 1E17 -0127 210F -014C 1E50 1E52 -014D 1E51 1E53 -015A 1E64 -015B 1E65 -0160 1E66 -0161 1E67 -0168 1E78 -0169 1E79 -016A 1E7A -016B 1E7B -017F 1E9B FB05 -0190 2107 -01A0 1EDA 1EDC 1EDE 1EE0 1EE2 -01A1 1EDB 1EDD 1EDF 1EE1 1EE3 -01AF 1EE8 1EEA 1EEC 1EEE 1EF0 -01B0 1EE9 1EEB 1EED 1EEF 1EF1 -01B7 01EE -01EA 01EC -01EB 01ED -0226 01E0 -0227 01E1 -0228 1E1C -0229 1E1D -022E 0230 -022F 0231 -0259 025A -025C 025D -0262 029B -0263 02E0 -0266 02B1 -026F 0270 -0279 027A 027B 02B4 -027B 02B5 -0281 02B6 -0283 0286 -0292 01BA 01EF 0293 -0294 02A1 -0295 02E4 -0296 01BE -02A3 02A5 -02BC 0149 -0386 1FBB -0388 1FC9 -0389 1FCB -038A 1FDB -038C 1FF9 -038E 1FEB -038F 1FFB -0390 1FD3 -0391 0386 1F08 1F09 1FB8 1FB9 1FBA 1FBC -0395 0388 1F18 1F19 1FC8 -0397 0389 1F28 1F29 1FCA 1FCC -0399 038A 03AA 1F38 1F39 1FD8 1FD9 1FDA -039F 038C 1F48 1F49 1FF8 -03A1 1FEC -03A5 038E 03AB 03D2 1F59 1FE8 1FE9 1FEA -03A9 038F 1F68 1F69 1FFA 1FFC 2126 -03AC 1F71 1FB4 -03AD 1F73 -03AE 1F75 1FC4 -03AF 1F77 -03B0 1FE3 -03B1 03AC 1F00 1F01 1F70 1FB0 1FB1 1FB3 1FB6 -03B2 03D0 -03B5 03AD 1F10 1F11 1F72 -03B7 03AE 1F20 1F21 1F74 1FC3 1FC6 -03B8 03D1 -03B9 03AF 03CA 1F30 1F31 1F76 1FBE 1FD0 1FD1 1FD6 -03BA 03F0 -03BC 00B5 -03BF 03CC 1F40 1F41 1F78 -03C0 03D6 -03C1 03F1 1FE4 1FE5 -03C2 03F2 -03C5 03CB 03CD 1F50 1F51 1F7A 1FE0 1FE1 1FE6 -03C6 03D5 -03C9 03CE 1F60 1F61 1F7C 1FF3 1FF6 -03CA 0390 1FD2 1FD7 -03CB 03B0 1FE2 1FE7 -03CC 1F79 -03CD 1F7B -03CE 1F7D 1FF4 -03D2 03D3 03D4 -0406 0407 -0410 04D0 04D2 -0413 0403 0490 0492 0494 -0415 0400 0401 04D6 -0416 0496 04C1 04DC -0417 0498 04DE -0418 040D 0419 04E2 04E4 -041A 040C 049A 049C 049E 04C3 -041D 04A2 04C7 -041E 04E6 -041F 04A6 -0420 048E -0421 04AA -0422 04AC -0423 040E 04EE 04F0 04F2 -0425 04B2 -0427 04B6 04B8 04F4 -042B 04F8 -042D 04EC -0430 04D1 04D3 -0433 0453 0491 0493 0495 -0435 0450 0451 04D7 -0436 0497 04C2 04DD -0437 0499 04DF -0438 0439 045D 04E3 04E5 -043A 045C 049B 049D 049F 04C4 -043D 04A3 04C8 -043E 04E7 -043F 04A7 -0440 048F -0441 04AB -0442 04AD -0443 045E 04EF 04F1 04F3 -0445 04B3 -0447 04B7 04B9 04F5 -044B 04F9 -044D 04ED -0456 0457 -0460 047C -0461 047D -0474 0476 -0475 0477 -04AE 04B0 -04AF 04B1 -04BC 04BE -04BD 04BF -04D8 04DA -04D9 04DB -04E8 04EA -04E9 04EB -0565 0587 -0574 FB13 FB14 FB15 FB17 -057E FB16 -05D0 2135 FB21 FB2E FB2F FB30 FB4F -05D1 2136 FB31 FB4C -05D2 2137 FB32 -05D3 2138 FB22 FB33 -05D4 FB23 FB34 -05D5 FB35 FB4B -05D6 FB36 -05D8 FB38 -05D9 FB1D FB39 -05DA FB3A -05DB FB24 FB3B FB4D -05DC FB25 FB3C -05DD FB26 -05DE FB3E -05E0 FB40 -05E1 FB41 -05E2 FB20 -05E3 FB43 -05E4 FB44 FB4E -05E6 FB46 -05E7 FB47 -05E8 FB27 FB48 -05E9 FB2A FB2B FB49 -05EA FB28 FB4A -05F2 FB1F -0621 FE80 -0622 FE81 FE82 -0623 FE83 FE84 -0624 FE85 FE86 -0625 FE87 FE88 -0626 FBEA FBEB FBEC FBED FBEE FBEF FBF0 FBF1 FBF2 FBF3 FBF4 FBF5 FBF6 FBF7 FBF8 FBF9 FBFA FBFB FC00 FC01 FC02 FC03 FC04 FC64 FC65 FC66 FC67 FC68 FC69 FC97 FC98 FC99 FC9A FC9B FCDF FCE0 FE89 FE8A FE8B FE8C -0627 0622 0623 0625 0672 0673 0675 FD3C FD3D FDF2 FDF3 FE8D FE8E -0628 FC05 FC06 FC07 FC08 FC09 FC0A FC6A FC6B FC6C FC6D FC6E FC6F FC9C FC9D FC9E FC9F FCA0 FCE1 FCE2 FD9E FDC2 FE8F FE90 FE91 FE92 -0629 FE93 FE94 -062A 067C 067D FC0B FC0C FC0D FC0E FC0F FC10 FC70 FC71 FC72 FC73 FC74 FC75 FCA1 FCA2 FCA3 FCA4 FCA5 FCE3 FCE4 FD50 FD51 FD52 FD53 FD54 FD55 FD56 FD57 FD9F FDA0 FDA1 FDA2 FDA3 FDA4 FE95 FE96 FE97 FE98 -062B FC11 FC12 FC13 FC14 FC76 FC77 FC78 FC79 FC7A FC7B FCA6 FCE5 FCE6 FE99 FE9A FE9B FE9C -062C FC15 FC16 FCA7 FCA8 FD01 FD02 FD1D FD1E FD58 FD59 FDA5 FDA6 FDA7 FDBE FDFB FE9D FE9E FE9F FEA0 -062D 0681 0682 0685 FC17 FC18 FCA9 FCAA FCFF FD00 FD1B FD1C FD5A FD5B FDBF FEA1 FEA2 FEA3 FEA4 -062E FC19 FC1A FC1B FCAB FCAC FD03 FD04 FD1F FD20 FEA5 FEA6 FEA7 FEA8 -062F 0689 068A 068B 068F 0690 FEA9 FEAA -0630 FC5B FEAB FEAC -0631 0692 0693 0694 0695 0696 0697 0699 FC5C FDF6 FEAD FEAE -0632 FEAF FEB0 -0633 069A 069B 069C FC1C FC1D FC1E FC1F FCAD FCAE FCAF FCB0 FCE7 FCE8 FCFB FCFC FD0E FD17 FD18 FD2A FD31 FD34 FD35 FD36 FD5C FD5D FD5E FD5F FD60 FD61 FD62 FD63 FDA8 FDC6 FEB1 FEB2 FEB3 FEB4 -0634 06FA FCE9 FCEA FCFD FCFE FD09 FD0A FD0B FD0C FD0D FD19 FD1A FD25 FD26 FD27 FD28 FD29 FD2D FD2E FD2F FD30 FD32 FD37 FD38 FD39 FD67 FD68 FD69 FD6A FD6B FD6C FD6D FDAA FEB5 FEB6 FEB7 FEB8 -0635 069D 069E FC20 FC21 FCB1 FCB2 FCB3 FD05 FD06 FD0F FD21 FD22 FD2B FD64 FD65 FD66 FDA9 FDC5 FDF0 FDF5 FDF9 FDFA FEB9 FEBA FEBB FEBC -0636 06FB FC22 FC23 FC24 FC25 FCB4 FCB5 FCB6 FCB7 FD07 FD08 FD10 FD23 FD24 FD2C FD6E FD6F FD70 FDAB FEBD FEBE FEBF FEC0 -0637 069F FC26 FC27 FCB8 FCF5 FCF6 FD11 FD12 FD33 FD3A FD71 FD72 FD73 FD74 FEC1 FEC2 FEC3 FEC4 -0638 FC28 FCB9 FD3B FEC5 FEC6 FEC7 FEC8 -0639 06A0 FC29 FC2A FCBA FCBB FCF7 FCF8 FD13 FD14 FD75 FD76 FD77 FD78 FDB6 FDC4 FDF7 FEC9 FECA FECB FECC -063A 06FC FC2B FC2C FCBC FCBD FCF9 FCFA FD15 FD16 FD79 FD7A FD7B FECD FECE FECF FED0 -0640 FCF2 FCF3 FCF4 FE71 FE77 FE79 FE7B FE7D FE7F -0641 06A2 06A3 06A5 FC2D FC2E FC2F FC30 FC31 FC32 FC7C FC7D FCBE FCBF FCC0 FCC1 FD7C FD7D FDC1 FED1 FED2 FED3 FED4 -0642 06A7 06A8 FC33 FC34 FC35 FC36 FC7E FC7F FCC2 FCC3 FD7E FD7F FDB2 FDB4 FDF1 FED5 FED6 FED7 FED8 -0643 06AB 06AC 06AE FC37 FC38 FC39 FC3A FC3B FC3C FC3D FC3E FC80 FC81 FC82 FC83 FC84 FCC4 FCC5 FCC6 FCC7 FCC8 FCEB FCEC FDB7 FDBB FDC3 FED9 FEDA FEDB FEDC -0644 06B5 06B6 06B7 06B8 FC3F FC40 FC41 FC42 FC43 FC44 FC85 FC86 FC87 FCC9 FCCA FCCB FCCC FCCD FCED FD80 FD81 FD82 FD83 FD84 FD85 FD86 FD87 FD88 FDAC FDAD FDB5 FDBA FDBC FEDD FEDE FEDF FEE0 FEF5 FEF6 FEF7 FEF8 FEF9 FEFA FEFB FEFC -0645 FC45 FC46 FC47 FC48 FC49 FC4A FC88 FC89 FCCE FCCF FCD0 FCD1 FD89 FD8A FD8B FD8C FD8D FD8E FD8F FD92 FDB1 FDB9 FDC0 FDF4 FEE1 FEE2 FEE3 FEE4 -0646 06B9 06BC 06BD FC4B FC4C FC4D FC4E FC4F FC50 FC8A FC8B FC8C FC8D FC8E FC8F FCD2 FCD3 FCD4 FCD5 FCD6 FCEE FCEF FD95 FD96 FD97 FD98 FD99 FD9A FD9B FDB3 FDB8 FDBD FDC7 FEE5 FEE6 FEE7 FEE8 -0647 FC51 FC52 FC53 FC54 FCD7 FCD8 FCD9 FD93 FD94 FEE9 FEEA FEEB FEEC -0648 0624 0676 06C4 06CA 06CF FDF8 FEED FEEE -0649 FBE8 FBE9 FC5D FC90 FEEF FEF0 -064A 0626 0678 06CD 06CE 06D1 FC55 FC56 FC57 FC58 FC59 FC5A FC91 FC92 FC93 FC94 FC95 FC96 FCDA FCDB FCDC FCDD FCDE FCF0 FCF1 FD9C FD9D FDAE FDAF FDB0 FEF1 FEF2 FEF3 FEF4 -0671 FB50 FB51 -0677 FBDD -0679 FB66 FB67 FB68 FB69 -067A FB5E FB5F FB60 FB61 -067B FB52 FB53 FB54 FB55 -067E FB56 FB57 FB58 FB59 -067F FB62 FB63 FB64 FB65 -0680 FB5A FB5B FB5C FB5D -0683 FB76 FB77 FB78 FB79 -0684 FB72 FB73 FB74 FB75 -0686 06BF FB7A FB7B FB7C FB7D -0687 FB7E FB7F FB80 FB81 -0688 FB88 FB89 -068C FB84 FB85 -068D FB82 FB83 -068E FB86 FB87 -0691 FB8C FB8D -0698 FB8A FB8B -06A4 FB6A FB6B FB6C FB6D -06A6 FB6E FB6F FB70 FB71 -06A9 FB8E FB8F FB90 FB91 -06AD FBD3 FBD4 FBD5 FBD6 -06AF 06B0 06B2 06B4 FB92 FB93 FB94 FB95 -06B1 FB9A FB9B FB9C FB9D -06B3 FB96 FB97 FB98 FB99 -06BA FB9E FB9F -06BB FBA0 FBA1 FBA2 FBA3 -06BE FBAA FBAB FBAC FBAD -06C0 FBA4 FBA5 -06C1 06C2 FBA6 FBA7 FBA8 FBA9 -06C5 FBE0 FBE1 -06C6 FBD9 FBDA -06C7 0677 FBD7 FBD8 -06C8 FBDB FBDC -06C9 FBE2 FBE3 -06CB FBDE FBDF -06CC FBFC FBFD FBFE FBFF -06D0 FBE4 FBE5 FBE6 FBE7 -06D2 06D3 FBAE FBAF -06D3 FBB0 FBB1 -06D5 06C0 -0915 0958 -0916 0959 -0917 095A -091C 095B -0921 095C -0922 095D -0928 0929 -092B 095E -092F 095F -0930 0931 -0933 0934 -09A1 09DC -09A2 09DD -09AF 09DF -09B0 09F0 09F1 -0A16 0A59 -0A17 0A5A -0A1C 0A5B -0A2B 0A5E -0A32 0A33 -0A38 0A36 -0B21 0B5C -0B22 0B5D -0B92 0B94 -0EAB 0EDC 0EDD -0F40 0F69 -0F42 0F43 -0F4C 0F4D -0F51 0F52 -0F56 0F57 -0F5B 0F5C -1025 1026 -1100 3131 -1101 3132 -1102 3134 -1103 3137 -1104 3138 -1105 3139 -1106 3141 -1107 3142 -1108 3143 -1109 3145 -110A 3146 -110B 3147 -110C 3148 -110D 3149 -110E 314A -110F 314B -1110 314C -1111 314D -1112 314E -1114 3165 -1115 3166 -111A 3140 -111C 316E -111D 3171 -111E 3172 -1120 3173 -1121 3144 -1122 3174 -1123 3175 -1127 3176 -1129 3177 -112B 3178 -112C 3179 -112D 317A -112E 317B -112F 317C -1132 317D -1136 317E -1140 317F -1147 3180 -114C 3181 -1157 3184 -1158 3185 -1159 3186 -1160 3164 -1161 314F -1162 3150 -1163 3151 -1164 3152 -1165 3153 -1166 3154 -1167 3155 -1168 3156 -1169 3157 -116A 3158 -116B 3159 -116C 315A -116D 315B -116E 315C -116F 315D -1170 315E -1171 315F -1172 3160 -1173 3161 -1174 3162 -1175 3163 -1184 3187 -1185 3188 -1188 3189 -1191 318A -1192 318B -1194 318C -119E 318D -11A1 318E -11AA 3133 -11AC 3135 -11AD 3136 -11B0 313A -11B1 313B -11B2 313C -11B3 313D -11B4 313E -11B5 313F -11C7 3167 -11C8 3168 -11CC 3169 -11CE 316A -11D3 316B -11D7 316C -11D9 316D -11DD 316F -11DF 3170 -11F1 3182 -11F2 3183 -1E36 1E38 -1E37 1E39 -1E5A 1E5C -1E5B 1E5D -1E62 1E68 -1E63 1E69 -1EA0 1EAC 1EB6 -1EA1 1EAD 1EB7 -1EB8 1EC6 -1EB9 1EC7 -1ECC 1ED8 -1ECD 1ED9 -1F00 1F02 1F04 1F06 1F80 -1F01 1F03 1F05 1F07 1F81 -1F02 1F82 -1F03 1F83 -1F04 1F84 -1F05 1F85 -1F06 1F86 -1F07 1F87 -1F08 1F0A 1F0C 1F0E 1F88 -1F09 1F0B 1F0D 1F0F 1F89 -1F0A 1F8A -1F0B 1F8B -1F0C 1F8C -1F0D 1F8D -1F0E 1F8E -1F0F 1F8F -1F10 1F12 1F14 -1F11 1F13 1F15 -1F18 1F1A 1F1C -1F19 1F1B 1F1D -1F20 1F22 1F24 1F26 1F90 -1F21 1F23 1F25 1F27 1F91 -1F22 1F92 -1F23 1F93 -1F24 1F94 -1F25 1F95 -1F26 1F96 -1F27 1F97 -1F28 1F2A 1F2C 1F2E 1F98 -1F29 1F2B 1F2D 1F2F 1F99 -1F2A 1F9A -1F2B 1F9B -1F2C 1F9C -1F2D 1F9D -1F2E 1F9E -1F2F 1F9F -1F30 1F32 1F34 1F36 -1F31 1F33 1F35 1F37 -1F38 1F3A 1F3C 1F3E -1F39 1F3B 1F3D 1F3F -1F40 1F42 1F44 -1F41 1F43 1F45 -1F48 1F4A 1F4C -1F49 1F4B 1F4D -1F50 1F52 1F54 1F56 -1F51 1F53 1F55 1F57 -1F59 1F5B 1F5D 1F5F -1F60 1F62 1F64 1F66 1FA0 -1F61 1F63 1F65 1F67 1FA1 -1F62 1FA2 -1F63 1FA3 -1F64 1FA4 -1F65 1FA5 -1F66 1FA6 -1F67 1FA7 -1F68 1F6A 1F6C 1F6E 1FA8 -1F69 1F6B 1F6D 1F6F 1FA9 -1F6A 1FAA -1F6B 1FAB -1F6C 1FAC -1F6D 1FAD -1F6E 1FAE -1F6F 1FAF -1F70 1FB2 -1F74 1FC2 -1F7C 1FF2 -1FB6 1FB7 -1FC6 1FC7 -1FF6 1FF7 -3046 3094 -304B 304C -304D 304E -304F 3050 -3051 3052 -3053 3054 -3055 3056 -3057 3058 -3059 305A -305B 305C -305D 305E -305F 3060 -3061 3062 -3064 3065 -3066 3067 -3068 3069 -306F 3070 3071 -3072 3073 3074 -3075 3076 3077 -3078 3079 307A -307B 307C 307D -309D 309E -30A1 FF67 -30A2 FF71 -30A3 FF68 -30A4 FF72 -30A5 FF69 -30A6 30F4 FF73 -30A7 FF6A -30A8 FF74 -30A9 FF6B -30AA FF75 -30AB 30AC FF76 -30AD 30AE FF77 -30AF 30B0 FF78 -30B1 30B2 FF79 -30B3 30B4 FF7A -30B5 30B6 FF7B -30B7 30B8 FF7C -30B9 30BA FF7D -30BB 30BC FF7E -30BD 30BE FF7F -30BF 30C0 FF80 -30C1 30C2 FF81 -30C3 FF6F -30C4 30C5 FF82 -30C6 30C7 FF83 -30C8 30C9 FF84 -30CA FF85 -30CB FF86 -30CC FF87 -30CD FF88 -30CE FF89 -30CF 30D0 30D1 FF8A -30D2 30D3 30D4 FF8B -30D5 30D6 30D7 FF8C -30D8 30D9 30DA FF8D -30DB 30DC 30DD FF8E -30DE FF8F -30DF FF90 -30E0 FF91 -30E1 FF92 -30E2 FF93 -30E3 FF6C -30E4 FF94 -30E5 FF6D -30E6 FF95 -30E7 FF6E -30E8 FF96 -30E9 FF97 -30EA FF98 -30EB FF99 -30EC FF9A -30ED FF9B -30EF 30F7 FF9C -30F0 30F8 -30F1 30F9 -30F2 30FA FF66 -30F3 FF9D -30FC FF70 -30FD 30FE -3131 FFA1 -3132 FFA2 -3133 FFA3 -3134 FFA4 -3135 FFA5 -3136 FFA6 -3137 FFA7 -3138 FFA8 -3139 FFA9 -313A FFAA -313B FFAB -313C FFAC -313D FFAD -313E FFAE -313F FFAF -3140 FFB0 -3141 FFB1 -3142 FFB2 -3143 FFB3 -3144 FFB4 -3145 FFB5 -3146 FFB6 -3147 FFB7 -3148 FFB8 -3149 FFB9 -314A FFBA -314B FFBB -314C FFBC -314D FFBD -314E FFBE -314F FFC2 -3150 FFC3 -3151 FFC4 -3152 FFC5 -3153 FFC6 -3154 FFC7 -3155 FFCA -3156 FFCB -3157 FFCC -3158 FFCD -3159 FFCE -315A FFCF -315B FFD2 -315C FFD3 -315D FFD4 -315E FFD5 -315F FFD6 -3160 FFD7 -3161 FFDA -3162 FFDB -3163 FFDC -3164 FFA0 -FB49 FB2C FB2D -END diff --git a/lib/unicode/In/AlphabeticPresentationForms.pl b/lib/unicode/In/AlphabeticPresentationForms.pl index 93ded27a55..c42e944a3c 100644 --- a/lib/unicode/In/AlphabeticPresentationForms.pl +++ b/lib/unicode/In/AlphabeticPresentationForms.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; FB00 FB4F END diff --git a/lib/unicode/In/Arabic.pl b/lib/unicode/In/Arabic.pl index a9645d55a2..5010ab73de 100644 --- a/lib/unicode/In/Arabic.pl +++ b/lib/unicode/In/Arabic.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0600 06FF END diff --git a/lib/unicode/In/ArabicPresentationForms-A.pl b/lib/unicode/In/ArabicPresentationForms-A.pl index b87293762a..6edd74d755 100644 --- a/lib/unicode/In/ArabicPresentationForms-A.pl +++ b/lib/unicode/In/ArabicPresentationForms-A.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; FB50 FDFF END diff --git a/lib/unicode/In/ArabicPresentationForms-B.pl b/lib/unicode/In/ArabicPresentationForms-B.pl index 9e81cf9572..964073931e 100644 --- a/lib/unicode/In/ArabicPresentationForms-B.pl +++ b/lib/unicode/In/ArabicPresentationForms-B.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; FE70 FEFE END diff --git a/lib/unicode/In/Armenian.pl b/lib/unicode/In/Armenian.pl index f86fd3c58a..19b74acd71 100644 --- a/lib/unicode/In/Armenian.pl +++ b/lib/unicode/In/Armenian.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0530 058F END diff --git a/lib/unicode/In/Arrows.pl b/lib/unicode/In/Arrows.pl index 3910c8dacd..7ce44183a1 100644 --- a/lib/unicode/In/Arrows.pl +++ b/lib/unicode/In/Arrows.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2190 21FF END diff --git a/lib/unicode/In/BasicLatin.pl b/lib/unicode/In/BasicLatin.pl index 9ce83b3d2d..39987f16ec 100644 --- a/lib/unicode/In/BasicLatin.pl +++ b/lib/unicode/In/BasicLatin.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0000 007F END diff --git a/lib/unicode/In/Bengali.pl b/lib/unicode/In/Bengali.pl index 0589b85d81..c0a47d30d1 100644 --- a/lib/unicode/In/Bengali.pl +++ b/lib/unicode/In/Bengali.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0980 09FF END diff --git a/lib/unicode/In/BlockElements.pl b/lib/unicode/In/BlockElements.pl index a52c848d11..e96e64faa0 100644 --- a/lib/unicode/In/BlockElements.pl +++ b/lib/unicode/In/BlockElements.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2580 259F END diff --git a/lib/unicode/In/Bopomofo.pl b/lib/unicode/In/Bopomofo.pl index 5af1356e3e..553560670c 100644 --- a/lib/unicode/In/Bopomofo.pl +++ b/lib/unicode/In/Bopomofo.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 3100 312F END diff --git a/lib/unicode/In/BoxDrawing.pl b/lib/unicode/In/BoxDrawing.pl index c9c1d1e5bc..d580199b7f 100644 --- a/lib/unicode/In/BoxDrawing.pl +++ b/lib/unicode/In/BoxDrawing.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2500 257F END diff --git a/lib/unicode/In/CJKCompatibility.pl b/lib/unicode/In/CJKCompatibility.pl index 66cbc545c9..07ab8edfd4 100644 --- a/lib/unicode/In/CJKCompatibility.pl +++ b/lib/unicode/In/CJKCompatibility.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 3300 33FF END diff --git a/lib/unicode/In/CJKCompatibilityForms.pl b/lib/unicode/In/CJKCompatibilityForms.pl index e65dbd3aba..122ccd7ad6 100644 --- a/lib/unicode/In/CJKCompatibilityForms.pl +++ b/lib/unicode/In/CJKCompatibilityForms.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; FE30 FE4F END diff --git a/lib/unicode/In/CJKCompatibilityIdeographs.pl b/lib/unicode/In/CJKCompatibilityIdeographs.pl index b6822621e8..59c8e5dd5b 100644 --- a/lib/unicode/In/CJKCompatibilityIdeographs.pl +++ b/lib/unicode/In/CJKCompatibilityIdeographs.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; F900 FAFF END diff --git a/lib/unicode/In/CJKSymbolsandPunctuation.pl b/lib/unicode/In/CJKSymbolsandPunctuation.pl index bdf4ab90f2..24ecc37b67 100644 --- a/lib/unicode/In/CJKSymbolsandPunctuation.pl +++ b/lib/unicode/In/CJKSymbolsandPunctuation.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 3000 303F END diff --git a/lib/unicode/In/CJKUnifiedIdeographs.pl b/lib/unicode/In/CJKUnifiedIdeographs.pl index 04d0a08e05..351cf74a82 100644 --- a/lib/unicode/In/CJKUnifiedIdeographs.pl +++ b/lib/unicode/In/CJKUnifiedIdeographs.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 4E00 9FFF END diff --git a/lib/unicode/In/CombiningDiacriticalMarks.pl b/lib/unicode/In/CombiningDiacriticalMarks.pl index 2308c52d25..a32f974bfb 100644 --- a/lib/unicode/In/CombiningDiacriticalMarks.pl +++ b/lib/unicode/In/CombiningDiacriticalMarks.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0300 036F END diff --git a/lib/unicode/In/CombiningHalfMarks.pl b/lib/unicode/In/CombiningHalfMarks.pl index 004d8052a2..100471bdbb 100644 --- a/lib/unicode/In/CombiningHalfMarks.pl +++ b/lib/unicode/In/CombiningHalfMarks.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; FE20 FE2F END diff --git a/lib/unicode/In/CombiningMarksforSymbols.pl b/lib/unicode/In/CombiningMarksforSymbols.pl index b80f637a56..f45e7e0490 100644 --- a/lib/unicode/In/CombiningMarksforSymbols.pl +++ b/lib/unicode/In/CombiningMarksforSymbols.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 20D0 20FF END diff --git a/lib/unicode/In/ControlPictures.pl b/lib/unicode/In/ControlPictures.pl index cfaa3c545b..77a759f1a0 100644 --- a/lib/unicode/In/ControlPictures.pl +++ b/lib/unicode/In/ControlPictures.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2400 243F END diff --git a/lib/unicode/In/CurrencySymbols.pl b/lib/unicode/In/CurrencySymbols.pl index 1a89d72a49..567ae97da3 100644 --- a/lib/unicode/In/CurrencySymbols.pl +++ b/lib/unicode/In/CurrencySymbols.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 20A0 20CF END diff --git a/lib/unicode/In/Cyrillic.pl b/lib/unicode/In/Cyrillic.pl index 657824c1b9..9ca104c7db 100644 --- a/lib/unicode/In/Cyrillic.pl +++ b/lib/unicode/In/Cyrillic.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0400 04FF END diff --git a/lib/unicode/In/Devanagari.pl b/lib/unicode/In/Devanagari.pl index 1a0bffc2aa..61372b58ab 100644 --- a/lib/unicode/In/Devanagari.pl +++ b/lib/unicode/In/Devanagari.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0900 097F END diff --git a/lib/unicode/In/Dingbats.pl b/lib/unicode/In/Dingbats.pl index 3800470f4e..0f820ca711 100644 --- a/lib/unicode/In/Dingbats.pl +++ b/lib/unicode/In/Dingbats.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2700 27BF END diff --git a/lib/unicode/In/EnclosedAlphanumerics.pl b/lib/unicode/In/EnclosedAlphanumerics.pl index 760ebd16e8..de52aa8d99 100644 --- a/lib/unicode/In/EnclosedAlphanumerics.pl +++ b/lib/unicode/In/EnclosedAlphanumerics.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2460 24FF END diff --git a/lib/unicode/In/EnclosedCJKLettersandMonths.pl b/lib/unicode/In/EnclosedCJKLettersandMonths.pl index 96a9d75796..e4de0e0261 100644 --- a/lib/unicode/In/EnclosedCJKLettersandMonths.pl +++ b/lib/unicode/In/EnclosedCJKLettersandMonths.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 3200 32FF END diff --git a/lib/unicode/In/Ethiopic.pl b/lib/unicode/In/Ethiopic.pl index 0ae7c17b0e..13c309050a 100644 --- a/lib/unicode/In/Ethiopic.pl +++ b/lib/unicode/In/Ethiopic.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 1200 137F END diff --git a/lib/unicode/In/GeneralPunctuation.pl b/lib/unicode/In/GeneralPunctuation.pl index a582d1f159..81c76992dc 100644 --- a/lib/unicode/In/GeneralPunctuation.pl +++ b/lib/unicode/In/GeneralPunctuation.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2000 206F END diff --git a/lib/unicode/In/GeometricShapes.pl b/lib/unicode/In/GeometricShapes.pl index 46086b8e8b..170422d2d0 100644 --- a/lib/unicode/In/GeometricShapes.pl +++ b/lib/unicode/In/GeometricShapes.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 25A0 25FF END diff --git a/lib/unicode/In/Georgian.pl b/lib/unicode/In/Georgian.pl index df1230d700..773ed1562a 100644 --- a/lib/unicode/In/Georgian.pl +++ b/lib/unicode/In/Georgian.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 10A0 10FF END diff --git a/lib/unicode/In/Greek.pl b/lib/unicode/In/Greek.pl index 10c1cf85ea..ff753d19b4 100644 --- a/lib/unicode/In/Greek.pl +++ b/lib/unicode/In/Greek.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0370 03FF END diff --git a/lib/unicode/In/GreekExtended.pl b/lib/unicode/In/GreekExtended.pl index f588406f43..b8f02e7f0a 100644 --- a/lib/unicode/In/GreekExtended.pl +++ b/lib/unicode/In/GreekExtended.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 1F00 1FFF END diff --git a/lib/unicode/In/Gujarati.pl b/lib/unicode/In/Gujarati.pl index 8a31d92571..ff6c6503bb 100644 --- a/lib/unicode/In/Gujarati.pl +++ b/lib/unicode/In/Gujarati.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0A80 0AFF END diff --git a/lib/unicode/In/Gurmukhi.pl b/lib/unicode/In/Gurmukhi.pl index 1b6857e181..b888df6941 100644 --- a/lib/unicode/In/Gurmukhi.pl +++ b/lib/unicode/In/Gurmukhi.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0A00 0A7F END diff --git a/lib/unicode/In/HalfwidthandFullwidthForms.pl b/lib/unicode/In/HalfwidthandFullwidthForms.pl index d7ff603e42..e45265393f 100644 --- a/lib/unicode/In/HalfwidthandFullwidthForms.pl +++ b/lib/unicode/In/HalfwidthandFullwidthForms.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; FF00 FFEF END diff --git a/lib/unicode/In/HangulCompatibilityJamo.pl b/lib/unicode/In/HangulCompatibilityJamo.pl index e602d4553d..c15379fafc 100644 --- a/lib/unicode/In/HangulCompatibilityJamo.pl +++ b/lib/unicode/In/HangulCompatibilityJamo.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 3130 318F END diff --git a/lib/unicode/In/HangulJamo.pl b/lib/unicode/In/HangulJamo.pl index dd5df946d8..c329b54c34 100644 --- a/lib/unicode/In/HangulJamo.pl +++ b/lib/unicode/In/HangulJamo.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 1100 11FF END diff --git a/lib/unicode/In/HangulSyllables.pl b/lib/unicode/In/HangulSyllables.pl index 95bc194dff..7d91a363f5 100644 --- a/lib/unicode/In/HangulSyllables.pl +++ b/lib/unicode/In/HangulSyllables.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; AC00 D7A3 END diff --git a/lib/unicode/In/Hebrew.pl b/lib/unicode/In/Hebrew.pl index e34e6feb39..abe7b9ede4 100644 --- a/lib/unicode/In/Hebrew.pl +++ b/lib/unicode/In/Hebrew.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0590 05FF END diff --git a/lib/unicode/In/HighPrivateUseSurrogates.pl b/lib/unicode/In/HighPrivateUseSurrogates.pl index 000cb70d01..6ed7ac96fd 100644 --- a/lib/unicode/In/HighPrivateUseSurrogates.pl +++ b/lib/unicode/In/HighPrivateUseSurrogates.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; DB80 DBFF END diff --git a/lib/unicode/In/HighSurrogates.pl b/lib/unicode/In/HighSurrogates.pl index 95c7498511..924a0c9bdb 100644 --- a/lib/unicode/In/HighSurrogates.pl +++ b/lib/unicode/In/HighSurrogates.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; D800 DB7F END diff --git a/lib/unicode/In/Hiragana.pl b/lib/unicode/In/Hiragana.pl index ce8c3ed223..7a65302188 100644 --- a/lib/unicode/In/Hiragana.pl +++ b/lib/unicode/In/Hiragana.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 3040 309F END diff --git a/lib/unicode/In/IPAExtensions.pl b/lib/unicode/In/IPAExtensions.pl index 106d84bb83..20906d6300 100644 --- a/lib/unicode/In/IPAExtensions.pl +++ b/lib/unicode/In/IPAExtensions.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0250 02AF END diff --git a/lib/unicode/In/Kanbun.pl b/lib/unicode/In/Kanbun.pl index 6d575a86bc..57d6bd21f4 100644 --- a/lib/unicode/In/Kanbun.pl +++ b/lib/unicode/In/Kanbun.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 3190 319F END diff --git a/lib/unicode/In/Kannada.pl b/lib/unicode/In/Kannada.pl index ad70ade385..109197a6f7 100644 --- a/lib/unicode/In/Kannada.pl +++ b/lib/unicode/In/Kannada.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0C80 0CFF END diff --git a/lib/unicode/In/Katakana.pl b/lib/unicode/In/Katakana.pl index cb0f30e474..93bd5a03fa 100644 --- a/lib/unicode/In/Katakana.pl +++ b/lib/unicode/In/Katakana.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 30A0 30FF END diff --git a/lib/unicode/In/Lao.pl b/lib/unicode/In/Lao.pl index ff2d587264..41ff11f805 100644 --- a/lib/unicode/In/Lao.pl +++ b/lib/unicode/In/Lao.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0E80 0EFF END diff --git a/lib/unicode/In/Latin-1Supplement.pl b/lib/unicode/In/Latin-1Supplement.pl index 3c8b04cac0..1b252eb23e 100644 --- a/lib/unicode/In/Latin-1Supplement.pl +++ b/lib/unicode/In/Latin-1Supplement.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0080 00FF END diff --git a/lib/unicode/In/LatinExtended-A.pl b/lib/unicode/In/LatinExtended-A.pl index 872689f969..b8be987db0 100644 --- a/lib/unicode/In/LatinExtended-A.pl +++ b/lib/unicode/In/LatinExtended-A.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0100 017F END diff --git a/lib/unicode/In/LatinExtended-B.pl b/lib/unicode/In/LatinExtended-B.pl index be497d6bfb..b9aff43f3d 100644 --- a/lib/unicode/In/LatinExtended-B.pl +++ b/lib/unicode/In/LatinExtended-B.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0180 024F END diff --git a/lib/unicode/In/LatinExtendedAdditional.pl b/lib/unicode/In/LatinExtendedAdditional.pl index 3f1cda1271..d309e90814 100644 --- a/lib/unicode/In/LatinExtendedAdditional.pl +++ b/lib/unicode/In/LatinExtendedAdditional.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 1E00 1EFF END diff --git a/lib/unicode/In/LetterlikeSymbols.pl b/lib/unicode/In/LetterlikeSymbols.pl index 96ab07b446..1768740d42 100644 --- a/lib/unicode/In/LetterlikeSymbols.pl +++ b/lib/unicode/In/LetterlikeSymbols.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2100 214F END diff --git a/lib/unicode/In/LowSurrogates.pl b/lib/unicode/In/LowSurrogates.pl index a30148c54e..752b264e81 100644 --- a/lib/unicode/In/LowSurrogates.pl +++ b/lib/unicode/In/LowSurrogates.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; DC00 DFFF END diff --git a/lib/unicode/In/Malayalam.pl b/lib/unicode/In/Malayalam.pl index 784bac9004..8fb57cdb10 100644 --- a/lib/unicode/In/Malayalam.pl +++ b/lib/unicode/In/Malayalam.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0D00 0D7F END diff --git a/lib/unicode/In/MathematicalOperators.pl b/lib/unicode/In/MathematicalOperators.pl index b1c2db47cb..055f19e590 100644 --- a/lib/unicode/In/MathematicalOperators.pl +++ b/lib/unicode/In/MathematicalOperators.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2200 22FF END diff --git a/lib/unicode/In/MiscellaneousSymbols.pl b/lib/unicode/In/MiscellaneousSymbols.pl index 5c6dcd4271..9dcdd26954 100644 --- a/lib/unicode/In/MiscellaneousSymbols.pl +++ b/lib/unicode/In/MiscellaneousSymbols.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2600 26FF END diff --git a/lib/unicode/In/MiscellaneousTechnical.pl b/lib/unicode/In/MiscellaneousTechnical.pl index 0eb7d1e34b..370c00f320 100644 --- a/lib/unicode/In/MiscellaneousTechnical.pl +++ b/lib/unicode/In/MiscellaneousTechnical.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2300 23FF END diff --git a/lib/unicode/In/NumberForms.pl b/lib/unicode/In/NumberForms.pl index 7d83d317b9..d33ece0bbc 100644 --- a/lib/unicode/In/NumberForms.pl +++ b/lib/unicode/In/NumberForms.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2150 218F END diff --git a/lib/unicode/In/OpticalCharacterRecognition.pl b/lib/unicode/In/OpticalCharacterRecognition.pl index 9168cc758b..be1d981c7c 100644 --- a/lib/unicode/In/OpticalCharacterRecognition.pl +++ b/lib/unicode/In/OpticalCharacterRecognition.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2440 245F END diff --git a/lib/unicode/In/Oriya.pl b/lib/unicode/In/Oriya.pl index 4d61ed359a..5a680f6743 100644 --- a/lib/unicode/In/Oriya.pl +++ b/lib/unicode/In/Oriya.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0B00 0B7F END diff --git a/lib/unicode/In/PrivateUse.pl b/lib/unicode/In/PrivateUse.pl index 5b90e4d9b3..0c118f4fe4 100644 --- a/lib/unicode/In/PrivateUse.pl +++ b/lib/unicode/In/PrivateUse.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; E000 F8FF END diff --git a/lib/unicode/In/SmallFormVariants.pl b/lib/unicode/In/SmallFormVariants.pl index 4153052890..736415e67e 100644 --- a/lib/unicode/In/SmallFormVariants.pl +++ b/lib/unicode/In/SmallFormVariants.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; FE50 FE6F END diff --git a/lib/unicode/In/SpacingModifierLetters.pl b/lib/unicode/In/SpacingModifierLetters.pl index 69179e615d..6e9cdf0b53 100644 --- a/lib/unicode/In/SpacingModifierLetters.pl +++ b/lib/unicode/In/SpacingModifierLetters.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 02B0 02FF END diff --git a/lib/unicode/In/Specials.pl b/lib/unicode/In/Specials.pl index 6be56a4039..f9f730f840 100644 --- a/lib/unicode/In/Specials.pl +++ b/lib/unicode/In/Specials.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; FFF0 FFFD END diff --git a/lib/unicode/In/SuperscriptsandSubscripts.pl b/lib/unicode/In/SuperscriptsandSubscripts.pl index c4041aae3e..efcec0b841 100644 --- a/lib/unicode/In/SuperscriptsandSubscripts.pl +++ b/lib/unicode/In/SuperscriptsandSubscripts.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2070 209F END diff --git a/lib/unicode/In/Tamil.pl b/lib/unicode/In/Tamil.pl index 27f61fa3d7..e65ed2fa19 100644 --- a/lib/unicode/In/Tamil.pl +++ b/lib/unicode/In/Tamil.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0B80 0BFF END diff --git a/lib/unicode/In/Telugu.pl b/lib/unicode/In/Telugu.pl index 7342ec2cb1..d5ed2368c2 100644 --- a/lib/unicode/In/Telugu.pl +++ b/lib/unicode/In/Telugu.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0C00 0C7F END diff --git a/lib/unicode/In/Thai.pl b/lib/unicode/In/Thai.pl index c5c789c3e0..3376de4e18 100644 --- a/lib/unicode/In/Thai.pl +++ b/lib/unicode/In/Thai.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0E00 0E7F END diff --git a/lib/unicode/In/Tibetan.pl b/lib/unicode/In/Tibetan.pl index bf2888d38d..50837ad8bc 100644 --- a/lib/unicode/In/Tibetan.pl +++ b/lib/unicode/In/Tibetan.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0F00 0FFF END diff --git a/lib/unicode/Is/Upper.pl b/lib/unicode/Is/Upper.pl index eb8052e70d..8dde2742d0 100644 --- a/lib/unicode/Is/Upper.pl +++ b/lib/unicode/Is/Upper.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0041 005a 00c0 00d6 diff --git a/lib/unicode/Is/Word.pl b/lib/unicode/Is/Word.pl index f30d2f126b..23186bd27d 100644 --- a/lib/unicode/Is/Word.pl +++ b/lib/unicode/Is/Word.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0030 0039 0041 005a diff --git a/lib/unicode/Is/XDigit.pl b/lib/unicode/Is/XDigit.pl index f0b7044eb6..e55682500b 100644 --- a/lib/unicode/Is/XDigit.pl +++ b/lib/unicode/Is/XDigit.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0030 0039 0041 0046 diff --git a/lib/unicode/Is/Z.pl b/lib/unicode/Is/Z.pl index 42e0249273..22a9792d4f 100644 --- a/lib/unicode/Is/Z.pl +++ b/lib/unicode/Is/Z.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0020 00a0 diff --git a/lib/unicode/Is/Zl.pl b/lib/unicode/Is/Zl.pl index cdc04d65d6..0989e1d920 100644 --- a/lib/unicode/Is/Zl.pl +++ b/lib/unicode/Is/Zl.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2028 END diff --git a/lib/unicode/Is/Zp.pl b/lib/unicode/Is/Zp.pl index 3a6981114d..3b23446fe9 100644 --- a/lib/unicode/Is/Zp.pl +++ b/lib/unicode/Is/Zp.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 2029 END diff --git a/lib/unicode/Is/Zs.pl b/lib/unicode/Is/Zs.pl index 067c7c33df..db18055ea4 100644 --- a/lib/unicode/Is/Zs.pl +++ b/lib/unicode/Is/Zs.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0020 00a0 diff --git a/lib/unicode/JamoShort.pl b/lib/unicode/JamoShort.pl index 433ee82951..760bcba03e 100644 --- a/lib/unicode/JamoShort.pl +++ b/lib/unicode/JamoShort.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 1100 G 1101 GG diff --git a/lib/unicode/Name.pl b/lib/unicode/Name.pl index 155031cbba..ef8979f0d1 100644 --- a/lib/unicode/Name.pl +++ b/lib/unicode/Name.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0000 001f <control> 0020 SPACE diff --git a/lib/unicode/Number.pl b/lib/unicode/Number.pl index 55cc8571ff..b0e054a0d0 100644 --- a/lib/unicode/Number.pl +++ b/lib/unicode/Number.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0031 1 0032 2 diff --git a/lib/unicode/To/Digit.pl b/lib/unicode/To/Digit.pl index 1a7b88c470..a96bc1c1a6 100644 --- a/lib/unicode/To/Digit.pl +++ b/lib/unicode/To/Digit.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0030 0039 0000 00b2 00b3 0002 diff --git a/lib/unicode/To/Lower.pl b/lib/unicode/To/Lower.pl index da8512ebb6..a78a7e4492 100644 --- a/lib/unicode/To/Lower.pl +++ b/lib/unicode/To/Lower.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0041 005a 0061 00c0 00d6 00e0 diff --git a/lib/unicode/To/Title.pl b/lib/unicode/To/Title.pl index cf99256802..d8f5c048d4 100644 --- a/lib/unicode/To/Title.pl +++ b/lib/unicode/To/Title.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0061 007a 0041 00b5 039c diff --git a/lib/unicode/To/Upper.pl b/lib/unicode/To/Upper.pl index 31d6eefa88..1fc7637753 100644 --- a/lib/unicode/To/Upper.pl +++ b/lib/unicode/To/Upper.pl @@ -1,3 +1,6 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is built by mktables.PL from e.g. Unicode.300. +# Any changes made here will be lost! return <<'END'; 0061 007a 0041 00b5 039c diff --git a/lib/unicode/mktables.PL b/lib/unicode/mktables.PL index 48d40f4541..cef6936b68 100755 --- a/lib/unicode/mktables.PL +++ b/lib/unicode/mktables.PL @@ -7,7 +7,6 @@ $UnicodeData = "Unicode.300"; mkdir "In", 0777; mkdir "Is", 0777; mkdir "To", 0777; -mkdir "Eq", 0777; @todo = ( # typical @@ -337,106 +336,4 @@ END $out; } -# Create the equivalence mappings. - -open(UNICODEDATA, $UnicodeData) || die "$0: $UnicodeData: $!\n"; - -while (<UNICODEDATA>) { - ($code, $name, $category, $decomposition) = (split /;/)[0,1,2,5]; - - $code{$name} = $code; - $name{$code} = $name; - $category{$code} = $category; - - next unless $category =~ /^L/; - - # The definition of "equivalence" is twofold. - if ($decomposition ne '') { - # (1) If there's an official Unicode decomposition - # and the base is a Unicode letter. - $decomposition =~ s/^<\w+> //; - @decomposition = split(' ', $decomposition); - # Some Arabic ligatures like - # FC5E;ARABIC LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM;Lo;... - # are problematic because their decomposition begins with - # a space (0020) -- which could be just skipped -- but then - # their base glyph is not a letter, for example - # the above decomposes as <isolated> 0020 064C 0651, - # but 064C is 064C;ARABIC DAMMATAN;Mn;... - # (the 0651 being ARABIC SHADDA;Mn) - ($basecode) = shift @decomposition; - push @base, [ $code, $basecode ]; - } elsif ($name =~ /^(.+?) WITH /) { - # (2) If there's a "FOO WITH ..." Unicode name and FOO - # happens to be valid Unicode letter. This is - # a debatable definition and all fault is by me (jhi). - # For example this definition adds - # LATIN SMALL LETTER O WITH STROKE - # as a derivative of - # LATIN SMALL LETTER O - # which some might rightfully contest, especially - # the speakers of languages who have the former - # phonetically as very distinct from the latter. - push @with, [ $code, $1 ]; - } -} - -foreach my $w (@with) { - ($code, $basename) = @$w; - next if not exists $code{$basename} or - not $category{$code{$basename}} =~ /^L/; - push @base, [ $code, $code{$basename} ]; -} - -@base = sort { $a->[0] cmp $b->[0] } @base; - -foreach my $b (@base) { - ($code, $basecode) = @$b; - $basename = $name{$basecode}; - next if not defined $basename or - not exists $code{$basename} or - not $category{$code{$basename}} =~ /^L/; - push @{$unicode{$code{$basename}}}, $code; -# print "$code: $name{$code} -> $basename\n", -} - -@unicode = sort keys %unicode; - -print "EqUnicode\n"; -if (open(OUT, ">Eq/Unicode.pl")) { - print OUT <<EOH; -# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! -# This file is built by $0 from e.g. $UnicodeData. -# Any changes made here will be lost! -return <<'END'; -EOH - foreach my $c (@unicode) { - print OUT "$c @{$unicode{$c}}\n"; - } - print OUT "END\n"; - close OUT; -} else { - die "$0: failed to open Eq/Unicode.pl for writing: $!\n"; -} - -print "EqLatin1\n"; -if (open(OUT, ">Eq/Latin1.pl")) { - print OUT <<EOH; -# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! -# This file is built by $0 from e.g. $UnicodeData. -# Any changes made here will be lost! -return <<'END'; -EOH - foreach my $c (@unicode) { - last if hex($c) > 255; - my @c = grep { hex($_) < 256 } @{$unicode{$c}}; - next unless @c; - print OUT "$c @c\n"; - } - print OUT "END\n"; - close OUT; -} else { - die "$0: failed to open Eq/Latin1.pl for writing: $!\n"; -} - # eof diff --git a/lib/utf8.pm b/lib/utf8.pm index d9e9becdda..3098fe21bd 100644 --- a/lib/utf8.pm +++ b/lib/utf8.pm @@ -70,6 +70,6 @@ of byte semantics. =head1 SEE ALSO -L<perlunicode>, L<byte> +L<perlunicode>, L<bytes> =cut diff --git a/lib/warnings.pm b/lib/warnings.pm index 6b87d85f2b..11fd5b0718 100644 --- a/lib/warnings.pm +++ b/lib/warnings.pm @@ -17,98 +17,141 @@ warnings - Perl pragma to control optional warnings use warnings "all"; no warnings "all"; + if (warnings::enabled("void") { + warnings::warn("void", "some warning"); + } + =head1 DESCRIPTION If no import list is supplied, all possible warnings are either enabled or disabled. -See L<perlmod/Pragmatic Modules> and L<perllexwarn>. +Two functions are provided to assist module authors. + +=over 4 + +=item warnings::enabled($category) + +Returns TRUE if the warnings category in C<$category> is enabled in the +calling module. Otherwise returns FALSE. + + +=item warnings::warn($category, $message) +If the calling module has I<not> set C<$category> to "FATAL", print +C<$message> to STDERR. +If the calling module has set C<$category> to "FATAL", print C<$message> +STDERR then die. + +=back + +See L<perlmod/Pragmatic Modules> and L<perllexwarn>. =cut use Carp ; %Bits = ( - 'all' => "\x55\x55\x55\x55\x55\x55\x55\x55\x55", # [0..35] - 'ambiguous' => "\x00\x00\x00\x00\x01\x00\x00\x00\x00", # [16] - 'closed' => "\x04\x00\x00\x00\x00\x00\x00\x00\x00", # [1] - 'closure' => "\x00\x00\x00\x00\x00\x00\x40\x00\x00", # [27] - 'debugging' => "\x00\x00\x00\x01\x00\x00\x00\x00\x00", # [12] - 'deprecated' => "\x00\x00\x00\x00\x04\x00\x00\x00\x00", # [17] - 'digit' => "\x00\x00\x00\x00\x10\x00\x00\x00\x00", # [18] - 'exec' => "\x10\x00\x00\x00\x00\x00\x00\x00\x00", # [2] - 'inplace' => "\x00\x00\x00\x04\x00\x00\x00\x00\x00", # [13] - 'internal' => "\x00\x00\x00\x10\x00\x00\x00\x00\x00", # [14] - 'io' => "\x55\x05\x00\x00\x00\x00\x00\x00\x00", # [0..5] - 'misc' => "\x00\x10\x00\x00\x00\x00\x00\x00\x00", # [6] - 'newline' => "\x40\x00\x00\x00\x00\x00\x00\x00\x00", # [3] - 'numeric' => "\x00\x40\x00\x00\x00\x00\x00\x00\x00", # [7] - 'octal' => "\x00\x00\x00\x00\x40\x00\x00\x00\x00", # [19] - 'once' => "\x00\x00\x01\x00\x00\x00\x00\x00\x00", # [8] - 'overflow' => "\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [28] - 'parenthesis' => "\x00\x00\x00\x00\x00\x01\x00\x00\x00", # [20] - 'pipe' => "\x00\x01\x00\x00\x00\x00\x00\x00\x00", # [4] - 'portable' => "\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [29] - 'precedence' => "\x00\x00\x00\x00\x00\x04\x00\x00\x00", # [21] - 'printf' => "\x00\x00\x00\x00\x00\x10\x00\x00\x00", # [22] - 'recursion' => "\x00\x00\x04\x00\x00\x00\x00\x00\x00", # [9] - 'redefine' => "\x00\x00\x10\x00\x00\x00\x00\x00\x00", # [10] - 'reserved' => "\x00\x00\x00\x00\x00\x40\x00\x00\x00", # [23] - 'semicolon' => "\x00\x00\x00\x00\x00\x00\x01\x00\x00", # [24] - 'severe' => "\x00\x00\x40\x15\x00\x00\x00\x00\x00", # [11..14] - 'signal' => "\x00\x00\x00\x00\x00\x00\x00\x10\x00", # [30] - 'substr' => "\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [31] - 'syntax' => "\x00\x00\x00\x40\x55\x55\x01\x00\x00", # [15..24] - 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [32] - 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x04\x00\x00", # [25] - 'unopened' => "\x00\x04\x00\x00\x00\x00\x00\x00\x00", # [5] - 'unsafe' => "\x00\x00\x00\x00\x00\x00\x50\x55\x15", # [26..34] - 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [33] - 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x10", # [34] - 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x40", # [35] + 'all' => "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55", # [0..47] + 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00", # [27] + 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00", # [28] + 'chmod' => "\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [0] + 'closed' => "\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [5] + 'closure' => "\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1] + 'debugging' => "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00", # [20] + 'deprecated' => "\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00", # [29] + 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00", # [30] + 'exec' => "\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6] + 'exiting' => "\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2] + 'glob' => "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3] + 'inplace' => "\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00", # [21] + 'internal' => "\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00", # [22] + 'io' => "\x00\x55\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4..9] + 'malloc' => "\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00", # [23] + 'misc' => "\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10] + 'newline' => "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7] + 'numeric' => "\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11] + 'once' => "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00", # [12] + 'overflow' => "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00", # [13] + 'pack' => "\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00", # [14] + 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00", # [31] + 'pipe' => "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8] + 'portable' => "\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00", # [15] + 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00", # [32] + 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00", # [33] + 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00", # [34] + 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00", # [35] + 'recursion' => "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00", # [16] + 'redefine' => "\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00", # [17] + 'regexp' => "\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00", # [18] + 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00", # [36] + 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00", # [37] + 'severe' => "\x00\x00\x00\x00\x40\x55\x00\x00\x00\x00\x00\x00", # [19..23] + 'signal' => "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00", # [24] + 'substr' => "\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00", # [25] + 'syntax' => "\x00\x00\x00\x00\x00\x00\x50\x55\x55\x05\x00\x00", # [26..37] + 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00", # [38] + 'umask' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00", # [39] + 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [40] + 'unopened' => "\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9] + 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [41] + 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00", # [42] + 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [43] + 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [44] + 'y2k' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [45] ); %DeadBits = ( - 'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", # [0..35] - 'ambiguous' => "\x00\x00\x00\x00\x02\x00\x00\x00\x00", # [16] - 'closed' => "\x08\x00\x00\x00\x00\x00\x00\x00\x00", # [1] - 'closure' => "\x00\x00\x00\x00\x00\x00\x80\x00\x00", # [27] - 'debugging' => "\x00\x00\x00\x02\x00\x00\x00\x00\x00", # [12] - 'deprecated' => "\x00\x00\x00\x00\x08\x00\x00\x00\x00", # [17] - 'digit' => "\x00\x00\x00\x00\x20\x00\x00\x00\x00", # [18] - 'exec' => "\x20\x00\x00\x00\x00\x00\x00\x00\x00", # [2] - 'inplace' => "\x00\x00\x00\x08\x00\x00\x00\x00\x00", # [13] - 'internal' => "\x00\x00\x00\x20\x00\x00\x00\x00\x00", # [14] - 'io' => "\xaa\x0a\x00\x00\x00\x00\x00\x00\x00", # [0..5] - 'misc' => "\x00\x20\x00\x00\x00\x00\x00\x00\x00", # [6] - 'newline' => "\x80\x00\x00\x00\x00\x00\x00\x00\x00", # [3] - 'numeric' => "\x00\x80\x00\x00\x00\x00\x00\x00\x00", # [7] - 'octal' => "\x00\x00\x00\x00\x80\x00\x00\x00\x00", # [19] - 'once' => "\x00\x00\x02\x00\x00\x00\x00\x00\x00", # [8] - 'overflow' => "\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [28] - 'parenthesis' => "\x00\x00\x00\x00\x00\x02\x00\x00\x00", # [20] - 'pipe' => "\x00\x02\x00\x00\x00\x00\x00\x00\x00", # [4] - 'portable' => "\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [29] - 'precedence' => "\x00\x00\x00\x00\x00\x08\x00\x00\x00", # [21] - 'printf' => "\x00\x00\x00\x00\x00\x20\x00\x00\x00", # [22] - 'recursion' => "\x00\x00\x08\x00\x00\x00\x00\x00\x00", # [9] - 'redefine' => "\x00\x00\x20\x00\x00\x00\x00\x00\x00", # [10] - 'reserved' => "\x00\x00\x00\x00\x00\x80\x00\x00\x00", # [23] - 'semicolon' => "\x00\x00\x00\x00\x00\x00\x02\x00\x00", # [24] - 'severe' => "\x00\x00\x80\x2a\x00\x00\x00\x00\x00", # [11..14] - 'signal' => "\x00\x00\x00\x00\x00\x00\x00\x20\x00", # [30] - 'substr' => "\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [31] - 'syntax' => "\x00\x00\x00\x80\xaa\xaa\x02\x00\x00", # [15..24] - 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [32] - 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x08\x00\x00", # [25] - 'unopened' => "\x00\x08\x00\x00\x00\x00\x00\x00\x00", # [5] - 'unsafe' => "\x00\x00\x00\x00\x00\x00\xa0\xaa\x2a", # [26..34] - 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [33] - 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x20", # [34] - 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x80", # [35] + 'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", # [0..47] + 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00", # [27] + 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00", # [28] + 'chmod' => "\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [0] + 'closed' => "\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [5] + 'closure' => "\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1] + 'debugging' => "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00", # [20] + 'deprecated' => "\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00", # [29] + 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00", # [30] + 'exec' => "\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6] + 'exiting' => "\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2] + 'glob' => "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3] + 'inplace' => "\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00", # [21] + 'internal' => "\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00", # [22] + 'io' => "\x00\xaa\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4..9] + 'malloc' => "\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00", # [23] + 'misc' => "\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10] + 'newline' => "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7] + 'numeric' => "\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11] + 'once' => "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00", # [12] + 'overflow' => "\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00", # [13] + 'pack' => "\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00", # [14] + 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00", # [31] + 'pipe' => "\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8] + 'portable' => "\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00", # [15] + 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00", # [32] + 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00", # [33] + 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00", # [34] + 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00", # [35] + 'recursion' => "\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00", # [16] + 'redefine' => "\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00", # [17] + 'regexp' => "\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00", # [18] + 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00", # [36] + 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00", # [37] + 'severe' => "\x00\x00\x00\x00\x80\xaa\x00\x00\x00\x00\x00\x00", # [19..23] + 'signal' => "\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00", # [24] + 'substr' => "\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00", # [25] + 'syntax' => "\x00\x00\x00\x00\x00\x00\xa0\xaa\xaa\x0a\x00\x00", # [26..37] + 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00", # [38] + 'umask' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00", # [39] + 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [40] + 'unopened' => "\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9] + 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [41] + 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00", # [42] + 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [43] + 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [44] + 'y2k' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [45] ); +$NONE = "\0\0\0\0\0\0\0\0\0\0\0\0"; sub bits { my $mask ; @@ -141,12 +184,34 @@ sub unimport { sub enabled { - my $string = shift ; - + # If no parameters, check for any lexical warnings enabled + # in the users scope. + my $callers_bitmask = (caller(1))[9] ; + return ($callers_bitmask ne $NONE) if @_ == 0 ; + + # otherwise check for the category supplied. + my $category = shift ; + return 0 + unless $Bits{$category} ; + return 0 unless defined $callers_bitmask ; return 1 - if $bits{$string} && ${^WARNING_BITS} & $bits{$string} ; + if ($callers_bitmask & $Bits{$category}) ne $NONE ; return 0 ; } +sub warn +{ + croak "Usage: warnings::warn('category', 'message')" + unless @_ == 2 ; + my $category = shift ; + my $message = shift ; + local $Carp::CarpLevel = 1 ; + my $callers_bitmask = (caller(1))[9] ; + croak($message) + if defined $callers_bitmask && + ($callers_bitmask & $DeadBits{$category}) ne $NONE ; + carp($message) ; +} + 1; |