diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CPAN.pm | 295 | ||||
-rw-r--r-- | lib/CPAN/FirstTime.pm | 40 | ||||
-rw-r--r-- | lib/ExtUtils/Install.pm | 3 | ||||
-rw-r--r-- | lib/ExtUtils/MM_Unix.pm | 1 | ||||
-rw-r--r-- | lib/ExtUtils/MM_VMS.pm | 7 | ||||
-rw-r--r-- | lib/ExtUtils/MakeMaker.pm | 123 | ||||
-rw-r--r-- | lib/ExtUtils/Mksymlists.pm | 1 | ||||
-rw-r--r-- | lib/File/Basename.pm | 8 | ||||
-rw-r--r-- | lib/File/Path.pm | 21 | ||||
-rw-r--r-- | lib/Term/ReadLine.pm | 8 | ||||
-rw-r--r-- | lib/Tie/Array.pm | 74 | ||||
-rw-r--r-- | lib/lib_pm.PL | 48 | ||||
-rw-r--r-- | lib/perl5db.pl | 6 | ||||
-rw-r--r-- | lib/strict.pm | 8 | ||||
-rw-r--r-- | lib/unicode/Is/Alnum.pl | 165 | ||||
-rw-r--r-- | lib/unicode/Is/Alpha.pl | 140 | ||||
-rw-r--r-- | lib/unicode/Is/DCmedial.pl (renamed from lib/unicode/Is/DCinital.pl) | 0 | ||||
-rw-r--r-- | lib/unicode/Is/Graph.pl | 15 | ||||
-rw-r--r-- | lib/unicode/Is/Print.pl | 5 | ||||
-rw-r--r-- | lib/unicode/Is/Punct.pl | 62 | ||||
-rw-r--r-- | lib/unicode/Is/Space.pl | 11 | ||||
-rw-r--r-- | lib/unicode/Is/Word.pl | 165 | ||||
-rwxr-xr-x | lib/unicode/mktables.PL | 26 | ||||
-rw-r--r-- | lib/vars.pm | 3 |
24 files changed, 870 insertions, 365 deletions
diff --git a/lib/CPAN.pm b/lib/CPAN.pm index aeb6a57958..f037b88991 100644 --- a/lib/CPAN.pm +++ b/lib/CPAN.pm @@ -1,12 +1,12 @@ # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*- package CPAN; -$VERSION = '1.57_68RC'; +$VERSION = '1.58_55'; -# $Id: CPAN.pm,v 1.354 2000/10/08 14:20:57 k Exp $ +# $Id: CPAN.pm,v 1.366 2000/10/27 07:45:49 k Exp $ # only used during development: $Revision = ""; -# $Revision = "[".substr(q$Revision: 1.354 $, 10)."]"; +# $Revision = "[".substr(q$Revision: 1.366 $, 10)."]"; use Carp (); use Config (); @@ -56,7 +56,7 @@ package CPAN; use strict qw(vars); use vars qw($VERSION @EXPORT $AUTOLOAD $DEBUG $META $HAS_USABLE $term - $Revision $Signal $Cwd $End $Suppress_readline $Frontend + $Revision $Signal $End $Suppress_readline $Frontend $Defaultsite $Have_warned); @CPAN::ISA = qw(CPAN::Debug Exporter); @@ -88,24 +88,24 @@ sub shell { $Suppress_readline = ! -t STDIN unless defined $Suppress_readline; CPAN::Config->load unless $CPAN::Config_loaded++; - CPAN::Index->read_metadata_cache; + my $oprompt = shift || "cpan> "; + my $prompt = $oprompt; + my $commandline = shift || ""; - my $prompt = "cpan> "; local($^W) = 1; unless ($Suppress_readline) { require Term::ReadLine; -# import Term::ReadLine; - $term = Term::ReadLine->new('CPAN Monitor'); + if (! $term + or + $term->ReadLine eq "Term::ReadLine::Stub" + ) { + $term = Term::ReadLine->new('CPAN Monitor'); + } if ($term->ReadLine eq "Term::ReadLine::Gnu") { my $attribs = $term->Attribs; -# $attribs->{completion_entry_function} = -# $attribs->{'list_completion_function'}; $attribs->{attempted_completion_function} = sub { &CPAN::Complete::gnu_cpl; } -# $attribs->{completion_word} = -# [qw(help me somebody to find out how -# to use completion with GNU)]; } else { $readline::rl_completion_function = $readline::rl_completion_function = 'CPAN::Complete::cpl'; @@ -120,9 +120,7 @@ sub shell { # no strict; # I do not recall why no strict was here (2000-09-03) $META->checklock(); - my $getcwd; - $getcwd = $CPAN::Config->{'getcwd'} || 'cwd'; - my $cwd = CPAN->$getcwd(); + my $cwd = CPAN::anycwd(); my $try_detect_readline; $try_detect_readline = $term->ReadLine eq "Term::ReadLine::Stub" if $term; my $rl_avail = $Suppress_readline ? "suppressed" : @@ -147,7 +145,7 @@ ReadLine support %s last unless defined ($_ = <> ); chomp; } else { - last unless defined ($_ = $term->readline($prompt)); + last unless defined ($_ = $term->readline($prompt, $commandline)); } $_ = "$continuation$_" if $continuation; s/^\s+//; @@ -169,7 +167,7 @@ ReadLine support %s eval($eval); warn $@ if $@; $continuation = ""; - $prompt = "cpan> "; + $prompt = $oprompt; } elsif (/./) { my(@line); if ($] < 5.00322) { # parsewords had a bug until recently @@ -185,9 +183,12 @@ ReadLine support %s chdir $cwd or $CPAN::Frontend->mydie(qq{Could not chdir to "$cwd": $!}); $CPAN::Frontend->myprint("\n"); $continuation = ""; - $prompt = "cpan> "; + $prompt = $oprompt; } } continue { + $commandline = ""; # I do want to be able to pass a default to + # shell, but on the second command I see no + # use in that $Signal=0; CPAN::Queue->nullify_queue; if ($try_detect_readline) { @@ -201,10 +202,12 @@ ReadLine support %s require Term::ReadLine; $CPAN::Frontend->myprint("\n$redef subroutines in ". "Term::ReadLine redefined\n"); + @_ = ($oprompt,""); goto &shell; } } } + chdir $cwd or $CPAN::Frontend->mydie(qq{Could not chdir to "$cwd": $!}); } package CPAN::CacheMgr; @@ -226,6 +229,10 @@ use vars qw($Ua $Thesite $Themethod); package CPAN::Complete; @CPAN::Complete::ISA = qw(CPAN::Debug); +@CPAN::Complete::COMMANDS = sort qw( + ! a b d h i m o q r u autobundle clean dump + make test install force readme reload look cvs_import +) unless @CPAN::Complete::COMMANDS; package CPAN::Index; use vars qw($last_time $date_of_03); @@ -251,8 +258,9 @@ package CPAN::Module; @CPAN::Module::ISA = qw(CPAN::InfoObj); package CPAN::Shell; -use vars qw($AUTOLOAD @ISA); +use vars qw($AUTOLOAD @ISA $COLOR_REGISTERED); @CPAN::Shell::ISA = qw(CPAN::Debug); +$COLOR_REGISTERED ||= 0; #-> sub CPAN::Shell::AUTOLOAD ; sub AUTOLOAD { @@ -583,6 +591,13 @@ sub DESTROY { &cleanup; # need an eval? } +#-> sub CPAN::anycwd ; +sub anycwd () { + my $getcwd; + $getcwd = $CPAN::Config->{'getcwd'} || 'cwd'; + CPAN->$getcwd(); +} + #-> sub CPAN::cwd ; sub cwd {Cwd::cwd();} @@ -592,6 +607,7 @@ sub getcwd {Cwd::getcwd();} #-> sub CPAN::exists ; sub exists { my($mgr,$class,$id) = @_; + CPAN::Config->load unless $CPAN::Config_loaded++; CPAN::Index->reload; ### Carp::croak "exists called without class argument" unless $class; $id ||= ""; @@ -788,9 +804,7 @@ sub entries { return unless defined $dir; $self->debug("reading dir[$dir]") if $CPAN::DEBUG; $dir ||= $self->{ID}; - my $getcwd; - $getcwd = $CPAN::Config->{'getcwd'} || 'cwd'; - my($cwd) = CPAN->$getcwd(); + my($cwd) = CPAN::anycwd(); chdir $dir or Carp::croak("Can't chdir to $dir: $!"); my $dh = DirHandle->new(File::Spec->curdir) or Carp::croak("Couldn't opendir $dir: $!"); @@ -1030,7 +1044,7 @@ EOF my($fh) = FileHandle->new; rename $configpm, "$configpm~" if -f $configpm; open $fh, ">$configpm" or - $CPAN::Frontend->mywarn("Couldn't open >$configpm: $!"); + $CPAN::Frontend->mydie("Couldn't open >$configpm: $!"); $fh->print(qq[$msg\$CPAN::Config = \{\n]); foreach (sort keys %$CPAN::Config) { $fh->print( @@ -1499,7 +1513,7 @@ sub _u_r_common { my(@result,$module,%seen,%need,$headerdone, $version_undefs,$version_zeroes); $version_undefs = $version_zeroes = 0; - my $sprintf = "%-25s %9s %9s %s\n"; + my $sprintf = "%s%-25s%s %9s %9s %s\n"; my @expand = $self->expand('Module',@args); my $expand = scalar @expand; if (0) { # Looks like noise to me, was very useful for debugging @@ -1555,15 +1569,31 @@ sub _u_r_common { unless ($headerdone++){ $CPAN::Frontend->myprint("\n"); $CPAN::Frontend->myprint(sprintf( - $sprintf, - "Package namespace", - "installed", - "latest", - "in CPAN file" - )); + $sprintf, + "", + "Package namespace", + "", + "installed", + "latest", + "in CPAN file" + )); } + my $color_on = ""; + my $color_off = ""; + if ( + $COLOR_REGISTERED + && + $CPAN::META->has_inst("Term::ANSIColor") + && + $module->{RO}{description} + ) { + $color_on = Term::ANSIColor::color("green"); + $color_off = Term::ANSIColor::color("reset"); + } $CPAN::Frontend->myprint(sprintf $sprintf, + $color_on, $module->id, + $color_off, $have, $latest, $file); @@ -2291,7 +2321,7 @@ sub hosthard { $self->debug("localizing funkyftpwise[$url]") if $CPAN::DEBUG; my($f,$funkyftp); - for $f ('lynx','ncftpget','ncftp') { + for $f ('lynx','ncftpget','ncftp','wget') { next unless exists $CPAN::Config->{$f}; $funkyftp = $CPAN::Config->{$f}; next unless defined $funkyftp; @@ -2304,6 +2334,8 @@ sub hosthard { $src_switch = " -source"; } elsif ($f eq "ncftp"){ $src_switch = " -c"; + } elsif ($f eq "wget"){ + $src_switch = " -O -"; } my($chdir) = ""; my($stdout_redir) = " > $asl_ungz"; @@ -2609,6 +2641,7 @@ sub new { }, $class; } +# CPAN::FTP::hasdefault; sub hasdefault { shift->{'hasdefault'} } sub netrc { shift->{'netrc'} } sub protected { shift->{'protected'} } @@ -2656,13 +2689,7 @@ sub cpl { } my @return; if ($pos == 0) { - @return = grep( - /^$word/, - sort qw( - ! a b d h i m o q r u autobundle clean dump - make test install force readme reload look cvs_import - ) - ); + @return = grep /^$word/, @CPAN::Complete::COMMANDS; } elsif ( $line !~ /^[\!abcdhimorutl]/ ) { @return = (); } elsif ($line =~ /^a\s/) { @@ -2681,6 +2708,9 @@ sub cpl { @return = cpl_reload($word,$line,$pos); } elsif ($line =~ /^o\s/) { @return = cpl_option($word,$line,$pos); + } elsif ($line =~ m/^\S+\s/ ) { + # fallback for future commands and what we have forgotten above + @return = (cplx('CPAN::Module',$word),cplx('CPAN::Bundle',$word)); } else { @return = (); } @@ -2757,7 +2787,15 @@ sub reload { for ($CPAN::Config->{index_expire}) { $_ = 0.001 unless $_ && $_ > 0.001; } - $CPAN::META->{PROTOCOL} ||= "1.0"; + unless (1 || $CPAN::Have_warned->{readmetadatacache}++) { + # debug here when CPAN doesn't seem to read the Metadata + require Carp; + Carp::cluck("META-PROTOCOL[$CPAN::META->{PROTOCOL}]"); + } + unless ($CPAN::META->{PROTOCOL}) { + $cl->read_metadata_cache; + $CPAN::META->{PROTOCOL} ||= "1.0"; + } if ( $CPAN::META->{PROTOCOL} < PROTOCOL ) { # warn "Setting last_time to 0"; $last_time = 0; # No warning necessary @@ -3047,7 +3085,7 @@ sub rd_modlist { Carp::confess($@) if $@; return if $CPAN::Signal; for (keys %$ret) { - my $obj = $CPAN::META->instance(CPAN::Module,$_); + my $obj = $CPAN::META->instance("CPAN::Module",$_); delete $ret->{$_}{modid}; # not needed here, maybe elsewhere $obj->set(%{$ret->{$_}}); return if $CPAN::Signal; @@ -3187,17 +3225,20 @@ sub as_string { # next if m/^(ID|RO)$/; my $extra = ""; if ($_ eq "CPAN_USERID") { - $extra .= " (".$self->author; - my $email; # old perls! - if ($email = $CPAN::META->instance(CPAN::Author, - $self->cpan_userid - )->email) { - $extra .= " <$email>"; - } else { - $extra .= " <no email>"; - } - $extra .= ")"; - } + $extra .= " (".$self->author; + my $email; # old perls! + if ($email = $CPAN::META->instance("CPAN::Author", + $self->cpan_userid + )->email) { + $extra .= " <$email>"; + } else { + $extra .= " <no email>"; + } + $extra .= ")"; + } elsif ($_ eq "FULLNAME") { # potential UTF-8 conversion + push @m, sprintf " %-12s %s\n", $_, $self->fullname; + next; + } next unless defined $self->{RO}{$_}; push @m, sprintf " %-12s %s%s\n", $_, $self->{RO}{$_}, $extra; } @@ -3221,7 +3262,7 @@ sub as_string { #-> sub CPAN::InfoObj::author ; sub author { my($self) = @_; - $CPAN::META->instance(CPAN::Author,$self->cpan_userid)->fullname; + $CPAN::META->instance("CPAN::Author",$self->cpan_userid)->fullname; } #-> sub CPAN::InfoObj::dump ; @@ -3244,7 +3285,13 @@ sub as_glimpse { } #-> sub CPAN::Author::fullname ; -sub fullname { shift->{RO}{FULLNAME} } +sub fullname { + my $fullname = shift->{RO}{FULLNAME}; + return $fullname unless $CPAN::Config->{term_is_latin}; + # courtesy jhi: + $fullname =~ s/([\xC0-\xDF])([\x80-\xBF])/chr(ord($1)<<6&0xC0|ord($2)&0x3F)/eg; + $fullname; +} *name = \&fullname; #-> sub CPAN::Author::email ; @@ -3300,15 +3347,16 @@ sub as_string { #-> sub CPAN::Distribution::containsmods ; sub containsmods { my $self = shift; - return if exists $self->{CONTAINSMODS}; + return keys %{$self->{CONTAINSMODS}} if exists $self->{CONTAINSMODS}; + my $dist_id = $self->{ID}; for my $mod ($CPAN::META->all_objects("CPAN::Module")) { my $mod_file = $mod->cpan_file or next; - my $dist_id = $self->{ID} or next; my $mod_id = $mod->{ID} or next; # warn "mod_file[$mod_file] dist_id[$dist_id] mod_id[$mod_id]"; # sleep 1; $self->{CONTAINSMODS}{$mod_id} = undef if $mod_file eq $dist_id; } + keys %{$self->{CONTAINSMODS}}; } #-> sub CPAN::Distribution::called_for ; @@ -3337,6 +3385,7 @@ sub get { ); $self->debug("Doing localize") if $CPAN::DEBUG; + my $CWD = CPAN::anycwd(); $local_file = CPAN::FTP->localize("authors/id/$self->{ID}", $local_wanted) or $CPAN::Frontend->mydie("Giving up on '$local_wanted'\n"); @@ -3374,11 +3423,14 @@ sub get { } else { $self->{archived} = "NO"; } - my $cwd = File::Spec->updir; - chdir $cwd or $CPAN::Frontend->mydie(qq{Could not chdir to "": $!}); + my $updir = File::Spec->updir; + unless (chdir $updir) { + my $cwd = CPAN::anycwd(); + $CPAN::Frontend->mydie(qq{Could not chdir from cwd[$cwd] to updir[$updir]: $!}); + } if ($self->{archived} ne 'NO') { - $cwd = File::Spec->catdir(File::Spec->curdir, "tmp"); - chdir $cwd or $CPAN::Frontend->mydie(qq{Could not chdir to "$cwd": $!}); + my $cwd = File::Spec->catdir(File::Spec->curdir, "tmp"); + chdir $cwd or $CPAN::Frontend->mydie(qq{Could not chdir to "$cwd": $!}); # Let's check if the package has its own directory. my $dh = DirHandle->new(File::Spec->curdir) or Carp::croak("Couldn't opendir .: $!"); @@ -3411,8 +3463,11 @@ sub get { } } $self->{'build_dir'} = $packagedir; - $cwd = File::Spec->updir; - chdir $cwd or $CPAN::Frontend->mydie(qq{Could not chdir to "$cwd": $!}); + chdir $updir; + unless (chdir $updir) { + my $cwd = CPAN::anycwd(); + $CPAN::Frontend->mydie(qq{Could not chdir from cwd[$cwd] to updir[$updir]: $!}); + } $self->debug("Changed directory to .. (self[$self]=[". $self->as_string."])") if $CPAN::DEBUG; @@ -3460,6 +3515,7 @@ WriteMakefile(NAME => q[$cf]); } } } + chdir $CWD or die "Could not chdir to $CWD: $!"; return $self; } @@ -3531,9 +3587,7 @@ Please define it with "o conf shell <your shell>" my $dist = $self->id; my $dir = $self->dir or $self->get; $dir = $self->dir; - my $getcwd; - $getcwd = $CPAN::Config->{'getcwd'} || 'cwd'; - my $pwd = CPAN->$getcwd(); + my $pwd = CPAN::anycwd(); chdir($dir) or $CPAN::Frontend->mydie(qq{Could not chdir to "$dir": $!}); $CPAN::Frontend->myprint(qq{Working directory is $dir\n}); system($CPAN::Config->{'shell'}) == 0 @@ -3567,9 +3621,7 @@ sub cvs_import { my @cmd = ('cvs', '-d', $cvs_root, 'import', '-m', $cvs_log, "$cvs_dir", $userid, "v$version"); - my $getcwd; - $getcwd = $CPAN::Config->{'getcwd'} || 'cwd'; - my $pwd = CPAN->$getcwd(); + my $pwd = CPAN::anycwd(); chdir($dir) or $CPAN::Frontend->mydie(qq{Could not chdir to "$dir": $!}); $CPAN::Frontend->myprint(qq{Working directory is $dir\n}); @@ -3824,8 +3876,7 @@ sub isa_perl { sub perl { my($self) = @_; my($perl) = MM->file_name_is_absolute($^X) ? $^X : ""; - my $getcwd = $CPAN::Config->{'getcwd'} || 'cwd'; - my $pwd = CPAN->$getcwd(); + my $pwd = CPAN::anycwd(); my $candidate = MM->catfile($pwd,$^X); $perl ||= $candidate if MM->maybe_command($candidate); unless ($perl) { @@ -4403,8 +4454,7 @@ sub find_bundle_file { my $manifest = MM->catfile($where,"MANIFEST"); unless (-f $manifest) { require ExtUtils::Manifest; - my $getcwd = $CPAN::Config->{'getcwd'} || 'cwd'; - my $cwd = CPAN->$getcwd(); + my $cwd = CPAN::anycwd(); chdir $where or $CPAN::Frontend->mydie(qq{Could not chdir to "$where": $!}); ExtUtils::Manifest::mkmanifest(); chdir $cwd or $CPAN::Frontend->mydie(qq{Could not chdir to "$cwd": $!}); @@ -4624,7 +4674,23 @@ sub as_glimpse { my(@m); my $class = ref($self); $class =~ s/^CPAN:://; - push @m, sprintf("%-15s %-15s (%s)\n", $class, $self->{ID}, + my $color_on = ""; + my $color_off = ""; + if ( + $CPAN::Shell::COLOR_REGISTERED + && + $CPAN::META->has_inst("Term::ANSIColor") + && + $self->{RO}{description} + ) { + $color_on = Term::ANSIColor::color("green"); + $color_off = Term::ANSIColor::color("reset"); + } + push @m, sprintf("%-15s %s%-15s%s (%s)\n", + $class, + $color_on, + $self->id, + $color_off, $self->cpan_file); join "", @m; } @@ -4689,8 +4755,41 @@ sub as_string { $stati{$self->{RO}{stati}} ) if $self->{RO}{statd}; my $local_file = $self->inst_file; - if ($local_file) { - $self->{MANPAGE} ||= $self->manpage_headline($local_file); + unless ($self->{MANPAGE}) { + if ($local_file) { + $self->{MANPAGE} = $self->manpage_headline($local_file); + } else { + # If we have already untarred it, we should look there + my $dist = $CPAN::META->instance('CPAN::Distribution', + $self->cpan_file); + # warn "dist[$dist]"; + # mff=manifest file; mfh=manifest handle + my($mff,$mfh); + if ($dist->{build_dir} and + -f ($mff = MM->catfile($dist->{build_dir}, "MANIFEST")) and + $mfh = FileHandle->new($mff) + ) { + # warn "mff[$mff]"; + my $lfre = $self->id; # local file RE + $lfre =~ s/::/./g; + $lfre .= "\\.pm\$"; + my($lfl); # local file file + local $/ = "\n"; + my(@mflines) = <$mfh>; + while (length($lfre)>5 and !$lfl) { + ($lfl) = grep /$lfre/, @mflines; + $lfre =~ s/.+?\.//; + # warn "lfl[$lfl]lfre[$lfre]"; + } + $lfl =~ s/\s.*//; # remove comments + $lfl =~ s/\s+//g; # chomp would maybe be too system-specific + my $lfl_abs = MM->catfile($dist->{build_dir},$lfl); + # warn "lfl_abs[$lfl_abs]"; + if (-f $lfl_abs) { + $self->{MANPAGE} = $self->manpage_headline($lfl_abs); + } + } + } } my($item); for $item (qw/MANPAGE/) { @@ -5333,6 +5432,10 @@ command completion. Once you are on the command line, type 'h' and the rest should be self-explanatory. +The function call C<shell> takes two optional arguments, one is the +prompt, the second is the default initial command line (the latter +only works if a real ReadLine interface module is installed). + The most common uses of the interactive modes are =over 2 @@ -5549,10 +5652,10 @@ all modules that need updating. First a quick and dirty way: perl -e 'use CPAN; CPAN::Shell->r;' -If you don't want to get any output if all modules are up to date, you -can parse the output of above command for the regular expression -//modules are up to date// and decide to mail the output only if it -doesn't match. Ick? +If you don't want to get any output in the case that all modules are +up to date, you can parse the output of above command for the regular +expression //modules are up to date// and decide to mail the output +only if it doesn't match. Ick? If you prefer to do it more in a programmer style in one single process, maybe something like this suites you better: @@ -5734,6 +5837,8 @@ defined: ('follow' automatically, 'ask' me, or 'ignore') scan_cache controls scanning of cache ('atstart' or 'never') tar location of external program tar + term_is_latin if true internal UTF-8 is translated to ISO-8859-1 + (and nonsense for characters outside latin range) unzip location of external program unzip urllist arrayref to nearby CPAN sites (or equivalent locations) wait_list arrayref to a wait server to try (See CPAN::WAIT) @@ -5952,7 +6057,22 @@ Because there are people who have their precise expectations about who may install where in the @INC path and who uses which @INC array. In fine tuned environments C<UNINST=1> can cause damage. -=item 3) When I install bundles or multiple modules with one command +=item 3) I want to clean up my mess, and install a new perl along with + all modules I have. How do I go about it? + +Run the autobundle command for your old perl and optionally rename the +resulting bundle file (e.g. Bundle/mybundle.pm), install the new perl +with the Configure option prefix, e.g. + + ./Configure -Dprefix=/usr/local/perl-5.6.78.9 + +Install the bundle file you produced in the first step with something like + + cpan> install Bundle::mybundle + +and you're done. + +=item 4) When I install bundles or multiple modules with one command there is too much output to keep track of You may want to configure something like @@ -5963,7 +6083,7 @@ You may want to configure something like so that STDOUT is captured in a file for later inspection. -=item 4) I am not root, how can I install a module in a personal +=item 5) I am not root, how can I install a module in a personal directory? You will most probably like something like this: @@ -5987,12 +6107,12 @@ or setting the PERL5LIB environment variable. Another thing you should bear in mind is that the UNINST parameter should never be set if you are not root. -=item 5) How to get a package, unwrap it, and make a change before +=item 6) How to get a package, unwrap it, and make a change before building it? look Sybase::Sybperl -=item 6) I installed a Bundle and had a couple of fails. When I +=item 7) I installed a Bundle and had a couple of fails. When I retried, everything resolved nicely. Can this be fixed to work on first try? @@ -6011,12 +6131,19 @@ definition file manually. It is planned to improve the metadata situation for dependencies on CPAN in general, but this will still take some time. -=item 7) In our intranet we have many modules for internal use. How +=item 8) In our intranet we have many modules for internal use. How can I integrate these modules with CPAN.pm but without uploading the modules to CPAN? Have a look at the CPAN::Site module. +=item 9) When I run CPAN's shell, I get error msg about line 1 to 4, + setting meta input/output via the /etc/inputrc file. + +I guess, /etc/inputrc interacts with Term::ReadLine somehow. Maybe +just remove /etc/inputrc or set the INPUTRC environment variable (see +the readline documentation). + =back =head1 BUGS diff --git a/lib/CPAN/FirstTime.pm b/lib/CPAN/FirstTime.pm index 9f8366e073..7560321ee1 100644 --- a/lib/CPAN/FirstTime.pm +++ b/lib/CPAN/FirstTime.pm @@ -16,7 +16,7 @@ use FileHandle (); use File::Basename (); use File::Path (); use vars qw($VERSION); -$VERSION = substr q$Revision: 1.46 $, 10; +$VERSION = substr q$Revision: 1.48 $, 10; =head1 NAME @@ -174,6 +174,9 @@ disable the cache scanning with 'never'. } while ($ans ne 'atstart' && $ans ne 'never'); $CPAN::Config->{scan_cache} = $ans; + # + # cache_metadata + # print qq{ To considerably speed up the initial CPAN shell startup, it is @@ -189,6 +192,30 @@ is not available, the normal index mechanism will be used. $CPAN::Config->{cache_metadata} = ($ans =~ /^\s*y/i ? 1 : 0); # + # term_is_latin + # + print qq{ + +The next option deals with the charset your terminal supports. In +general CPAN is English speaking territory, thus the charset does not +matter much, but some of the aliens out there who upload their +software to CPAN bear names that are outside the ASCII range. If your +terminal supports UTF-8, you say no to the next question, if it +supports ISO-8859-1 (also known as LATIN1) then you say yes, and if it +supports neither nor, your answer does not matter, you will not be +able to read the names of some authors anyway. If you answer no, nmes +will be output in UTF-8. + +}; + + defined($default = $CPAN::Config->{term_is_latin}) or $default = 1; + do { + $ans = prompt("Your terminal expects ISO-8859-1 (yes/no)?", + ($default ? 'yes' : 'no')); + } while ($ans !~ /^\s*[yn]/i); + $CPAN::Config->{term_is_latin} = ($ans =~ /^\s*y/i ? 1 : 0); + + # # prerequisites_policy # Do we follow PREREQ_PM? # @@ -216,10 +243,11 @@ policy to one of the three values. print qq{ -The CPAN module will need a few external programs to work -properly. Please correct me, if I guess the wrong path for a program. -Don\'t panic if you do not have some of them, just press ENTER for -those. +The CPAN module will need a few external programs to work properly. +Please correct me, if I guess the wrong path for a program. Don\'t +panic if you do not have some of them, just press ENTER for those. To +disable the use of a download program, you can type a space followed +by ENTER. }; @@ -228,7 +256,7 @@ those. my(@path) = split /$Config{'path_sep'}/, $ENV{'PATH'}; local $^W = $old_warn; my $progname; - for $progname (qw/gzip tar unzip make lynx ncftpget ncftp ftp/){ + for $progname (qw/gzip tar unzip make lynx wget ncftpget ncftp ftp/){ if ($^O eq 'MacOS') { $CPAN::Config->{$progname} = 'not_here'; next; diff --git a/lib/ExtUtils/Install.pm b/lib/ExtUtils/Install.pm index 92db8c908a..4a148a655e 100644 --- a/lib/ExtUtils/Install.pm +++ b/lib/ExtUtils/Install.pm @@ -394,4 +394,7 @@ of the hash to the corresponding values efficiently. Filenames with the extension pm are autosplit. Second argument is the autosplit directory. +You can have an environment variable PERL_INSTALL_ROOT set which will +be prepended as a directory to each installed file (and directory). + =cut diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 52862c598e..27839652fd 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -2455,6 +2455,7 @@ MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib} } unless ($libperl && -f $lperl) { # Ilya's code... my $dir = $self->{PERL_SRC} || "$self->{PERL_ARCHLIB}/CORE"; + $dir = "$self->{PERL_ARCHLIB}/.." if $self->{UNINSTALLED_PERL}; $libperl ||= "libperl$self->{LIB_EXT}"; $libperl = "$dir/$libperl"; $lperl ||= "libperl$self->{LIB_EXT}"; diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm index d966c7d236..377d5d124d 100644 --- a/lib/ExtUtils/MM_VMS.pm +++ b/lib/ExtUtils/MM_VMS.pm @@ -881,6 +881,11 @@ sub tool_xsubpp { unshift( @tmargs, $self->{XSOPT} ); } + if ($Config{'ldflags'} && + $Config{'ldflags'} =~ m!/Debug!i && + (!exists($self->{XSOPT}) || $self->{XSOPT} !~ /linenumbers/)) { + unshift(@tmargs,'-nolinenumbers'); + } my $xsubpp_version = $self->xsubpp_version($self->catfile($xsdir,'xsubpp')); # What are the correct thresholds for version 1 && 2 Paul? @@ -1209,7 +1214,7 @@ $(BASEEXT).opt : Makefile.PL s/.*[:>\/\]]//; # Trim off dir spec $upcase ? uc($_) : $_; } split ' ', $self->eliminate_macros($self->{OBJECT}); - my($tmp, @lines,$elt) = ''; + my($tmp,@lines,$elt) = ''; $tmp = shift @omods; foreach $elt (@omods) { $tmp .= ",$elt"; diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index bef12b54da..64f6986a4a 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -982,23 +982,39 @@ be perl Makefile.PL LIB=~/lib This will install the module's architecture-independent files into -~/lib, the architecture-dependent files into ~/lib/$archname/auto. +~/lib, the architecture-dependent files into ~/lib/$archname. Another way to specify many INSTALL directories with a single parameter is PREFIX. perl Makefile.PL PREFIX=~ -This will replace the string specified by $Config{prefix} in all -$Config{install*} values. +This will replace the string specified by C<$Config{prefix}> in all +C<$Config{install*}> values. Note, that in both cases the tilde expansion is done by MakeMaker, not -by perl by default, nor by make. Conflicts between parameters LIB, -PREFIX and the various INSTALL* arguments are resolved so that -XXX +by perl by default, nor by make. + +Conflicts between parameters LIB, +PREFIX and the various INSTALL* arguments are resolved so that: + +=over 4 + +=item * + +setting LIB overrides any setting of INSTALLPRIVLIB, INSTALLARCHLIB, +INSTALLSITELIB, INSTALLSITEARCH (and they are not affected by PREFIX); + +=item * + +without LIB, setting PREFIX replaces the initial C<$Config{prefix}> +part of those INSTALL* arguments, even if the latter are explicitly +set (but are set to still start with C<$Config{prefix}>). + +=back If the user has superuser privileges, and is not working on AFS -(Andrew File System) or relatives, then the defaults for +or relatives, then the defaults for INSTALLPRIVLIB, INSTALLARCHLIB, INSTALLSCRIPT, etc. will be appropriate, and this incantation will be the best: @@ -1145,11 +1161,6 @@ or as NAME=VALUE pairs on the command line: =over 2 -=item AUTHOR - -String containing name (and email address) of package author(s). Is used -in PPD (Perl Package Description) files for PPM (Perl Package Manager). - =item ABSTRACT One line description of the module. Will be included in PPD file. @@ -1160,6 +1171,11 @@ Name of the file that contains the package description. MakeMaker looks for a line in the POD matching /^($package\s-\s)(.*)/. This is typically the first line in the "=head1 NAME" section. $2 becomes the abstract. +=item AUTHOR + +String containing name (and email address) of package author(s). Is used +in PPD (Perl Package Description) files for PPM (Perl Package Manager). + =item BINARY_LOCATION Used when creating PPD files for binary packages. It can be set to a @@ -1409,11 +1425,6 @@ to INSTALLBIN during 'make install' Old name for INST_SCRIPT. Deprecated. Please use INST_SCRIPT if you need to use it. -=item INST_LIB - -Directory where we put library files of this extension while building -it. - =item INST_HTMLLIBDIR Directory to hold the man pages in HTML format at 'make' time @@ -1422,6 +1433,11 @@ Directory to hold the man pages in HTML format at 'make' time Directory to hold the man pages in HTML format at 'make' time +=item INST_LIB + +Directory where we put library files of this extension while building +it. + =item INST_MAN1DIR Directory to hold the man pages at 'make' time @@ -1437,34 +1453,6 @@ Directory, where executable files should be installed during testing. make install will copy the files in INST_SCRIPT to INSTALLSCRIPT. -=item PERL_MALLOC_OK - -defaults to 0. Should be set to TRUE if the extension can work with -the memory allocation routines substituted by the Perl malloc() subsystem. -This should be applicable to most extensions with exceptions of those - -=over - -=item * - -with bugs in memory allocations which are caught by Perl's malloc(); - -=item * - -which interact with the memory allocator in other ways than via -malloc(), realloc(), free(), calloc(), sbrk() and brk(); - -=item * - -which rely on special alignment which is not provided by Perl's malloc(). - -=back - -B<NOTE.> Negligence to set this flag in I<any one> of loaded extension -nullifies many advantages of Perl's malloc(), such as better usage of -system resources, error detection, memory usage reporting, catchable failure -of memory allocations, etc. - =item LDFROM defaults to "$(OBJECT)" and is used in the ld command to specify @@ -1473,8 +1461,12 @@ specify ld flags) =item LIB -LIB can only be set at C<perl Makefile.PL> time. It has the effect of +LIB should only be set at C<perl Makefile.PL> time but is allowed as a +MakeMaker argument. It has the effect of setting both INSTALLPRIVLIB and INSTALLSITELIB to that value regardless any +explicit setting of those arguments (or of PREFIX). +INSTALLARCHLIB and INSTALLSITEARCH are set to the corresponding +architecture subdirectory. =item LIBPERL_A @@ -1578,6 +1570,8 @@ List of object files, defaults to '$(BASEEXT)$(OBJ_EXT)', but can be a long string containing all object files, e.g. "tkpBind.o tkpButton.o tkpCanvas.o" +(Where BASEEXT is the last component of NAME, and OBJ_EXT is $Config{obj_ext}.) + =item OPTIMIZE Defaults to C<-O>. Set it to C<-g> to turn debugging on. The flag is @@ -1594,12 +1588,40 @@ to $(CC). =item PERL_ARCHLIB -Same as above for architecture dependent files. +Same as below, but for architecture dependent files. =item PERL_LIB Directory containing the Perl library to use. +=item PERL_MALLOC_OK + +defaults to 0. Should be set to TRUE if the extension can work with +the memory allocation routines substituted by the Perl malloc() subsystem. +This should be applicable to most extensions with exceptions of those + +=over 4 + +=item * + +with bugs in memory allocations which are caught by Perl's malloc(); + +=item * + +which interact with the memory allocator in other ways than via +malloc(), realloc(), free(), calloc(), sbrk() and brk(); + +=item * + +which rely on special alignment which is not provided by Perl's malloc(). + +=back + +B<NOTE.> Negligence to set this flag in I<any one> of loaded extension +nullifies many advantages of Perl's malloc(), such as better usage of +system resources, error detection, memory usage reporting, catchable failure +of memory allocations, etc. + =item PERL_SRC Directory containing the Perl source code (use of this should be @@ -1648,6 +1670,8 @@ they contain will be installed in the corresponding location in the library. A libscan() method can be used to alter the behaviour. Defining PM in the Makefile.PL will override PMLIBDIRS. +(Where BASEEXT is the last component of NAME.) + =item POLLUTE Release 5.005 grandfathered old global symbol names by providing preprocessor @@ -1725,6 +1749,7 @@ MakeMaker object. The following lines will be parsed o.k.: ( $VERSION ) = '$Revision: 1.222 $ ' =~ /\$Revision:\s+([^\s]+)/; $FOO::VERSION = '1.10'; *FOO::VERSION = \'1.11'; + our $VERSION = 1.2.3; # new for perl5.6.0 but these will fail: @@ -1732,6 +1757,8 @@ but these will fail: local $VERSION = '1.02'; local $FOO::VERSION = '1.30'; +(Putting C<my> or C<local> on the preceding line will work o.k.) + The file named in VERSION_FROM is not added as a dependency to Makefile. This is not really correct, but it would be a major pain during development to have to rewrite the Makefile for any smallish @@ -1786,6 +1813,8 @@ part of the Makefile. {ANY_TARGET => ANY_DEPENDECY, ...} +(ANY_TARGET must not be given a double-colon rule by MakeMaker.) + =item dist {TARFLAGS => 'cvfF', COMPRESS => 'gzip', SUFFIX => '.gz', diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm index c8f41c74bc..c06b393be3 100644 --- a/lib/ExtUtils/Mksymlists.pm +++ b/lib/ExtUtils/Mksymlists.pm @@ -49,6 +49,7 @@ sub Mksymlists { } if ($osname eq 'aix') { _write_aix(\%spec); } + elsif ($osname eq 'MacOS'){ _write_aix(\%spec) } elsif ($osname eq 'VMS') { _write_vms(\%spec) } elsif ($osname eq 'os2') { _write_os2(\%spec) } elsif ($osname eq 'MSWin32') { _write_win32(\%spec) } diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm index 4581e7e93c..243234403a 100644 --- a/lib/File/Basename.pm +++ b/lib/File/Basename.pm @@ -189,9 +189,13 @@ sub fileparse { } elsif ($fstype !~ /^VMS/i) { # default to Unix ($dirpath,$basename) = ($fullname =~ m#^(.*/)?(.*)#s); - if ($^O eq 'VMS' and $fullname =~ m:/[^/]+/000000/?:) { + if ($^O eq 'VMS' and $fullname =~ m:^(/[^/]+/000000(/|$))(.*):) { # dev:[000000] is top of VMS tree, similar to Unix '/' - ($basename,$dirpath) = ('',$fullname); + # so strip it off and treat the rest as "normal" + my $devspec = $1; + my $remainder = $3; + ($dirpath,$basename) = ($remainder =~ m#^(.*/)?(.*)#s); + $dirpath = $devspec.$dirpath; } $dirpath = './' unless $dirpath; } diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 46f360a461..8b0772d0e1 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -105,8 +105,8 @@ my $Is_VMS = $^O eq 'VMS'; # These OSes complain if you want to remove a file that you have no # write permission to: -my $force_writeable = ($^O eq 'os2' || $^O eq 'dos' || $^O eq 'MSWin32' - || $^O eq 'amigaos'); +my $force_writeable = ($^O eq 'os2' || $^O eq 'dos' || $^O eq 'MSWin32' || + $^O eq 'amigaos' || $^O eq 'MacOS'); sub mkpath { my($paths, $verbose, $mode) = @_; @@ -119,16 +119,19 @@ sub mkpath { my(@created,$path); foreach $path (@$paths) { $path .= '/' if $^O eq 'os2' and $path =~ /^\w:\z/s; # feature of CRT - next if -d $path; # Logic wants Unix paths, so go with the flow. - $path = VMS::Filespec::unixify($path) if $Is_VMS; - my $parent = File::Basename::dirname($path); - # Allow for creation of new logical filesystems under VMS - if (not $Is_VMS or $parent !~ m:/[^/]+/000000/?:) { - unless (-d $parent or $path eq $parent) { - push(@created,mkpath($parent, $verbose, $mode)); + if ($Is_VMS) { + next if $path eq '/'; + $path = VMS::Filespec::unixify($path); + if ($path =~ m:^(/[^/]+)/?\z:) { + $path = $1.'/000000'; } } + next if -d $path; + my $parent = File::Basename::dirname($path); + unless (-d $parent or $path eq $parent) { + push(@created,mkpath($parent, $verbose, $mode)); + } print "mkdir $path\n" if $verbose; unless (mkdir($path,$mode)) { my $e = $!; diff --git a/lib/Term/ReadLine.pm b/lib/Term/ReadLine.pm index 8bb820578a..fc78d7b6fa 100644 --- a/lib/Term/ReadLine.pm +++ b/lib/Term/ReadLine.pm @@ -169,12 +169,14 @@ sub ReadLine {'Term::ReadLine::Stub'} sub readline { my $self = shift; my ($in,$out,$str) = @$self; - print $out $rl_term_set[0], shift, $rl_term_set[1], $rl_term_set[2]; + my $prompt = shift; + print $out $rl_term_set[0], $prompt, $rl_term_set[1], $rl_term_set[2]; $self->register_Tk if not $Term::ReadLine::registered and $Term::ReadLine::toloop and defined &Tk::DoOneEvent; #$str = scalar <$in>; $str = $self->get_line; + $str =~ s/^\s*\Q$prompt\E// if ($^O eq 'MacOS'); print $out $rl_term_set[3]; # bug in 5.000: chomping empty string creats length -1: chomp $str if defined $str; @@ -185,7 +187,9 @@ sub addhistory {} sub findConsole { my $console; - if (-e "/dev/tty") { + if ($^O eq 'MacOS') { + $console = "Dev:Console"; + } elsif (-e "/dev/tty") { $console = "/dev/tty"; } elsif (-e "con" or $^O eq 'MSWin32') { $console = "con"; diff --git a/lib/Tie/Array.pm b/lib/Tie/Array.pm index e3b85d412e..f4c6193596 100644 --- a/lib/Tie/Array.pm +++ b/lib/Tie/Array.pm @@ -34,47 +34,43 @@ sub POP $val; } -sub SPLICE -{ - my $obj = shift; - my $sz = $obj->FETCHSIZE; - my $off = (@_) ? shift : 0; - $off += $sz if ($off < 0); - my $len = (@_) ? shift : $sz - $off; - my @result; - for (my $i = 0; $i < $len; $i++) - { - push(@result,$obj->FETCH($off+$i)); - } - if (@_ > $len) - { - # Move items up to make room - my $d = @_ - $len; - my $e = $off+$len; - $obj->EXTEND($sz+$d); - for (my $i=$sz-1; $i >= $e; $i--) - { - my $val = $obj->FETCH($i); - $obj->STORE($i+$d,$val); +sub SPLICE { + my $obj = shift; + my $sz = $obj->FETCHSIZE; + my $off = (@_) ? shift : 0; + $off += $sz if ($off < 0); + my $len = (@_) ? shift : $sz - $off; + $len += $sz - $off if $len < 0; + my @result; + for (my $i = 0; $i < $len; $i++) { + push(@result,$obj->FETCH($off+$i)); } - } - elsif (@_ < $len) - { - # Move items down to close the gap - my $d = $len - @_; - my $e = $off+$len; - for (my $i=$off+$len; $i < $sz; $i++) - { - my $val = $obj->FETCH($i); - $obj->STORE($i-$d,$val); + $off = $sz if $off > $sz; + $len -= $off + $len - $sz if $off + $len > $sz; + if (@_ > $len) { + # Move items up to make room + my $d = @_ - $len; + my $e = $off+$len; + $obj->EXTEND($sz+$d); + for (my $i=$sz-1; $i >= $e; $i--) { + my $val = $obj->FETCH($i); + $obj->STORE($i+$d,$val); + } } - $obj->STORESIZE($sz-$d); - } - for (my $i=0; $i < @_; $i++) - { - $obj->STORE($off+$i,$_[$i]); - } - return @result; + elsif (@_ < $len) { + # Move items down to close the gap + my $d = $len - @_; + my $e = $off+$len; + for (my $i=$off+$len; $i < $sz; $i++) { + my $val = $obj->FETCH($i); + $obj->STORE($i-$d,$val); + } + $obj->STORESIZE($sz-$d); + } + for (my $i=0; $i < @_; $i++) { + $obj->STORE($off+$i,$_[$i]); + } + return @result; } sub EXISTS { diff --git a/lib/lib_pm.PL b/lib/lib_pm.PL index bb02106058..66b4944de5 100644 --- a/lib/lib_pm.PL +++ b/lib/lib_pm.PL @@ -8,10 +8,30 @@ chdir dirname($0); my $file = basename($0, '.PL'); $file =~ s!_(pm)$!.$1!i; -my $Config_archname = defined($Config{'archname'}) ? $Config{'archname'} : ''; -my $Config_ver = defined($Config{'version'}) ? $Config{'version'} : ''; -my @Config_inc_version_list = defined($Config{'inc_version_list'}) ? - reverse split / /, $Config{'inc_version_list'} : (); +my $useConfig; +my $Config_archname; +my $Config_version; +my $Config_inc_version_list; + +# Expand the variables only if explicitly requested because +# otherwise relocating Perl becomes much harder. + +if ($ENV{PERL_BUILD_EXPAND_CONFIG_VARS}) { + $useConfig = ''; + $Config_archname = qq('$Config{archname}'); + $Config_version = qq('$Config{version}'); + my @Config_inc_version_list = + reverse split / /, $Config{inc_version_list}; + $Config_inc_version_list = + @Config_inc_version_list ? + qq(@Config_inc_version_list) : q(()); +} else { + $useConfig = 'use Config;'; + $Config_archname = q($Config{archname}); + $Config_version = q($Config{version}); + $Config_inc_version_list = + q(reverse split / /, qw($Config{inc_version_list})); +} open OUT,">$file" or die "Can't create $file: $!"; @@ -26,9 +46,11 @@ package lib; # THIS FILE IS AUTOMATICALLY GENERATED FROM lib_pm.PL. # ANY CHANGES TO THIS FILE WILL BE OVERWRITTEN BY THE NEXT PERL BUILD. -my \$archname = "$Config_archname"; -my \$ver = "$Config_ver"; -my \@inc_version_list = qw(@Config_inc_version_list); +$useConfig + +my \$archname = $Config_archname; +my \$version = $Config_version; +my \@inc_version_list = $Config_inc_version_list; !GROK!THIS! print OUT <<'!NO!SUBS!'; @@ -57,9 +79,9 @@ sub import { } # Put a corresponding archlib directory infront of $_ if it # looks like $_ has an archlib directory below it. - unshift(@INC, "$_/$archname") if -d "$_/$archname/auto"; - unshift(@INC, "$_/$ver") if -d "$_/$ver"; - unshift(@INC, "$_/$ver/$archname") if -d "$_/$ver/$archname"; + unshift(@INC, "$_/$archname") if -d "$_/$archname/auto"; + unshift(@INC, "$_/$version") if -d "$_/$version"; + unshift(@INC, "$_/$version/$archname") if -d "$_/$version/$archname"; } # remove trailing duplicates @@ -74,9 +96,9 @@ sub unimport { my %names; foreach (@_) { ++$names{$_}; - ++$names{"$_/$archname"} if -d "$_/$archname/auto"; - ++$names{"$_/$ver"} if -d "$_/$ver"; - ++$names{"$_/$ver/$archname"} if -d "$_/$ver/$archname"; + ++$names{"$_/$archname"} if -d "$_/$archname/auto"; + ++$names{"$_/$version"} if -d "$_/$version"; + ++$names{"$_/$version/$archname"} if -d "$_/$version/$archname"; } # Remove ALL instances of each named directory. diff --git a/lib/perl5db.pl b/lib/perl5db.pl index fb6d683f7d..836e5594d8 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -401,6 +401,12 @@ if ($notty) { $console = "/dev/tty"; } elsif ($^O eq 'dos' or -e "con" or $^O eq 'MSWin32') { $console = "con"; + } elsif ($^O eq 'MacOS') { + if ($MacPerl::Version !~ /MPW/) { + $console = "Dev:Console:Perl Debug"; # Separate window for application + } else { + $console = "Dev:Console"; + } } else { $console = "sys\$command"; } diff --git a/lib/strict.pm b/lib/strict.pm index 042227f967..8afb9a3792 100644 --- a/lib/strict.pm +++ b/lib/strict.pm @@ -37,6 +37,14 @@ use symbolic references (see L<perlref>). $file = "STDOUT"; print $file "Hi!"; # error; note: no comma after $file +There is one exception to this rule: + + $bar = \&{'foo'}; + &$bar; + +is allowed so that C<goto &$AUTOLOAD> would not break under stricture. + + =item C<strict vars> This generates a compile-time error if you access a variable that wasn't diff --git a/lib/unicode/Is/Alnum.pl b/lib/unicode/Is/Alnum.pl index 94f9a5c621..a0aac62938 100644 --- a/lib/unicode/Is/Alnum.pl +++ b/lib/unicode/Is/Alnum.pl @@ -6,13 +6,23 @@ return <<'END'; 0041 005a 0061 007a 00aa +00b2 00b3 00b5 -00ba +00b9 00ba +00bc 00be 00c0 00d6 00d8 00f6 00f8 021f 0222 0233 0250 02ad +02b0 02b8 +02bb 02c1 +02d0 02d1 +02e0 02e4 +02ee +0300 034e +0360 0362 +037a 0386 0388 038a 038c @@ -21,38 +31,57 @@ return <<'END'; 03d0 03d7 03da 03f3 0400 0481 +0483 0486 +0488 0489 048c 04c4 04c7 04c8 04cb 04cc 04d0 04f5 04f8 04f9 0531 0556 +0559 0561 0587 +0591 05a1 +05a3 05b9 +05bb 05bd +05bf +05c1 05c2 +05c4 05d0 05ea 05f0 05f2 0621 063a -0641 064a +0640 0655 0660 0669 -0671 06d3 -06d5 +0670 06d3 +06d5 06e8 +06ea 06ed 06f0 06fc -0710 -0712 072c -0780 07a5 +0710 072c +0730 074a +0780 07b0 +0901 0903 0905 0939 -093d -0950 -0958 0961 +093c 094d +0950 0954 +0958 0963 0966 096f +0981 0983 0985 098c 098f 0990 0993 09a8 09aa 09b0 09b2 09b6 09b9 +09bc +09be 09c4 +09c7 09c8 +09cb 09cd +09d7 09dc 09dd -09df 09e1 +09df 09e3 09e6 09f1 +09f4 09f9 +0a02 0a05 0a0a 0a0f 0a10 0a13 0a28 @@ -60,10 +89,14 @@ return <<'END'; 0a32 0a33 0a35 0a36 0a38 0a39 +0a3c +0a3e 0a42 +0a47 0a48 +0a4b 0a4d 0a59 0a5c 0a5e -0a66 0a6f -0a72 0a74 +0a66 0a74 +0a81 0a83 0a85 0a8b 0a8d 0a8f 0a91 @@ -71,20 +104,27 @@ return <<'END'; 0aaa 0ab0 0ab2 0ab3 0ab5 0ab9 -0abd +0abc 0ac5 +0ac7 0ac9 +0acb 0acd 0ad0 0ae0 0ae6 0aef +0b01 0b03 0b05 0b0c 0b0f 0b10 0b13 0b28 0b2a 0b30 0b32 0b33 0b36 0b39 -0b3d +0b3c 0b43 +0b47 0b48 +0b4b 0b4d +0b56 0b57 0b5c 0b5d 0b5f 0b61 0b66 0b6f +0b82 0b83 0b85 0b8a 0b8e 0b90 0b92 0b95 @@ -95,36 +135,60 @@ return <<'END'; 0ba8 0baa 0bae 0bb5 0bb7 0bb9 -0be7 0bef +0bbe 0bc2 +0bc6 0bc8 +0bca 0bcd +0bd7 +0be7 0bf2 +0c01 0c03 0c05 0c0c 0c0e 0c10 0c12 0c28 0c2a 0c33 0c35 0c39 +0c3e 0c44 +0c46 0c48 +0c4a 0c4d +0c55 0c56 0c60 0c61 0c66 0c6f +0c82 0c83 0c85 0c8c 0c8e 0c90 0c92 0ca8 0caa 0cb3 0cb5 0cb9 +0cbe 0cc4 +0cc6 0cc8 +0cca 0ccd +0cd5 0cd6 0cde 0ce0 0ce1 0ce6 0cef +0d02 0d03 0d05 0d0c 0d0e 0d10 0d12 0d28 0d2a 0d39 +0d3e 0d43 +0d46 0d48 +0d4a 0d4d +0d57 0d60 0d61 0d66 0d6f +0d82 0d83 0d85 0d96 0d9a 0db1 0db3 0dbb 0dbd 0dc0 0dc6 -0e01 0e30 -0e32 0e33 -0e40 0e45 +0dca +0dcf 0dd4 +0dd6 +0dd8 0ddf +0df2 0df3 +0e01 0e3a +0e40 0e4e 0e50 0e59 0e81 0e82 0e84 @@ -137,22 +201,33 @@ return <<'END'; 0ea5 0ea7 0eaa 0eab -0ead 0eb0 -0eb2 0eb3 -0ebd +0ead 0eb9 +0ebb 0ebd 0ec0 0ec4 +0ec6 +0ec8 0ecd 0ed0 0ed9 0edc 0edd 0f00 -0f20 0f29 -0f40 0f47 +0f18 0f19 +0f20 0f33 +0f35 +0f37 +0f39 +0f3e 0f47 0f49 0f6a -0f88 0f8b +0f71 0f84 +0f86 0f8b +0f90 0f97 +0f99 0fbc +0fc6 1000 1021 1023 1027 1029 102a +102c 1032 +1036 1039 1040 1049 -1050 1055 +1050 1059 10a0 10c5 10d0 10f6 1100 1159 @@ -183,18 +258,18 @@ return <<'END'; 1318 131e 1320 1346 1348 135a -1369 1371 +1369 137c 13a0 13f4 1401 166c 166f 1676 1681 169a 16a0 16ea -1780 17b3 +16ee 16f0 +1780 17d3 17e0 17e9 1810 1819 -1820 1842 -1844 1877 -1880 18a8 +1820 1877 +1880 18a9 1e00 1e9b 1ea0 1ef9 1f00 1f15 @@ -216,7 +291,10 @@ return <<'END'; 1fe0 1fec 1ff2 1ff4 1ff6 1ffc -207f +2070 +2074 2079 +207f 2089 +20d0 20e3 2102 2107 210a 2113 @@ -228,12 +306,25 @@ return <<'END'; 212a 212d 212f 2131 2133 2139 -3006 +2153 2183 +2460 249b +24ea +2776 2793 +3005 3007 +3021 302f +3031 3035 +3038 303a 3041 3094 +3099 309a +309d 309e 30a1 30fa +30fc 30fe 3105 312c 3131 318e +3192 3195 31a0 31b7 +3220 3229 +3280 3289 3400 4db5 4e00 9fa5 a000 a48c @@ -241,8 +332,7 @@ ac00 d7a3 f900 fa2d fb00 fb06 fb13 fb17 -fb1d -fb1f fb28 +fb1d fb28 fb2a fb36 fb38 fb3c fb3e @@ -253,15 +343,14 @@ fbd3 fd3d fd50 fd8f fd92 fdc7 fdf0 fdfb +fe20 fe23 fe70 fe72 fe74 fe76 fefc ff10 ff19 ff21 ff3a ff41 ff5a -ff66 ff6f -ff71 ff9d -ffa0 ffbe +ff66 ffbe ffc2 ffc7 ffca ffcf ffd2 ffd7 diff --git a/lib/unicode/Is/Alpha.pl b/lib/unicode/Is/Alpha.pl index de5046f9d4..13dc003c96 100644 --- a/lib/unicode/Is/Alpha.pl +++ b/lib/unicode/Is/Alpha.pl @@ -12,6 +12,14 @@ return <<'END'; 00f8 021f 0222 0233 0250 02ad +02b0 02b8 +02bb 02c1 +02d0 02d1 +02e0 02e4 +02ee +0300 034e +0360 0362 +037a 0386 0388 038a 038c @@ -20,36 +28,54 @@ return <<'END'; 03d0 03d7 03da 03f3 0400 0481 +0483 0486 +0488 0489 048c 04c4 04c7 04c8 04cb 04cc 04d0 04f5 04f8 04f9 0531 0556 +0559 0561 0587 +0591 05a1 +05a3 05b9 +05bb 05bd +05bf +05c1 05c2 +05c4 05d0 05ea 05f0 05f2 0621 063a -0641 064a -0671 06d3 -06d5 +0640 0655 +0670 06d3 +06d5 06e8 +06ea 06ed 06fa 06fc -0710 -0712 072c -0780 07a5 +0710 072c +0730 074a +0780 07b0 +0901 0903 0905 0939 -093d -0950 -0958 0961 +093c 094d +0950 0954 +0958 0963 +0981 0983 0985 098c 098f 0990 0993 09a8 09aa 09b0 09b2 09b6 09b9 +09bc +09be 09c4 +09c7 09c8 +09cb 09cd +09d7 09dc 09dd -09df 09e1 +09df 09e3 09f0 09f1 +0a02 0a05 0a0a 0a0f 0a10 0a13 0a28 @@ -57,9 +83,14 @@ return <<'END'; 0a32 0a33 0a35 0a36 0a38 0a39 +0a3c +0a3e 0a42 +0a47 0a48 +0a4b 0a4d 0a59 0a5c 0a5e -0a72 0a74 +0a70 0a74 +0a81 0a83 0a85 0a8b 0a8d 0a8f 0a91 @@ -67,18 +98,25 @@ return <<'END'; 0aaa 0ab0 0ab2 0ab3 0ab5 0ab9 -0abd +0abc 0ac5 +0ac7 0ac9 +0acb 0acd 0ad0 0ae0 +0b01 0b03 0b05 0b0c 0b0f 0b10 0b13 0b28 0b2a 0b30 0b32 0b33 0b36 0b39 -0b3d +0b3c 0b43 +0b47 0b48 +0b4b 0b4d +0b56 0b57 0b5c 0b5d 0b5f 0b61 +0b82 0b83 0b85 0b8a 0b8e 0b90 0b92 0b95 @@ -89,32 +127,56 @@ return <<'END'; 0ba8 0baa 0bae 0bb5 0bb7 0bb9 +0bbe 0bc2 +0bc6 0bc8 +0bca 0bcd +0bd7 +0c01 0c03 0c05 0c0c 0c0e 0c10 0c12 0c28 0c2a 0c33 0c35 0c39 +0c3e 0c44 +0c46 0c48 +0c4a 0c4d +0c55 0c56 0c60 0c61 +0c82 0c83 0c85 0c8c 0c8e 0c90 0c92 0ca8 0caa 0cb3 0cb5 0cb9 +0cbe 0cc4 +0cc6 0cc8 +0cca 0ccd +0cd5 0cd6 0cde 0ce0 0ce1 +0d02 0d03 0d05 0d0c 0d0e 0d10 0d12 0d28 0d2a 0d39 +0d3e 0d43 +0d46 0d48 +0d4a 0d4d +0d57 0d60 0d61 +0d82 0d83 0d85 0d96 0d9a 0db1 0db3 0dbb 0dbd 0dc0 0dc6 -0e01 0e30 -0e32 0e33 -0e40 0e45 +0dca +0dcf 0dd4 +0dd6 +0dd8 0ddf +0df2 0df3 +0e01 0e3a +0e40 0e4e 0e81 0e82 0e84 0e87 0e88 @@ -126,19 +188,30 @@ return <<'END'; 0ea5 0ea7 0eaa 0eab -0ead 0eb0 -0eb2 0eb3 -0ebd +0ead 0eb9 +0ebb 0ebd 0ec0 0ec4 +0ec6 +0ec8 0ecd 0edc 0edd 0f00 -0f40 0f47 +0f18 0f19 +0f35 +0f37 +0f39 +0f3e 0f47 0f49 0f6a -0f88 0f8b +0f71 0f84 +0f86 0f8b +0f90 0f97 +0f99 0fbc +0fc6 1000 1021 1023 1027 1029 102a -1050 1055 +102c 1032 +1036 1039 +1050 1059 10a0 10c5 10d0 10f6 1100 1159 @@ -174,10 +247,9 @@ return <<'END'; 166f 1676 1681 169a 16a0 16ea -1780 17b3 -1820 1842 -1844 1877 -1880 18a8 +1780 17d3 +1820 1877 +1880 18a9 1e00 1e9b 1ea0 1ef9 1f00 1f15 @@ -200,6 +272,7 @@ return <<'END'; 1ff2 1ff4 1ff6 1ffc 207f +20d0 20e3 2102 2107 210a 2113 @@ -211,9 +284,14 @@ return <<'END'; 212a 212d 212f 2131 2133 2139 -3006 +3005 3006 +302a 302f +3031 3035 3041 3094 +3099 309a +309d 309e 30a1 30fa +30fc 30fe 3105 312c 3131 318e 31a0 31b7 @@ -224,8 +302,7 @@ ac00 d7a3 f900 fa2d fb00 fb06 fb13 fb17 -fb1d -fb1f fb28 +fb1d fb28 fb2a fb36 fb38 fb3c fb3e @@ -236,14 +313,13 @@ fbd3 fd3d fd50 fd8f fd92 fdc7 fdf0 fdfb +fe20 fe23 fe70 fe72 fe74 fe76 fefc ff21 ff3a ff41 ff5a -ff66 ff6f -ff71 ff9d -ffa0 ffbe +ff66 ffbe ffc2 ffc7 ffca ffcf ffd2 ffd7 diff --git a/lib/unicode/Is/DCinital.pl b/lib/unicode/Is/DCmedial.pl index 8778a75ed5..8778a75ed5 100644 --- a/lib/unicode/Is/DCinital.pl +++ b/lib/unicode/Is/DCmedial.pl diff --git a/lib/unicode/Is/Graph.pl b/lib/unicode/Is/Graph.pl index 40d35067f6..238cc56229 100644 --- a/lib/unicode/Is/Graph.pl +++ b/lib/unicode/Is/Graph.pl @@ -3,7 +3,7 @@ # Any changes made here will be lost! return <<'END'; 0021 007e -00a0 021f +00a1 021f 0222 0233 0250 02ad 02b0 02ee @@ -239,7 +239,7 @@ return <<'END'; 1361 137c 13a0 13f4 1401 1676 -1680 169c +1681 169c 16a0 16f0 1780 17dc 17e0 17e9 @@ -265,10 +265,8 @@ return <<'END'; 1fdd 1fef 1ff2 1ff4 1ff6 1ffe -2000 2008 -200b -2010 2029 -202f 2046 +2010 2027 +2030 2046 2048 204d 2070 2074 208e @@ -304,7 +302,7 @@ return <<'END'; 2e9b 2ef3 2f00 2fd5 2ff0 2ffb -3000 303a +3001 303a 303e 303f 3041 3094 3099 309e @@ -330,6 +328,7 @@ a4b5 a4c0 a4c2 a4c4 a4c6 ac00 d7a3 +e000 f8ff f900 fa2d fb00 fb06 fb13 fb17 @@ -360,4 +359,6 @@ ffda ffdc ffe0 ffe6 ffe8 ffee fffc fffd +f0000 ffffd +100000 10fffd END diff --git a/lib/unicode/Is/Print.pl b/lib/unicode/Is/Print.pl index c3adba6c5c..1229a282b2 100644 --- a/lib/unicode/Is/Print.pl +++ b/lib/unicode/Is/Print.pl @@ -266,7 +266,7 @@ return <<'END'; 1ff2 1ff4 1ff6 1ffe 2000 200b -2010 2029 +2010 2027 202f 2046 2048 204d 2070 @@ -329,6 +329,7 @@ a4b5 a4c0 a4c2 a4c4 a4c6 ac00 d7a3 +e000 f8ff f900 fa2d fb00 fb06 fb13 fb17 @@ -359,4 +360,6 @@ ffda ffdc ffe0 ffe6 ffe8 ffee fffc fffd +f0000 ffffd +100000 10fffd END diff --git a/lib/unicode/Is/Punct.pl b/lib/unicode/Is/Punct.pl index 9e088bab85..97330ecd48 100644 --- a/lib/unicode/Is/Punct.pl +++ b/lib/unicode/Is/Punct.pl @@ -8,45 +8,45 @@ return <<'END'; 003a 003b 003f 0040 005b 005d -005f -007b -007d -00a1 -00ab -00ad -00b7 -00bb -00bf -037e -0387 +005f +007b +007d +00a1 +00ab +00ad +00b7 +00bb +00bf +037e +0387 055a 055f 0589 058a -05be -05c0 -05c3 +05be +05c0 +05c3 05f3 05f4 -060c -061b -061f +060c +061b +061f 066a 066d -06d4 +06d4 0700 070d 0964 0965 -0970 -0df4 -0e4f +0970 +0df4 +0e4f 0e5a 0e5b 0f04 0f12 0f3a 0f3d -0f85 +0f85 104a 104f -10fb +10fb 1361 1368 166d 166e 169b 169c 16eb 16ed 17d4 17da -17dc +17dc 1800 180a 2010 2027 2030 2043 @@ -58,14 +58,14 @@ return <<'END'; 3001 3003 3008 3011 3014 301f -3030 -30fb +3030 +30fb fd3e fd3f fe30 fe44 fe49 fe52 fe54 fe61 -fe63 -fe68 +fe63 +fe68 fe6a fe6b ff01 ff03 ff05 ff0a @@ -73,8 +73,8 @@ ff0c ff0f ff1a ff1b ff1f ff20 ff3b ff3d -ff3f -ff5b -ff5d +ff3f +ff5b +ff5d ff61 ff65 END diff --git a/lib/unicode/Is/Space.pl b/lib/unicode/Is/Space.pl index 1625dce03b..9971082fbe 100644 --- a/lib/unicode/Is/Space.pl +++ b/lib/unicode/Is/Space.pl @@ -3,12 +3,11 @@ # Any changes made here will be lost! return <<'END'; 0009 000d -0020 -0085 -00a0 -1680 +0020 +00a0 +1680 2000 200b 2028 2029 -202f -3000 +202f +3000 END diff --git a/lib/unicode/Is/Word.pl b/lib/unicode/Is/Word.pl index 1c76c60b78..6ea32e6099 100644 --- a/lib/unicode/Is/Word.pl +++ b/lib/unicode/Is/Word.pl @@ -7,13 +7,23 @@ return <<'END'; 005f 0061 007a 00aa +00b2 00b3 00b5 -00ba +00b9 00ba +00bc 00be 00c0 00d6 00d8 00f6 00f8 021f 0222 0233 0250 02ad +02b0 02b8 +02bb 02c1 +02d0 02d1 +02e0 02e4 +02ee +0300 034e +0360 0362 +037a 0386 0388 038a 038c @@ -22,38 +32,57 @@ return <<'END'; 03d0 03d7 03da 03f3 0400 0481 +0483 0486 +0488 0489 048c 04c4 04c7 04c8 04cb 04cc 04d0 04f5 04f8 04f9 0531 0556 +0559 0561 0587 +0591 05a1 +05a3 05b9 +05bb 05bd +05bf +05c1 05c2 +05c4 05d0 05ea 05f0 05f2 0621 063a -0641 064a +0640 0655 0660 0669 -0671 06d3 -06d5 +0670 06d3 +06d5 06e8 +06ea 06ed 06f0 06fc -0710 -0712 072c -0780 07a5 +0710 072c +0730 074a +0780 07b0 +0901 0903 0905 0939 -093d -0950 -0958 0961 +093c 094d +0950 0954 +0958 0963 0966 096f +0981 0983 0985 098c 098f 0990 0993 09a8 09aa 09b0 09b2 09b6 09b9 +09bc +09be 09c4 +09c7 09c8 +09cb 09cd +09d7 09dc 09dd -09df 09e1 +09df 09e3 09e6 09f1 +09f4 09f9 +0a02 0a05 0a0a 0a0f 0a10 0a13 0a28 @@ -61,10 +90,14 @@ return <<'END'; 0a32 0a33 0a35 0a36 0a38 0a39 +0a3c +0a3e 0a42 +0a47 0a48 +0a4b 0a4d 0a59 0a5c 0a5e -0a66 0a6f -0a72 0a74 +0a66 0a74 +0a81 0a83 0a85 0a8b 0a8d 0a8f 0a91 @@ -72,20 +105,27 @@ return <<'END'; 0aaa 0ab0 0ab2 0ab3 0ab5 0ab9 -0abd +0abc 0ac5 +0ac7 0ac9 +0acb 0acd 0ad0 0ae0 0ae6 0aef +0b01 0b03 0b05 0b0c 0b0f 0b10 0b13 0b28 0b2a 0b30 0b32 0b33 0b36 0b39 -0b3d +0b3c 0b43 +0b47 0b48 +0b4b 0b4d +0b56 0b57 0b5c 0b5d 0b5f 0b61 0b66 0b6f +0b82 0b83 0b85 0b8a 0b8e 0b90 0b92 0b95 @@ -96,36 +136,60 @@ return <<'END'; 0ba8 0baa 0bae 0bb5 0bb7 0bb9 -0be7 0bef +0bbe 0bc2 +0bc6 0bc8 +0bca 0bcd +0bd7 +0be7 0bf2 +0c01 0c03 0c05 0c0c 0c0e 0c10 0c12 0c28 0c2a 0c33 0c35 0c39 +0c3e 0c44 +0c46 0c48 +0c4a 0c4d +0c55 0c56 0c60 0c61 0c66 0c6f +0c82 0c83 0c85 0c8c 0c8e 0c90 0c92 0ca8 0caa 0cb3 0cb5 0cb9 +0cbe 0cc4 +0cc6 0cc8 +0cca 0ccd +0cd5 0cd6 0cde 0ce0 0ce1 0ce6 0cef +0d02 0d03 0d05 0d0c 0d0e 0d10 0d12 0d28 0d2a 0d39 +0d3e 0d43 +0d46 0d48 +0d4a 0d4d +0d57 0d60 0d61 0d66 0d6f +0d82 0d83 0d85 0d96 0d9a 0db1 0db3 0dbb 0dbd 0dc0 0dc6 -0e01 0e30 -0e32 0e33 -0e40 0e45 +0dca +0dcf 0dd4 +0dd6 +0dd8 0ddf +0df2 0df3 +0e01 0e3a +0e40 0e4e 0e50 0e59 0e81 0e82 0e84 @@ -138,22 +202,33 @@ return <<'END'; 0ea5 0ea7 0eaa 0eab -0ead 0eb0 -0eb2 0eb3 -0ebd +0ead 0eb9 +0ebb 0ebd 0ec0 0ec4 +0ec6 +0ec8 0ecd 0ed0 0ed9 0edc 0edd 0f00 -0f20 0f29 -0f40 0f47 +0f18 0f19 +0f20 0f33 +0f35 +0f37 +0f39 +0f3e 0f47 0f49 0f6a -0f88 0f8b +0f71 0f84 +0f86 0f8b +0f90 0f97 +0f99 0fbc +0fc6 1000 1021 1023 1027 1029 102a +102c 1032 +1036 1039 1040 1049 -1050 1055 +1050 1059 10a0 10c5 10d0 10f6 1100 1159 @@ -184,18 +259,18 @@ return <<'END'; 1318 131e 1320 1346 1348 135a -1369 1371 +1369 137c 13a0 13f4 1401 166c 166f 1676 1681 169a 16a0 16ea -1780 17b3 +16ee 16f0 +1780 17d3 17e0 17e9 1810 1819 -1820 1842 -1844 1877 -1880 18a8 +1820 1877 +1880 18a9 1e00 1e9b 1ea0 1ef9 1f00 1f15 @@ -217,7 +292,10 @@ return <<'END'; 1fe0 1fec 1ff2 1ff4 1ff6 1ffc -207f +2070 +2074 2079 +207f 2089 +20d0 20e3 2102 2107 210a 2113 @@ -229,12 +307,25 @@ return <<'END'; 212a 212d 212f 2131 2133 2139 -3006 +2153 2183 +2460 249b +24ea +2776 2793 +3005 3007 +3021 302f +3031 3035 +3038 303a 3041 3094 +3099 309a +309d 309e 30a1 30fa +30fc 30fe 3105 312c 3131 318e +3192 3195 31a0 31b7 +3220 3229 +3280 3289 3400 4db5 4e00 9fa5 a000 a48c @@ -242,8 +333,7 @@ ac00 d7a3 f900 fa2d fb00 fb06 fb13 fb17 -fb1d -fb1f fb28 +fb1d fb28 fb2a fb36 fb38 fb3c fb3e @@ -254,15 +344,14 @@ fbd3 fd3d fd50 fd8f fd92 fdc7 fdf0 fdfb +fe20 fe23 fe70 fe72 fe74 fe76 fefc ff10 ff19 ff21 ff3a ff41 ff5a -ff66 ff6f -ff71 ff9d -ffa0 ffbe +ff66 ffbe ffc2 ffc7 ffca ffcf ffd2 ffd7 diff --git a/lib/unicode/mktables.PL b/lib/unicode/mktables.PL index 37b6e84874..d8b57b6a83 100755 --- a/lib/unicode/mktables.PL +++ b/lib/unicode/mktables.PL @@ -16,18 +16,26 @@ mkdir "To", 0755; @todo = ( # typical - ['IsWord', '$cat =~ /^L[ulot]|^Nd/ or $code eq "005F"', ''], - ['IsAlnum', '$cat =~ /^L[ulot]|^Nd/', ''], - ['IsAlpha', '$cat =~ /^L[ulot]/', ''], - ['IsSpace', 'White space', $PropData], + # 005F: SPACING UNDERSCROE + ['IsWord', '$cat =~ /^[LMN]/ or $code eq "005F"', ''], + ['IsAlnum', '$cat =~ /^[LMN]/', ''], + ['IsAlpha', '$cat =~ /^[LM]/', ''], + # 0009: HORIZONTAL TABULATION + # 000A: LINE FEED + # 000B: VERTICAL TABULATION + # 000C: FORM FEED + # 000D: CARRIAGE RETURN + ['IsSpace', '$cat =~ /^Z/ || + $code =~ /^(0009|000A|000B|000C|000D)$/', ''], ['IsDigit', '$cat =~ /^Nd$/', ''], ['IsUpper', '$cat =~ /^L[ut]$/', ''], ['IsLower', '$cat =~ /^Ll$/', ''], - ['IsASCII', 'hex $code <= 127', ''], + ['IsASCII', '$code le "007f"', ''], ['IsCntrl', '$cat =~ /^C/', ''], - ['IsGraph', '$cat =~ /^[^C]/ and ($cat !~ /^Z/ and $code ne "0020" or chr(hex $code) !~ /^\s/)', ''], - ['IsPrint', '$cat =~ /^[^C]/', ''], - ['IsPunct', 'Punctuation', $PropData], + ['IsGraph', '$cat =~ /^([LMNPS]|Co)/', ''], + ['IsPrint', '$cat =~ /^([LMNPS]|Co|Zs)/', ''], + ['IsPunct', '$cat =~ /^P/', ''], + # 003[0-9]: DIGIT ZERO..NINE, 00[46][1-6]: A..F, a..f ['IsXDigit', '$code =~ /^00(3[0-9]|[46][1-6])$/', ''], ['ToUpper', '$up', '$up'], ['ToLower', '$down', '$down'], @@ -145,7 +153,7 @@ mkdir "To", 0755; ['IsDCfont', '$decomp =~ /^<font>/', ''], ['IsDCnoBreak', '$decomp =~ /^<noBreak>/', ''], ['IsDCinitial', '$decomp =~ /^<initial>/', ''], - ['IsDCinital', '$decomp =~ /^<medial>/', ''], + ['IsDCmedial', '$decomp =~ /^<medial>/', ''], ['IsDCfinal', '$decomp =~ /^<final>/', ''], ['IsDCisolated', '$decomp =~ /^<isolated>/', ''], ['IsDCcircle', '$decomp =~ /^<circle>/', ''], diff --git a/lib/vars.pm b/lib/vars.pm index 0ace55169c..39a15bd312 100644 --- a/lib/vars.pm +++ b/lib/vars.pm @@ -10,6 +10,7 @@ require 5.002; require Carp if $] < 5.00450; use warnings::register; +require strict; sub import { my $callpack = caller; @@ -26,6 +27,8 @@ sub import { Carp::croak("Can't declare individual elements of hash or array"); } elsif (warnings::enabled() and length($sym) == 1 and $sym !~ tr/a-zA-Z//) { warnings::warn("No need to declare built-in vars"); + } elsif ( $^H &= strict::bits('vars') ) { + Carp::croak("'$ch$sym' is not a valid variable name under strict vars"); } } *{"${callpack}::$sym"} = |