summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/lib
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2002-03-16 20:14:30 +0000
committermarkm <markm@FreeBSD.org>2002-03-16 20:14:30 +0000
commitb878a8b4fc512ca76116a7012802d385208857c3 (patch)
tree40ba760f36cd8e65b8c0a8caeaee00ceb84de622 /contrib/perl5/lib
parent96faff292d8b1b0bfcebddfb2f70f375ad79fec7 (diff)
parent3eac21f49bc763a6c0044b4afbc0c7ece760144f (diff)
downloadFreeBSD-src-b878a8b4fc512ca76116a7012802d385208857c3.zip
FreeBSD-src-b878a8b4fc512ca76116a7012802d385208857c3.tar.gz
This commit was generated by cvs2svn to compensate for changes in r92442,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/perl5/lib')
-rw-r--r--contrib/perl5/lib/AutoLoader.pm32
-rw-r--r--contrib/perl5/lib/AutoSplit.pm39
-rw-r--r--contrib/perl5/lib/Benchmark.pm5
-rw-r--r--contrib/perl5/lib/CPAN.pm3966
-rw-r--r--contrib/perl5/lib/CPAN/FirstTime.pm188
-rw-r--r--contrib/perl5/lib/Carp/Heavy.pm14
-rw-r--r--contrib/perl5/lib/Class/Struct.pm44
-rw-r--r--contrib/perl5/lib/English.pm4
-rw-r--r--contrib/perl5/lib/ExtUtils/Command.pm2
-rw-r--r--contrib/perl5/lib/ExtUtils/Embed.pm55
-rw-r--r--contrib/perl5/lib/ExtUtils/MM_Cygwin.pm2
-rw-r--r--contrib/perl5/lib/ExtUtils/MM_OS2.pm16
-rw-r--r--contrib/perl5/lib/ExtUtils/MM_VMS.pm49
-rw-r--r--contrib/perl5/lib/ExtUtils/MM_Win32.pm4
-rw-r--r--contrib/perl5/lib/ExtUtils/Manifest.pm91
-rw-r--r--contrib/perl5/lib/ExtUtils/Mksymlists.pm1
-rw-r--r--contrib/perl5/lib/ExtUtils/typemap6
-rwxr-xr-xcontrib/perl5/lib/ExtUtils/xsubpp96
-rw-r--r--contrib/perl5/lib/File/Basename.pm20
-rw-r--r--contrib/perl5/lib/File/Copy.pm33
-rw-r--r--contrib/perl5/lib/File/Find.pm98
-rw-r--r--contrib/perl5/lib/File/Path.pm39
-rw-r--r--contrib/perl5/lib/File/Spec.pm5
-rw-r--r--contrib/perl5/lib/File/Spec/Functions.pm4
-rw-r--r--contrib/perl5/lib/File/Spec/Mac.pm61
-rw-r--r--contrib/perl5/lib/File/Spec/OS2.pm5
-rw-r--r--contrib/perl5/lib/File/Spec/Unix.pm46
-rw-r--r--contrib/perl5/lib/File/Spec/VMS.pm69
-rw-r--r--contrib/perl5/lib/File/Spec/Win32.pm86
-rw-r--r--contrib/perl5/lib/FileHandle.pm6
-rw-r--r--contrib/perl5/lib/Getopt/Long.pm429
-rw-r--r--contrib/perl5/lib/IPC/Open3.pm31
-rw-r--r--contrib/perl5/lib/Math/BigFloat.pm84
-rw-r--r--contrib/perl5/lib/Math/BigInt.pm27
-rw-r--r--contrib/perl5/lib/Math/Complex.pm429
-rw-r--r--contrib/perl5/lib/Math/Trig.pm43
-rw-r--r--contrib/perl5/lib/Net/Ping.pm36
-rw-r--r--contrib/perl5/lib/Net/protoent.pm3
-rw-r--r--contrib/perl5/lib/Pod/Checker.pm113
-rw-r--r--contrib/perl5/lib/Pod/Find.pm307
-rw-r--r--contrib/perl5/lib/Pod/Functions.pm2
-rw-r--r--contrib/perl5/lib/Pod/Html.pm12
-rw-r--r--contrib/perl5/lib/Pod/InputObjects.pm68
-rw-r--r--contrib/perl5/lib/Pod/Man.pm314
-rw-r--r--contrib/perl5/lib/Pod/ParseUtils.pm114
-rw-r--r--contrib/perl5/lib/Pod/Parser.pm11
-rw-r--r--contrib/perl5/lib/Pod/Select.pm24
-rw-r--r--contrib/perl5/lib/Pod/Text.pm190
-rw-r--r--contrib/perl5/lib/Pod/Text/Color.pm9
-rw-r--r--contrib/perl5/lib/Pod/Text/Termcap.pm9
-rw-r--r--contrib/perl5/lib/Pod/Usage.pm29
-rw-r--r--contrib/perl5/lib/SelfLoader.pm5
-rw-r--r--contrib/perl5/lib/Shell.pm73
-rw-r--r--contrib/perl5/lib/Symbol.pm11
-rw-r--r--contrib/perl5/lib/Term/ANSIColor.pm124
-rw-r--r--contrib/perl5/lib/Term/ReadLine.pm8
-rw-r--r--contrib/perl5/lib/Test.pm21
-rw-r--r--contrib/perl5/lib/Test/Harness.pm96
-rw-r--r--contrib/perl5/lib/Text/ParseWords.pm6
-rw-r--r--contrib/perl5/lib/Text/Soundex.pm2
-rw-r--r--contrib/perl5/lib/Text/Tabs.pm8
-rw-r--r--contrib/perl5/lib/Text/Wrap.pm87
-rw-r--r--contrib/perl5/lib/Tie/Array.pm160
-rw-r--r--contrib/perl5/lib/Tie/Handle.pm26
-rw-r--r--contrib/perl5/lib/Tie/Hash.pm3
-rw-r--r--contrib/perl5/lib/Tie/RefHash.pm50
-rw-r--r--contrib/perl5/lib/Tie/Scalar.pm3
-rw-r--r--contrib/perl5/lib/Tie/SubstrHash.pm65
-rw-r--r--contrib/perl5/lib/base.pm2
-rw-r--r--contrib/perl5/lib/bigint.pl31
-rw-r--r--contrib/perl5/lib/bytes.pm27
-rw-r--r--contrib/perl5/lib/charnames.pm15
-rwxr-xr-xcontrib/perl5/lib/diagnostics.pm98
-rw-r--r--contrib/perl5/lib/fields.pm3
-rw-r--r--contrib/perl5/lib/ftp.pl2
-rw-r--r--contrib/perl5/lib/getopts.pl65
-rw-r--r--contrib/perl5/lib/integer.pm89
-rw-r--r--contrib/perl5/lib/lib.pm3
-rw-r--r--contrib/perl5/lib/overload.pm198
-rw-r--r--contrib/perl5/lib/perl5db.pl81
-rw-r--r--contrib/perl5/lib/strict.pm8
-rw-r--r--contrib/perl5/lib/syslog.pl2
-rw-r--r--contrib/perl5/lib/termcap.pl2
-rw-r--r--contrib/perl5/lib/unicode/ArabLink.pl9
-rw-r--r--contrib/perl5/lib/unicode/ArabLnkGrp.pl5
-rw-r--r--contrib/perl5/lib/unicode/ArabShap.txt35
-rw-r--r--contrib/perl5/lib/unicode/Bidirectional.pl4
-rw-r--r--contrib/perl5/lib/unicode/Block.pl2
-rw-r--r--contrib/perl5/lib/unicode/Category.pl4
-rw-r--r--contrib/perl5/lib/unicode/CombiningClass.pl2
-rw-r--r--contrib/perl5/lib/unicode/CompExcl.txt6
-rw-r--r--contrib/perl5/lib/unicode/Decomposition.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/AlphabeticPresentationForms.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Arabic.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/ArabicPresentationForms-A.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/ArabicPresentationForms-B.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Armenian.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Arrows.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/BasicLatin.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Bengali.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/BlockElements.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Bopomofo.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/BopomofoExtended.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/BoxDrawing.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/BraillePatterns.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/CJKCompatibility.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/CJKCompatibilityForms.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/CJKCompatibilityIdeographs.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/CJKRadicalsSupplement.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/CJKSymbolsandPunctuation.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/CJKUnifiedIdeographs.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/CJKUnifiedIdeographsExtensionA.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Cherokee.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/CombiningDiacriticalMarks.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/CombiningHalfMarks.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/CombiningMarksforSymbols.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/ControlPictures.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/CurrencySymbols.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Cyrillic.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Devanagari.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Dingbats.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/EnclosedAlphanumerics.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/EnclosedCJKLettersandMonths.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Ethiopic.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/GeneralPunctuation.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/GeometricShapes.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Georgian.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Greek.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/GreekExtended.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Gujarati.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Gurmukhi.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/HalfwidthandFullwidthForms.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/HangulCompatibilityJamo.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/HangulJamo.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/HangulSyllables.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Hebrew.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/HighPrivateUseSurrogates.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/HighSurrogates.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Hiragana.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/IPAExtensions.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/IdeographicDescriptionCharacters.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Kanbun.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/KangxiRadicals.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Kannada.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Katakana.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Khmer.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Lao.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Latin-1Supplement.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/LatinExtended-A.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/LatinExtended-B.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/LatinExtendedAdditional.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/LetterlikeSymbols.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/LowSurrogates.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Malayalam.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/MathematicalOperators.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/MiscellaneousSymbols.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/MiscellaneousTechnical.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Mongolian.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Myanmar.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/NumberForms.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Ogham.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/OpticalCharacterRecognition.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Oriya.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/PrivateUse.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Runic.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Sinhala.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/SmallFormVariants.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/SpacingModifierLetters.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Specials.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/SuperscriptsandSubscripts.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Syriac.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Tamil.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Telugu.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Thaana.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Thai.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/Tibetan.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/UnifiedCanadianAboriginalSyllabics.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/YiRadicals.pl2
-rw-r--r--contrib/perl5/lib/unicode/In/YiSyllables.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/ASCII.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Alnum.pl184
-rw-r--r--contrib/perl5/lib/unicode/Is/Alpha.pl159
-rw-r--r--contrib/perl5/lib/unicode/Is/BidiAN.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/BidiB.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/BidiCS.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/BidiEN.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/BidiES.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/BidiET.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/BidiL.pl4
-rw-r--r--contrib/perl5/lib/unicode/Is/BidiON.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/BidiR.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/BidiS.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/BidiWS.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/C.pl4
-rw-r--r--contrib/perl5/lib/unicode/Is/Cc.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Cn.pl370
-rw-r--r--contrib/perl5/lib/unicode/Is/Cntrl.pl4
-rw-r--r--contrib/perl5/lib/unicode/Is/Co.pl4
-rw-r--r--contrib/perl5/lib/unicode/Is/DCcircle.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DCcompat.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DCfinal.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DCfont.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DCinitial.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DCisolated.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DCnarrow.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DCnoBreak.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DCsmall.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DCsquare.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DCsub.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DCsuper.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DCvertical.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DCwide.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DecoCanon.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/DecoCompat.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Digit.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Graph.pl16
-rw-r--r--contrib/perl5/lib/unicode/Is/L.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Ll.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Lm.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Lo.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Lower.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Lt.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Lu.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/M.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Mc.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Mirrored.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Mn.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/N.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Nd.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/No.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/P.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Pd.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Pe.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Po.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Print.pl7
-rw-r--r--contrib/perl5/lib/unicode/Is/Ps.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Punct.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/S.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Sc.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Sm.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/So.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Space.pl5
-rw-r--r--contrib/perl5/lib/unicode/Is/SylA.pl155
-rw-r--r--contrib/perl5/lib/unicode/Is/SylC.pl67
-rw-r--r--contrib/perl5/lib/unicode/Is/SylE.pl144
-rw-r--r--contrib/perl5/lib/unicode/Is/SylI.pl151
-rw-r--r--contrib/perl5/lib/unicode/Is/SylO.pl154
-rw-r--r--contrib/perl5/lib/unicode/Is/SylU.pl119
-rw-r--r--contrib/perl5/lib/unicode/Is/SylV.pl51
-rw-r--r--contrib/perl5/lib/unicode/Is/SylWA.pl46
-rw-r--r--contrib/perl5/lib/unicode/Is/SylWC.pl10
-rw-r--r--contrib/perl5/lib/unicode/Is/SylWE.pl20
-rw-r--r--contrib/perl5/lib/unicode/Is/SylWI.pl19
-rw-r--r--contrib/perl5/lib/unicode/Is/SylWV.pl8
-rw-r--r--contrib/perl5/lib/unicode/Is/Upper.pl19
-rw-r--r--contrib/perl5/lib/unicode/Is/Word.pl184
-rw-r--r--contrib/perl5/lib/unicode/Is/XDigit.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Z.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Zl.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Zp.pl2
-rw-r--r--contrib/perl5/lib/unicode/Is/Zs.pl2
-rw-r--r--contrib/perl5/lib/unicode/Jamo.txt158
-rw-r--r--contrib/perl5/lib/unicode/JamoShort.pl136
-rw-r--r--contrib/perl5/lib/unicode/Makefile3
-rw-r--r--contrib/perl5/lib/unicode/Name.pl4
-rw-r--r--contrib/perl5/lib/unicode/Number.pl48
-rw-r--r--contrib/perl5/lib/unicode/ReadMe.txt40
-rw-r--r--contrib/perl5/lib/unicode/SpecCase.txt37
-rw-r--r--contrib/perl5/lib/unicode/To/Digit.pl2
-rw-r--r--contrib/perl5/lib/unicode/To/Lower.pl2
-rw-r--r--contrib/perl5/lib/unicode/To/Title.pl2
-rw-r--r--contrib/perl5/lib/unicode/To/Upper.pl2
-rwxr-xr-xcontrib/perl5/lib/unicode/mktables.PL174
-rw-r--r--contrib/perl5/lib/unicode/syllables.txt2658
-rw-r--r--contrib/perl5/lib/utf8.pm11
-rw-r--r--contrib/perl5/lib/vars.pm6
-rw-r--r--contrib/perl5/lib/warnings.pm187
-rw-r--r--contrib/perl5/lib/warnings/register.pm8
278 files changed, 9956 insertions, 4529 deletions
diff --git a/contrib/perl5/lib/AutoLoader.pm b/contrib/perl5/lib/AutoLoader.pm
index 8fd7d3b..ad6bc40 100644
--- a/contrib/perl5/lib/AutoLoader.pm
+++ b/contrib/perl5/lib/AutoLoader.pm
@@ -4,15 +4,19 @@ use 5.005_64;
our(@EXPORT, @EXPORT_OK, $VERSION);
my $is_dosish;
+my $is_epoc;
my $is_vms;
+my $is_macos;
BEGIN {
require Exporter;
@EXPORT = @EXPORT = ();
@EXPORT_OK = @EXPORT_OK = qw(AUTOLOAD);
$is_dosish = $^O eq 'dos' || $^O eq 'os2' || $^O eq 'MSWin32';
+ $is_epoc = $^O eq 'epoc';
$is_vms = $^O eq 'VMS';
- $VERSION = '5.57';
+ $is_macos = $^O eq 'MacOS';
+ $VERSION = '5.58';
}
AUTOLOAD {
@@ -36,7 +40,12 @@ AUTOLOAD {
my ($pkg,$func) = ($sub =~ /(.*)::([^:]+)$/);
$pkg =~ s#::#/#g;
if (defined($filename = $INC{"$pkg.pm"})) {
- $filename =~ s#^(.*)$pkg\.pm\z#$1auto/$pkg/$func.al#s;
+ if ($is_macos) {
+ $pkg =~ tr#/#:#;
+ $filename =~ s#^(.*)$pkg\.pm\z#$1auto:$pkg:$func.al#s;
+ } else {
+ $filename =~ s#^(.*)$pkg\.pm\z#$1auto/$pkg/$func.al#s;
+ }
# if the file exists, then make sure that it is a
# a fully anchored path (i.e either '/usr/lib/auto/foo/bar.al',
@@ -51,11 +60,15 @@ AUTOLOAD {
$filename = "./$filename";
}
}
- elsif ($is_vms) {
+ elsif ($is_epoc) {
+ unless ($filename =~ m{^([a-z?]:)?[\\/]}is) {
+ $filename = "./$filename";
+ }
+ }elsif ($is_vms) {
# XXX todo by VMSmiths
$filename = "./$filename";
}
- else {
+ elsif (!$is_macos) {
$filename = "./$filename";
}
}
@@ -140,6 +153,11 @@ sub import {
}
}
+sub unimport {
+ my $callpkg = caller;
+ eval "package $callpkg; sub AUTOLOAD;";
+}
+
1;
__END__
@@ -259,6 +277,12 @@ the package namespace. Variables pre-declared with this pragma will be
visible to any autoloaded routines (but will not be invisible outside
the package, unfortunately).
+=head2 Not Using AutoLoader
+
+You can stop using AutoLoader by simply
+
+ no AutoLoader;
+
=head2 B<AutoLoader> vs. B<SelfLoader>
The B<AutoLoader> is similar in purpose to B<SelfLoader>: both delay the
diff --git a/contrib/perl5/lib/AutoSplit.pm b/contrib/perl5/lib/AutoSplit.pm
index 0be3ae6..8fcf528 100644
--- a/contrib/perl5/lib/AutoSplit.pm
+++ b/contrib/perl5/lib/AutoSplit.pm
@@ -6,6 +6,7 @@ use Config qw(%Config);
use Carp qw(carp);
use File::Basename ();
use File::Path qw(mkpath);
+use File::Spec::Functions qw(curdir catfile);
use strict;
our($VERSION, @ISA, @EXPORT, @EXPORT_OK, $Verbose, $Keep, $Maxlen,
$CheckForAutoloader, $CheckModTime);
@@ -173,16 +174,23 @@ sub autosplit_lib_modules{
my(@modules) = @_; # list of Module names
while(defined($_ = shift @modules)){
- s#::#/#g; # incase specified as ABC::XYZ
+ while (m#(.*?[^:])::([^:].*)#) { # in case specified as ABC::XYZ
+ $_ = catfile($1, $2);
+ }
s|\\|/|g; # bug in ksh OS/2
s#^lib/##s; # incase specified as lib/*.pm
+ my($lib) = catfile(curdir(), "lib");
+ if ($Is_VMS) { # may need to convert VMS-style filespecs
+ $lib =~ s#^\[\]#.\/#;
+ }
+ s#^$lib\W+##s; # incase specified as ./lib/*.pm
if ($Is_VMS && /[:>\]]/) { # may need to convert VMS-style filespecs
my ($dir,$name) = (/(.*])(.*)/s);
$dir =~ s/.*lib[\.\]]//s;
$dir =~ s#[\.\]]#/#g;
$_ = $dir . $name;
}
- autosplit_file("lib/$_", "lib/auto",
+ autosplit_file(catfile($lib, $_), catfile($lib, "auto"),
$Keep, $CheckForAutoloader, $CheckModTime);
}
0;
@@ -199,7 +207,7 @@ sub autosplit_file {
local($/) = "\n";
# where to write output files
- $autodir ||= "lib/auto";
+ $autodir ||= catfile(curdir(), "lib", "auto");
if ($Is_VMS) {
($autodir = VMS::Filespec::unixpath($autodir)) =~ s|/\z||;
$filename = VMS::Filespec::unixify($filename); # may have dirs
@@ -245,6 +253,9 @@ sub autosplit_file {
$def_package or die "Can't find 'package Name;' in $filename\n";
my($modpname) = _modpname($def_package);
+ if ($Is_VMS) {
+ $modpname = VMS::Filespec::unixify($modpname); # may have dirs
+ }
# this _has_ to match so we have a reasonable timestamp file
die "Package $def_package ($modpname.pm) does not ".
@@ -253,7 +264,7 @@ sub autosplit_file {
($^O eq 'dos') or ($^O eq 'MSWin32') or
$Is_VMS && $filename =~ m/$modpname.pm/i);
- my($al_idx_file) = "$autodir/$modpname/$IndexFile";
+ my($al_idx_file) = catfile($autodir, $modpname, $IndexFile);
if ($check_mod_time){
my($al_ts_time) = (stat("$al_idx_file"))[9] || 1;
@@ -264,11 +275,12 @@ sub autosplit_file {
}
}
- print "AutoSplitting $filename ($autodir/$modpname)\n"
+ my($modnamedir) = catfile($autodir, $modpname);
+ print "AutoSplitting $filename ($modnamedir)\n"
if $Verbose;
- unless (-d "$autodir/$modpname"){
- mkpath("$autodir/$modpname",0,0777);
+ unless (-d $modnamedir){
+ mkpath($modnamedir,0,0777);
}
# We must try to deal with some SVR3 systems with a limit of 14
@@ -311,9 +323,10 @@ sub autosplit_file {
push(@subnames, $fq_subname);
my($lname, $sname) = ($subname, substr($subname,0,$maxflen-3));
$modpname = _modpname($this_package);
- mkpath("$autodir/$modpname",0,0777);
- my($lpath) = "$autodir/$modpname/$lname.al";
- my($spath) = "$autodir/$modpname/$sname.al";
+ my($modnamedir) = catfile($autodir, $modpname);
+ mkpath($modnamedir,0,0777);
+ my($lpath) = catfile($modnamedir, "$lname.al");
+ my($spath) = catfile($modnamedir, "$sname.al");
my $path;
if (!$Is83 and open(OUT, ">$lpath")){
$path=$lpath;
@@ -379,7 +392,7 @@ EOT
opendir(OUTDIR,$dir);
foreach (sort readdir(OUTDIR)){
next unless /\.al\z/;
- my($file) = "$dir/$_";
+ my($file) = catfile($dir, $_);
$file = lc $file if $Is83 or $Is_VMS;
next if $outfiles{$file};
print " deleting $file\n" if ($Verbose>=2);
@@ -418,7 +431,9 @@ sub _modpname ($) {
if ($^O eq 'MSWin32') {
$modpname =~ s#::#\\#g;
} else {
- $modpname =~ s#::#/#g;
+ while ($modpname =~ m#(.*?[^:])::([^:].*)#) {
+ $modpname = catfile($1, $2);
+ }
}
$modpname;
}
diff --git a/contrib/perl5/lib/Benchmark.pm b/contrib/perl5/lib/Benchmark.pm
index 3c10a5b..b557be3 100644
--- a/contrib/perl5/lib/Benchmark.pm
+++ b/contrib/perl5/lib/Benchmark.pm
@@ -552,7 +552,9 @@ sub countit {
# accuracy since we're not couting these times.
$n = int( $tpra * 1.05 * $n / $tc ); # Linear approximation.
my $td = timeit($n, $code);
- $tc = $td->[1] + $td->[2];
+ my $new_tc = $td->[1] + $td->[2];
+ # Make sure we are making progress.
+ $tc = $new_tc > 1.2 * $tc ? $new_tc : 1.2 * $tc;
}
# Now, do the 'for real' timing(s), repeating until we exceed
@@ -581,6 +583,7 @@ sub countit {
$ttot = $utot + $stot;
last if $ttot >= $tmax;
+ $ttot = 0.01 if $ttot < 0.01;
my $r = $tmax / $ttot - 1; # Linear approximation.
$n = int( $r * $ntot );
$n = $nmin if $n < $nmin;
diff --git a/contrib/perl5/lib/CPAN.pm b/contrib/perl5/lib/CPAN.pm
index 84dfd31..fdaadb3 100644
--- a/contrib/perl5/lib/CPAN.pm
+++ b/contrib/perl5/lib/CPAN.pm
@@ -1,18 +1,11 @@
+# -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-
package CPAN;
-use vars qw{$Try_autoload
- $Revision
- $META $Signal $Cwd $End
- $Suppress_readline %Dontload
- $Frontend $Defaultsite
- }; #};
-
-$VERSION = '1.52';
-
-# $Id: CPAN.pm,v 1.276 2000/01/08 15:29:46 k Exp $
+$VERSION = '1.59_54';
+# $Id: CPAN.pm,v 1.385 2001/02/09 21:37:57 k Exp $
# only used during development:
$Revision = "";
-# $Revision = "[".substr(q$Revision: 1.276 $, 10)."]";
+# $Revision = "[".substr(q$Revision: 1.385 $, 10)."]";
use Carp ();
use Config ();
@@ -29,6 +22,8 @@ use Safe ();
use Text::ParseWords ();
use Text::Wrap;
use File::Spec;
+no lib "."; # we need to run chdir all over and we would get at wrong
+ # libraries there
END { $End++; &cleanup; }
@@ -47,6 +42,8 @@ END { $End++; &cleanup; }
Eval 2048
Config 4096
Tarzip 8192
+ Version 16384
+ Queue 32768
];
$CPAN::DEBUG ||= 0;
@@ -55,9 +52,12 @@ $CPAN::Frontend ||= "CPAN::Shell";
$CPAN::Defaultsite ||= "ftp://ftp.perl.org/pub/CPAN";
package CPAN;
-use vars qw($VERSION @EXPORT $AUTOLOAD $DEBUG $META $term);
use strict qw(vars);
+use vars qw($VERSION @EXPORT $AUTOLOAD $DEBUG $META $HAS_USABLE $term
+ $Revision $Signal $End $Suppress_readline $Frontend
+ $Defaultsite $Have_warned);
+
@CPAN::ISA = qw(CPAN::Debug Exporter);
@EXPORT = qw(
@@ -75,12 +75,6 @@ sub AUTOLOAD {
if (exists $EXPORT{$l}){
CPAN::Shell->$l(@_);
} else {
- my $ok = CPAN::Shell->try_dot_al($AUTOLOAD);
- if ($ok) {
- goto &$AUTOLOAD;
-# } else {
-# $CPAN::Frontend->mywarn("Could not autoload $AUTOLOAD");
- }
$CPAN::Frontend->mywarn(qq{Unknown command "$AUTOLOAD". }.
qq{Type ? for help.
});
@@ -93,22 +87,24 @@ sub shell {
$Suppress_readline = ! -t STDIN unless defined $Suppress_readline;
CPAN::Config->load unless $CPAN::Config_loaded++;
- my $prompt = "cpan> ";
+ my $oprompt = shift || "cpan> ";
+ my $prompt = $oprompt;
+ my $commandline = shift || "";
+
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';
@@ -121,38 +117,42 @@ sub shell {
select $odef;
}
- no strict;
+ # 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" :
($term->ReadLine ne "Term::ReadLine::Stub") ? "enabled" :
- "available (try ``install Bundle::CPAN'')";
+ "available (try 'install Bundle::CPAN')";
$CPAN::Frontend->myprint(
- qq{
-cpan shell -- CPAN exploration and modules installation (v$CPAN::VERSION$CPAN::Revision)
-ReadLine support $rl_avail
+ sprintf qq{
+cpan shell -- CPAN exploration and modules installation (v%s%s)
+ReadLine support %s
-}) unless $CPAN::Config->{'inhibit_startup_message'} ;
+},
+ $CPAN::VERSION,
+ $CPAN::Revision,
+ $rl_avail
+ )
+ unless $CPAN::Config->{'inhibit_startup_message'} ;
my($continuation) = "";
- while () {
+ SHELLCOMMAND: while () {
if ($Suppress_readline) {
print $prompt;
- last unless defined ($_ = <> );
+ last SHELLCOMMAND unless defined ($_ = <> );
chomp;
} else {
- last unless defined ($_ = $term->readline($prompt));
+ last SHELLCOMMAND unless
+ defined ($_ = $term->readline($prompt, $commandline));
}
$_ = "$continuation$_" if $continuation;
s/^\s+//;
- next if /^$/;
+ next SHELLCOMMAND if /^$/;
$_ = 'h' if /^\s*\?/;
if (/^(?:q(?:uit)?|bye|exit)$/i) {
- last;
+ last SHELLCOMMAND;
} elsif (s/\\$//s) {
chomp;
$continuation = $_;
@@ -167,25 +167,30 @@ ReadLine support $rl_avail
eval($eval);
warn $@ if $@;
$continuation = "";
- $prompt = "cpan> ";
+ $prompt = $oprompt;
} elsif (/./) {
my(@line);
if ($] < 5.00322) { # parsewords had a bug until recently
@line = split;
} else {
eval { @line = Text::ParseWords::shellwords($_) };
- warn($@), next if $@;
+ warn($@), next SHELLCOMMAND if $@;
+ warn("Text::Parsewords could not parse the line [$_]"),
+ next SHELLCOMMAND unless @line;
}
$CPAN::META->debug("line[".join("|",@line)."]") if $CPAN::DEBUG;
my $command = shift @line;
eval { CPAN::Shell->$command(@line) };
warn $@ if $@;
- chdir $cwd;
+ 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) {
@@ -194,15 +199,17 @@ ReadLine support $rl_avail
$CPAN::META->has_inst("Term::ReadLine::Perl")
) {
delete $INC{"Term/ReadLine.pm"};
- my $redef;
- local($SIG{__WARN__}) = CPAN::Shell::dotdot_onreload(\$redef);
+ my $redef = 0;
+ local($SIG{__WARN__}) = CPAN::Shell::paintdots_onreload(\$redef);
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;
@@ -210,7 +217,6 @@ package CPAN::CacheMgr;
use File::Find;
package CPAN::Config;
-import ExtUtils::MakeMaker 'neatvalue';
use vars qw(%can $dot_cpan);
%can = (
@@ -223,14 +229,25 @@ package CPAN::FTP;
use vars qw($Ua $Thesite $Themethod);
@CPAN::FTP::ISA = qw(CPAN::Debug);
+package CPAN::LWP::UserAgent;
+use vars qw(@ISA $USER $PASSWD $SETUPDONE);
+# we delay requiring LWP::UserAgent and setting up inheritence until we need it
+
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 ls
+) unless @CPAN::Complete::COMMANDS;
package CPAN::Index;
-use vars qw($last_time $date_of_03);
+use vars qw($LAST_TIME $DATE_OF_02 $DATE_OF_03);
@CPAN::Index::ISA = qw(CPAN::Debug);
-$last_time ||= 0;
-$date_of_03 ||= 0;
+$LAST_TIME ||= 0;
+$DATE_OF_03 ||= 0;
+# use constant PROTOCOL => "2.0"; # outcommented to avoid warning on upgrade from 1.57
+sub PROTOCOL { 2.0 }
package CPAN::InfoObj;
@CPAN::InfoObj::ISA = qw(CPAN::Debug);
@@ -248,8 +265,10 @@ package CPAN::Module;
@CPAN::Module::ISA = qw(CPAN::InfoObj);
package CPAN::Shell;
-use vars qw($AUTOLOAD $redef @ISA);
+use vars qw($AUTOLOAD @ISA $COLOR_REGISTERED $ADVANCED_QUERY $PRINT_ORNAMENTING);
@CPAN::Shell::ISA = qw(CPAN::Debug);
+$COLOR_REGISTERED ||= 0;
+$PRINT_ORNAMENTING ||= 0;
#-> sub CPAN::Shell::AUTOLOAD ;
sub AUTOLOAD {
@@ -269,89 +288,16 @@ For this you just need to type
});
}
} else {
- my $ok = CPAN::Shell->try_dot_al($AUTOLOAD);
- if ($ok) {
- goto &$AUTOLOAD;
-# } else {
-# $CPAN::Frontend->mywarn("Could not autoload $autoload");
- }
$CPAN::Frontend->mywarn(qq{Unknown command '$autoload'. }.
qq{Type ? for help.
});
}
}
-#-> CPAN::Shell::try_dot_al
-sub try_dot_al {
- my($class,$autoload) = @_;
- return unless $CPAN::Try_autoload;
- # I don't see how to re-use that from the AutoLoader...
- my($name,$ok);
- # Braces used to preserve $1 et al.
- {
- my ($pkg,$func) = $autoload =~ /(.*)::([^:]+)$/;
- $pkg =~ s|::|/|g;
- if (defined($name=$INC{"$pkg.pm"}))
- {
- $name =~ s|^(.*)$pkg\.pm\z|$1auto/$pkg/$func.al|s;
- $name = undef unless (-r $name);
- }
- unless (defined $name)
- {
- $name = "auto/$autoload.al";
- $name =~ s|::|/|g;
- }
- }
- my $save = $@;
- eval {local $SIG{__DIE__};require $name};
- if ($@) {
- if (substr($autoload,-9) eq '::DESTROY') {
- *$autoload = sub {};
- $ok = 1;
- } else {
- if ($name =~ s{(\w{12,})\.al\z}{substr($1,0,11).".al"}e){
- eval {local $SIG{__DIE__};require $name};
- }
- if ($@){
- $@ =~ s/ at .*\n//;
- Carp::croak $@;
- } else {
- $ok = 1;
- }
- }
- } else {
-
- $ok = 1;
-
- }
- $@ = $save;
-# my $lm = Carp::longmess();
-# warn "ok[$ok] autoload[$autoload] longmess[$lm]"; # debug
- return $ok;
-}
-
-#### autoloader is experimental
-#### to try it we have to set $Try_autoload and uncomment
-#### the use statement and uncomment the __END__ below
-#### You also need AutoSplit 1.01 available. MakeMaker will
-#### then build CPAN with all the AutoLoad stuff.
-# use AutoLoader;
-# $Try_autoload = 1;
-
-if ($CPAN::Try_autoload) {
- my $p;
- for $p (qw(
- CPAN::Author CPAN::Bundle CPAN::CacheMgr CPAN::Complete
- CPAN::Config CPAN::Debug CPAN::Distribution CPAN::FTP
- CPAN::FTP::netrc CPAN::Index CPAN::InfoObj CPAN::Module
- )) {
- *{"$p\::AUTOLOAD"} = \&AutoLoader::AUTOLOAD;
- }
-}
-
package CPAN::Tarzip;
-use vars qw($AUTOLOAD @ISA);
+use vars qw($AUTOLOAD @ISA $BUGHUNTING);
@CPAN::Tarzip::ISA = qw(CPAN::Debug);
+$BUGHUNTING = 0; # released code must have turned off
package CPAN::Queue;
@@ -402,70 +348,81 @@ package CPAN::Queue;
use vars qw{ @All };
+# CPAN::Queue::new ;
sub new {
- my($class,$mod) = @_;
- my $self = bless {mod => $mod}, $class;
+ my($class,$s) = @_;
+ my $self = bless { qmod => $s }, $class;
push @All, $self;
- # my @all = map { $_->{mod} } @All;
- # warn "Adding Queue object for mod[$mod] all[@all]";
return $self;
}
+# CPAN::Queue::first ;
sub first {
my $obj = $All[0];
- $obj->{mod};
+ $obj->{qmod};
}
+# CPAN::Queue::delete_first ;
sub delete_first {
my($class,$what) = @_;
my $i;
for my $i (0..$#All) {
- if ( $All[$i]->{mod} eq $what ) {
+ if ( $All[$i]->{qmod} eq $what ) {
splice @All, $i, 1;
return;
}
}
}
+# CPAN::Queue::jumpqueue ;
sub jumpqueue {
- my $class = shift;
- my @what = @_;
- my $obj;
+ my $class = shift;
+ my @what = @_;
+ CPAN->debug(sprintf("before jumpqueue All[%s] what[%s]",
+ join(",",map {$_->{qmod}} @All),
+ join(",",@what)
+ )) if $CPAN::DEBUG;
WHAT: for my $what (reverse @what) {
- my $jumped = 0;
- for (my $i=0; $i<$#All;$i++) { #prevent deep recursion
- if ($All[$i]->{mod} eq $what){
- $jumped++;
- if ($jumped > 100) { # one's OK if e.g. just processing now;
- # more are OK if user typed it several
- # times
- $CPAN::Frontend->mywarn(
+ my $jumped = 0;
+ for (my $i=0; $i<$#All;$i++) { #prevent deep recursion
+ CPAN->debug("i[$All[$i]]what[$what]") if $CPAN::DEBUG;
+ if ($All[$i]->{qmod} eq $what){
+ $jumped++;
+ if ($jumped > 100) { # one's OK if e.g. just
+ # processing now; more are OK if
+ # user typed it several times
+ $CPAN::Frontend->mywarn(
qq{Object [$what] queued more than 100 times, ignoring}
);
- next WHAT;
- }
- }
+ next WHAT;
+ }
+ }
+ }
+ my $obj = bless { qmod => $what }, $class;
+ unshift @All, $obj;
}
- my $obj = bless { mod => $what }, $class;
- unshift @All, $obj;
- }
+ CPAN->debug(sprintf("after jumpqueue All[%s] what[%s]",
+ join(",",map {$_->{qmod}} @All),
+ join(",",@what)
+ )) if $CPAN::DEBUG;
}
+# CPAN::Queue::exists ;
sub exists {
my($self,$what) = @_;
- my @all = map { $_->{mod} } @All;
- my $exists = grep { $_->{mod} eq $what } @All;
- # warn "Checking exists in Queue object for mod[$what] all[@all] exists[$exists]";
+ my @all = map { $_->{qmod} } @All;
+ my $exists = grep { $_->{qmod} eq $what } @All;
+ # warn "in exists what[$what] all[@all] exists[$exists]";
$exists;
}
+# CPAN::Queue::delete ;
sub delete {
my($self,$mod) = @_;
- @All = grep { $_->{mod} ne $mod } @All;
- # my @all = map { $_->{mod} } @All;
- # warn "Deleting Queue object for mod[$mod] all[@all]";
+ @All = grep { $_->{qmod} ne $mod } @All;
}
+# CPAN::Queue::nullify_queue ;
sub nullify_queue {
@All = ();
}
@@ -476,44 +433,31 @@ package CPAN;
$META ||= CPAN->new; # In case we re-eval ourselves we need the ||
-1;
+# from here on only subs.
+################################################################################
-# __END__ # uncomment this and AutoSplit version 1.01 will split it
-
-#-> sub CPAN::autobundle ;
-sub autobundle;
-#-> sub CPAN::bundle ;
-sub bundle;
-#-> sub CPAN::expand ;
-sub expand;
-#-> sub CPAN::force ;
-sub force;
-#-> sub CPAN::install ;
-sub install;
-#-> sub CPAN::make ;
-sub make;
-#-> sub CPAN::clean ;
-sub clean;
-#-> sub CPAN::test ;
-sub test;
-
-#-> sub CPAN::all ;
+#-> sub CPAN::all_objects ;
sub all_objects {
my($mgr,$class) = @_;
CPAN::Config->load unless $CPAN::Config_loaded++;
CPAN->debug("mgr[$mgr] class[$class]") if $CPAN::DEBUG;
CPAN::Index->reload;
- values %{ $META->{$class} };
+ values %{ $META->{readwrite}{$class} }; # unsafe meta access, ok
}
*all = \&all_objects;
-# Called by shell, not in batch mode. Not clean XXX
+# Called by shell, not in batch mode. In batch mode I see no risk in
+# having many processes updating something as installations are
+# continually checked at runtime. In shell mode I suspect it is
+# unintentional to open more than one shell at a time
+
#-> sub CPAN::checklock ;
sub checklock {
my($self) = @_;
my $lockfile = MM->catfile($CPAN::Config->{cpan_home},".lock");
if (-f $lockfile && -M _ > 0) {
- my $fh = FileHandle->new($lockfile);
+ my $fh = FileHandle->new($lockfile) or
+ $CPAN::Frontend->mydie("Could not open $lockfile: $!");
my $other = <$fh>;
$fh->close;
if (defined $other && $other) {
@@ -545,7 +489,11 @@ You may want to kill it and delete the lockfile, maybe. On UNIX try:
qq{ and then rerun us.\n}
);
}
- }
+ } else {
+ $CPAN::Frontend->mydie(sprintf("CPAN.pm panic: Lockfile $lockfile ".
+ "reports other process with ID ".
+ "$other. Cannot proceed.\n"));
+ }
}
my $dotcpan = $CPAN::Config->{cpan_home};
eval { File::Path::mkpath($dotcpan);};
@@ -610,11 +558,11 @@ or
$fh->print($$, "\n");
$self->{LOCK} = $lockfile;
$fh->close;
- $SIG{'TERM'} = sub {
+ $SIG{TERM} = sub {
&cleanup;
$CPAN::Frontend->mydie("Got SIGTERM, leaving");
};
- $SIG{'INT'} = sub {
+ $SIG{INT} = sub {
# no blocks!!!
&cleanup if $Signal;
$CPAN::Frontend->mydie("Got another SIGINT") if $Signal;
@@ -642,7 +590,8 @@ or
#
# Larry
- $SIG{'__DIE__'} = \&cleanup;
+ # global backstop to cleanup if we should really die
+ $SIG{__DIE__} = \&cleanup;
$self->debug("Signal handler set.") if $CPAN::DEBUG;
}
@@ -651,6 +600,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();}
@@ -660,16 +616,55 @@ 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 ||= "";
- exists $META->{$class}{$id};
+ exists $META->{readonly}{$class}{$id} or
+ exists $META->{readwrite}{$class}{$id}; # unsafe meta access, ok
}
#-> sub CPAN::delete ;
sub delete {
my($mgr,$class,$id) = @_;
- delete $META->{$class}{$id};
+ delete $META->{readonly}{$class}{$id}; # unsafe meta access, ok
+ delete $META->{readwrite}{$class}{$id}; # unsafe meta access, ok
+}
+
+#-> sub CPAN::has_usable
+# has_inst is sometimes too optimistic, we should replace it with this
+# has_usable whenever a case is given
+sub has_usable {
+ my($self,$mod,$message) = @_;
+ return 1 if $HAS_USABLE->{$mod};
+ my $has_inst = $self->has_inst($mod,$message);
+ return unless $has_inst;
+ my $usable;
+ $usable = {
+ LWP => [ # we frequently had "Can't locate object
+ # method "new" via package "LWP::UserAgent" at
+ # (eval 69) line 2006
+ sub {require LWP},
+ sub {require LWP::UserAgent},
+ sub {require HTTP::Request},
+ sub {require URI::URL},
+ ],
+ Net::FTP => [
+ sub {require Net::FTP},
+ sub {require Net::Config},
+ ]
+ };
+ if ($usable->{$mod}) {
+ for my $c (0..$#{$usable->{$mod}}) {
+ my $code = $usable->{$mod}[$c];
+ my $ret = eval { &$code() };
+ if ($@) {
+ warn "DEBUG: c[$c]\$\@[$@]ret[$ret]";
+ return;
+ }
+ }
+ }
+ return $HAS_USABLE->{$mod} = 1;
}
#-> sub CPAN::has_inst
@@ -677,11 +672,14 @@ sub has_inst {
my($self,$mod,$message) = @_;
Carp::croak("CPAN->has_inst() called without an argument")
unless defined $mod;
- if (defined $message && $message eq "no") {
- $Dontload{$mod}||=1;
- return 0;
- } elsif (exists $Dontload{$mod}) {
- return 0;
+ if (defined $message && $message eq "no"
+ ||
+ exists $CPAN::META->{dontload_hash}{$mod} # unsafe meta access, ok
+ ||
+ exists $CPAN::Config->{dontload_hash}{$mod}
+ ) {
+ $CPAN::META->{dontload_hash}{$mod}||=1; # unsafe meta access, ok
+ return 0;
}
my $file = $mod;
my $obj;
@@ -707,13 +705,13 @@ sub has_inst {
}
return 1;
} elsif ($mod eq "Net::FTP") {
- warn qq{
+ $CPAN::Frontend->mywarn(qq{
Please, install Net::FTP as soon as possible. CPAN.pm installs it for you
if you just type
install Bundle::libnet
-};
- sleep 2;
+}) unless $Have_warned->{"Net::FTP"}++;
+ sleep 3;
} elsif ($mod eq "MD5"){
$CPAN::Frontend->myprint(qq{
CPAN: MD5 security checks disabled because MD5 not installed.
@@ -732,7 +730,9 @@ sub instance {
my($mgr,$class,$id) = @_;
CPAN::Index->reload;
$id ||= "";
- $META->{$class}{$id} ||= $class->new(ID => $id );
+ # unsafe meta access, ok?
+ return $META->{readwrite}{$class}{$id} if exists $META->{readwrite}{$class}{$id};
+ $META->{readwrite}{$class}{$id} ||= $class->new(ID => $id);
}
#-> sub CPAN::new ;
@@ -760,9 +760,9 @@ sub cleanup {
}
}
return if $ineval && !$End;
- return unless defined $META->{'LOCK'};
- return unless -f $META->{'LOCK'};
- unlink $META->{'LOCK'};
+ return unless defined $META->{LOCK}; # unsafe meta access, ok
+ return unless -f $META->{LOCK}; # unsafe meta access, ok
+ unlink $META->{LOCK}; # unsafe meta access, ok
# require Carp;
# Carp::cluck("DEBUGGING");
$CPAN::Frontend->mywarn("Lockfile removed.\n");
@@ -785,6 +785,7 @@ sub cachesize {
shift->{DU};
}
+#-> sub CPAN::CacheMgr::tidyup ;
sub tidyup {
my($self) = @_;
return unless -d $self->{ID};
@@ -812,9 +813,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: $!");
@@ -942,49 +941,85 @@ sub debug {
package CPAN::Config;
#-> sub CPAN::Config::edit ;
+# returns true on successful action
sub edit {
- my($class,@args) = @_;
+ my($self,@args) = @_;
return unless @args;
- CPAN->debug("class[$class]args[".join(" | ",@args)."]");
+ CPAN->debug("self[$self]args[".join(" | ",@args)."]");
my($o,$str,$func,$args,$key_exists);
$o = shift @args;
if($can{$o}) {
- $class->$o(@args);
+ $self->$o(@args);
return 1;
} else {
- if (ref($CPAN::Config->{$o}) eq ARRAY) {
+ CPAN->debug("o[$o]") if $CPAN::DEBUG;
+ if ($o =~ /list$/) {
$func = shift @args;
$func ||= "";
+ CPAN->debug("func[$func]") if $CPAN::DEBUG;
+ my $changed;
# Let's avoid eval, it's easier to comprehend without.
if ($func eq "push") {
push @{$CPAN::Config->{$o}}, @args;
+ $changed = 1;
} elsif ($func eq "pop") {
pop @{$CPAN::Config->{$o}};
+ $changed = 1;
} elsif ($func eq "shift") {
shift @{$CPAN::Config->{$o}};
+ $changed = 1;
} elsif ($func eq "unshift") {
unshift @{$CPAN::Config->{$o}}, @args;
+ $changed = 1;
} elsif ($func eq "splice") {
splice @{$CPAN::Config->{$o}}, @args;
+ $changed = 1;
} elsif (@args) {
$CPAN::Config->{$o} = [@args];
+ $changed = 1;
} else {
- $CPAN::Frontend->myprint(
- join "",
- " $o ",
- ExtUtils::MakeMaker::neatvalue($CPAN::Config->{$o}),
- "\n"
- );
+ $self->prettyprint($o);
}
+ if ($o eq "urllist" && $changed) {
+ # reset the cached values
+ undef $CPAN::FTP::Thesite;
+ undef $CPAN::FTP::Themethod;
+ }
+ return $changed;
} else {
$CPAN::Config->{$o} = $args[0] if defined $args[0];
- $CPAN::Frontend->myprint(" $o " .
- (defined $CPAN::Config->{$o} ?
- $CPAN::Config->{$o} : "UNDEFINED"));
+ $self->prettyprint($o);
}
}
}
+sub prettyprint {
+ my($self,$k) = @_;
+ my $v = $CPAN::Config->{$k};
+ if (ref $v) {
+ my(@report) = ref $v eq "ARRAY" ?
+ @$v :
+ map { sprintf(" %-18s => %s\n",
+ $_,
+ defined $v->{$_} ? $v->{$_} : "UNDEFINED"
+ )} keys %$v;
+ $CPAN::Frontend->myprint(
+ join(
+ "",
+ sprintf(
+ " %-18s\n",
+ $k
+ ),
+ map {"\t$_\n"} @report
+ )
+ );
+ } elsif (defined $v) {
+ $CPAN::Frontend->myprint(sprintf " %-18s %s\n", $k, $v);
+ } else {
+ $CPAN::Frontend->myprint(sprintf " %-18s %s\n", $k, "UNDEFINED");
+ }
+}
+
#-> sub CPAN::Config::commit ;
sub commit {
my($self,$configpm) = @_;
@@ -1005,7 +1040,8 @@ Please specify a filename where to save the configuration or try
}
}
- my $msg = <<EOF unless $configpm =~ /MyConfig/;
+ my $msg;
+ $msg = <<EOF unless $configpm =~ /MyConfig/;
# This is CPAN.pm's systemwide configuration file. This file provides
# defaults for users, and the values can be changed in a per-user
@@ -1016,7 +1052,8 @@ EOF
$msg ||= "\n";
my($fh) = FileHandle->new;
rename $configpm, "$configpm~" if -f $configpm;
- open $fh, ">$configpm" or warn "Couldn't open >$configpm: $!";
+ open $fh, ">$configpm" or
+ $CPAN::Frontend->mydie("Couldn't open >$configpm: $!");
$fh->print(qq[$msg\$CPAN::Config = \{\n]);
foreach (sort keys %$CPAN::Config) {
$fh->print(
@@ -1069,8 +1106,8 @@ sub load {
# system wide settings
shift @INC;
}
- return unless @miss = $self->not_loaded;
- # XXX better check for arrayrefs too
+ return unless @miss = $self->missing_config_data;
+
require CPAN::FirstTime;
my($configpm,$fh,$redo,$theycalled);
$redo ||= "";
@@ -1137,15 +1174,18 @@ $configpm initialized.
CPAN::FirstTime::init($configpm);
}
-#-> sub CPAN::Config::not_loaded ;
-sub not_loaded {
+#-> sub CPAN::Config::missing_config_data ;
+sub missing_config_data {
my(@miss);
- for (qw(
- cpan_home keep_source_where build_dir build_cache scan_cache
- index_expire gzip tar unzip make pager makepl_arg make_arg
- make_install_arg urllist inhibit_startup_message
- ftp_proxy http_proxy no_proxy prerequisites_policy
- )) {
+ for (
+ "cpan_home", "keep_source_where", "build_dir", "build_cache",
+ "scan_cache", "index_expire", "gzip", "tar", "unzip", "make",
+ "pager",
+ "makepl_arg", "make_arg", "make_install_arg", "urllist",
+ "inhibit_startup_message", "ftp_proxy", "http_proxy", "no_proxy",
+ "prerequisites_policy",
+ "cache_metadata",
+ ) {
push @miss, $_ unless defined $CPAN::Config->{$_};
}
return @miss;
@@ -1213,19 +1253,17 @@ sub h {
} else {
$CPAN::Frontend->myprint(q{
Display Information
- a authors
- b string display bundles
- d or info distributions
- m /regex/ about modules
- i or anything of above
- r none reinstall recommendations
- u uninstalled distributions
+ command argument description
+ a,b,d,m WORD or /REGEXP/ about authors, bundles, distributions, modules
+ i WORD or /REGEXP/ about anything of above
+ r NONE reinstall recommendations
+ ls AUTHOR about files in the author's directory
Download, Test, Make, Install...
get download
make make (implies get)
- test modules, make test (implies make)
- install dists, bundles make install (implies test)
+ test MODULES, make test (implies make)
+ install DISTS, BUNDLES make install (implies test)
clean make clean
look open subshell in these dists' directories
readme display these dists' README files
@@ -1241,27 +1279,68 @@ Other
*help = \&h;
#-> sub CPAN::Shell::a ;
-sub a { $CPAN::Frontend->myprint(shift->format_result('Author',@_));}
-#-> sub CPAN::Shell::b ;
-sub b {
+sub a {
+ my($self,@arg) = @_;
+ # authors are always UPPERCASE
+ for (@arg) {
+ $_ = uc $_ unless /=/;
+ }
+ $CPAN::Frontend->myprint($self->format_result('Author',@arg));
+}
+
+#-> sub CPAN::Shell::ls ;
+sub ls {
+ my($self,@arg) = @_;
+ my @accept;
+ for (@arg) {
+ unless (/^[A-Z\-]+$/i) {
+ $CPAN::Frontend->mywarn("ls command rejects argument $_: not an author");
+ next;
+ }
+ push @accept, uc $_;
+ }
+ for my $a (@accept){
+ my $author = $self->expand('Author',$a) or die "No author found for $a";
+ $author->ls;
+ }
+}
+
+#-> sub CPAN::Shell::local_bundles ;
+sub local_bundles {
my($self,@which) = @_;
- CPAN->debug("which[@which]") if $CPAN::DEBUG;
my($incdir,$bdir,$dh);
foreach $incdir ($CPAN::Config->{'cpan_home'},@INC) {
- $bdir = MM->catdir($incdir,"Bundle");
- if ($dh = DirHandle->new($bdir)) { # may fail
- my($entry);
- for $entry ($dh->read) {
- next if -d MM->catdir($bdir,$entry);
- next unless $entry =~ s/\.pm\z//;
- $CPAN::META->instance('CPAN::Bundle',"Bundle::$entry");
- }
- }
+ my @bbase = "Bundle";
+ while (my $bbase = shift @bbase) {
+ $bdir = MM->catdir($incdir,split /::/, $bbase);
+ CPAN->debug("bdir[$bdir]\@bbase[@bbase]") if $CPAN::DEBUG;
+ if ($dh = DirHandle->new($bdir)) { # may fail
+ my($entry);
+ for $entry ($dh->read) {
+ next if $entry =~ /^\./;
+ if (-d MM->catdir($bdir,$entry)){
+ push @bbase, "$bbase\::$entry";
+ } else {
+ next unless $entry =~ s/\.pm(?!\n)\Z//;
+ $CPAN::META->instance('CPAN::Bundle',"$bbase\::$entry");
+ }
+ }
+ }
+ }
}
+}
+
+#-> sub CPAN::Shell::b ;
+sub b {
+ my($self,@which) = @_;
+ CPAN->debug("which[@which]") if $CPAN::DEBUG;
+ $self->local_bundles;
$CPAN::Frontend->myprint($self->format_result('Bundle',@which));
}
+
#-> sub CPAN::Shell::d ;
sub d { $CPAN::Frontend->myprint(shift->format_result('Distribution',@_));}
+
#-> sub CPAN::Shell::m ;
sub m { # emacs confused here }; sub mimimimimi { # emacs in sync here
$CPAN::Frontend->myprint(shift->format_result('Module',@_));
@@ -1278,21 +1357,28 @@ sub i {
for $type (@type) {
push @result, $self->expand($type,@args);
}
- my $result = @result == 1 ?
+ my $result = @result == 1 ?
$result[0]->as_string :
- join "", map {$_->as_glimpse} @result;
- $result ||= "No objects found of any type for argument @args\n";
+ @result == 0 ?
+ "No objects found of any type for argument @args\n" :
+ join("",
+ (map {$_->as_glimpse} @result),
+ scalar @result, " items found\n",
+ );
$CPAN::Frontend->myprint($result);
}
#-> sub CPAN::Shell::o ;
+
+# CPAN::Shell::o and CPAN::Config::edit are closely related. 'o conf'
+# should have been called set and 'o debug' maybe 'set debug'
sub o {
my($self,$o_type,@o_what) = @_;
$o_type ||= "";
CPAN->debug("o_type[$o_type] o_what[".join(" | ",@o_what)."]\n");
if ($o_type eq 'conf') {
shift @o_what if @o_what && $o_what[0] eq 'help';
- if (!@o_what) {
+ if (!@o_what) { # print all things, "o conf"
my($k,$v);
$CPAN::Frontend->myprint("CPAN::Config options");
if (exists $INC{'CPAN/Config.pm'}) {
@@ -1308,25 +1394,12 @@ sub o {
}
$CPAN::Frontend->myprint("\n");
for $k (sort keys %$CPAN::Config) {
- $v = $CPAN::Config->{$k};
- if (ref $v) {
- $CPAN::Frontend->myprint(
- join(
- "",
- sprintf(
- " %-18s\n",
- $k
- ),
- map {"\t$_\n"} @{$v}
- )
- );
- } else {
- $CPAN::Frontend->myprint(sprintf " %-18s %s\n", $k, $v);
- }
+ CPAN::Config->prettyprint($k);
}
$CPAN::Frontend->myprint("\n");
} elsif (!CPAN::Config->edit(@o_what)) {
- $CPAN::Frontend->myprint(qq[Type 'o conf' to view configuration edit options\n\n]);
+ $CPAN::Frontend->myprint(qq{Type 'o conf' to view configuration }.
+ qq{edit options\n\n});
}
} elsif ($o_type eq 'debug') {
my(%valid);
@@ -1334,6 +1407,10 @@ sub o {
if (@o_what) {
while (@o_what) {
my($what) = shift @o_what;
+ if ($what =~ s/^-// && exists $CPAN::DEBUG{$what}) {
+ $CPAN::DEBUG &= $CPAN::DEBUG ^ $CPAN::DEBUG{$what};
+ next;
+ }
if ( exists $CPAN::DEBUG{$what} ) {
$CPAN::DEBUG |= $CPAN::DEBUG{$what};
} elsif ($what =~ /^\d/) {
@@ -1369,7 +1446,8 @@ sub o {
my($k,$v);
for $k (sort {$CPAN::DEBUG{$a} <=> $CPAN::DEBUG{$b}} keys %CPAN::DEBUG) {
$v = $CPAN::DEBUG{$k};
- $CPAN::Frontend->myprint(sprintf " %-14s(%s)\n", $k, $v) if $v & $CPAN::DEBUG;
+ $CPAN::Frontend->myprint(sprintf " %-14s(%s)\n", $k, $v)
+ if $v & $CPAN::DEBUG;
}
} else {
$CPAN::Frontend->myprint("Debugging turned off completely.\n");
@@ -1383,10 +1461,10 @@ Known options:
}
}
-sub dotdot_onreload {
+sub paintdots_onreload {
my($ref) = shift;
sub {
- if ( $_[0] =~ /Subroutine (\w+) redefined/ ) {
+ if ( $_[0] =~ /[Ss]ubroutine (\w+) redefined/ ) {
my($subr) = $1;
++$$ref;
local($|) = 1;
@@ -1407,8 +1485,8 @@ sub reload {
CPAN->debug("reloading the whole CPAN.pm") if $CPAN::DEBUG;
my $fh = FileHandle->new($INC{'CPAN.pm'});
local($/);
- $redef = 0;
- local($SIG{__WARN__}) = dotdot_onreload(\$redef);
+ my $redef = 0;
+ local($SIG{__WARN__}) = paintdots_onreload(\$redef);
eval <$fh>;
warn $@ if $@;
$CPAN::Frontend->myprint("\n$redef subroutines redefined\n");
@@ -1424,12 +1502,12 @@ index re-reads the index files\n});
sub _binary_extensions {
my($self) = shift @_;
my(@result,$module,%seen,%need,$headerdone);
- my $isaperl = q{perl5[._-]\\d{3}(_[0-4][0-9])?\\.tar[._-]gz\z};
for $module ($self->expand('Module','/./')) {
my $file = $module->cpan_file;
next if $file eq "N/A";
next if $file =~ /^Contact Author/;
- next if $file =~ / $isaperl /xo;
+ my $dist = $CPAN::META->instance('CPAN::Distribution',$file);
+ next if $dist->isa_perl;
next unless $module->xs_file;
local($|) = 1;
$CPAN::Frontend->myprint(".");
@@ -1467,15 +1545,21 @@ sub _u_r_common {
my($self) = shift @_;
my($what) = shift @_;
CPAN->debug("self[$self] what[$what] args[@_]") if $CPAN::DEBUG;
- Carp::croak "Usage: \$obj->_u_r_common($what)" unless defined $what;
- Carp::croak "Usage: \$obj->_u_r_common(a|r|u)" unless $what =~ /^[aru]$/;
+ Carp::croak "Usage: \$obj->_u_r_common(a|r|u)" unless
+ $what && $what =~ /^[aru]$/;
my(@args) = @_;
@args = '/./' unless @args;
my(@result,$module,%seen,%need,$headerdone,
$version_undefs,$version_zeroes);
$version_undefs = $version_zeroes = 0;
- my $sprintf = "%-25s %9s %9s %s\n";
- for $module ($self->expand('Module',@args)) {
+ 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
+ # for metadata cache
+ $CPAN::Frontend->myprint(sprintf "%d matches in the database\n", $expand);
+ }
+ for $module (@expand) {
my $file = $module->cpan_file;
next unless defined $file; # ??
my($latest) = $module->cpan_version;
@@ -1493,7 +1577,7 @@ sub _u_r_common {
} elsif ($have == 0){
$version_zeroes++;
}
- next if $have >= $latest;
+ next unless CPAN::Version->vgt($latest, $have);
# to be pedantic we should probably say:
# && !($have eq "undef" && $latest ne "undef" && $latest gt "");
# to catch the case where CPAN has a version 0 and we have a version undef
@@ -1524,16 +1608,34 @@ 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"
+ ));
}
- $latest = substr($latest,0,8) if length($latest) > 8;
- $have = substr($have,0,8) if length($have) > 8;
- $CPAN::Frontend->myprint(sprintf $sprintf, $module->id, $have, $latest, $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);
$need{$module->id}++;
}
unless (%need) {
@@ -1615,52 +1717,105 @@ sub autobundle {
$to\n\n");
}
+#-> sub CPAN::Shell::expandany ;
+sub expandany {
+ my($self,$s) = @_;
+ CPAN->debug("s[$s]") if $CPAN::DEBUG;
+ if ($s =~ m|/|) { # looks like a file
+ $s = CPAN::Distribution->normalize($s);
+ return $CPAN::META->instance('CPAN::Distribution',$s);
+ # Distributions spring into existence, not expand
+ } elsif ($s =~ m|^Bundle::|) {
+ $self->local_bundles; # scanning so late for bundles seems
+ # both attractive and crumpy: always
+ # current state but easy to forget
+ # somewhere
+ return $self->expand('Bundle',$s);
+ } else {
+ return $self->expand('Module',$s)
+ if $CPAN::META->exists('CPAN::Module',$s);
+ }
+ return;
+}
+
#-> sub CPAN::Shell::expand ;
sub expand {
shift;
my($type,@args) = @_;
my($arg,@m);
+ CPAN->debug("type[$type]args[@args]") if $CPAN::DEBUG;
for $arg (@args) {
- my $regex;
+ my($regex,$command);
if ($arg =~ m|^/(.*)/$|) {
$regex = $1;
- }
+ } elsif ($arg =~ m/=/) {
+ $command = 1;
+ }
my $class = "CPAN::$type";
my $obj;
+ CPAN->debug(sprintf "class[%s]regex[%s]command[%s]",
+ $class,
+ defined $regex ? $regex : "UNDEFINED",
+ $command || "UNDEFINED",
+ ) if $CPAN::DEBUG;
if (defined $regex) {
- for $obj (
- sort
- {$a->id cmp $b->id}
- $CPAN::META->all_objects($class)
- ) {
- unless ($obj->id){
- # BUG, we got an empty object somewhere
- CPAN->debug(sprintf(
- "Empty id on obj[%s]%%[%s]",
- $obj,
- join(":", %$obj)
- )) if $CPAN::DEBUG;
- next;
- }
- push @m, $obj
- if $obj->id =~ /$regex/i
- or
- (
- (
- $] < 5.00303 ### provide sort of
- ### compatibility with 5.003
- ||
- $obj->can('name')
- )
- &&
- $obj->name =~ /$regex/i
- );
- }
+ for $obj (
+ sort
+ {$a->id cmp $b->id}
+ $CPAN::META->all_objects($class)
+ ) {
+ unless ($obj->id){
+ # BUG, we got an empty object somewhere
+ require Data::Dumper;
+ CPAN->debug(sprintf(
+ "Bug in CPAN: Empty id on obj[%s][%s]",
+ $obj,
+ Data::Dumper::Dumper($obj)
+ )) if $CPAN::DEBUG;
+ next;
+ }
+ push @m, $obj
+ if $obj->id =~ /$regex/i
+ or
+ (
+ (
+ $] < 5.00303 ### provide sort of
+ ### compatibility with 5.003
+ ||
+ $obj->can('name')
+ )
+ &&
+ $obj->name =~ /$regex/i
+ );
+ }
+ } elsif ($command) {
+ die "equal sign in command disabled (immature interface), ".
+ "you can set
+ ! \$CPAN::Shell::ADVANCED_QUERY=1
+to enable it. But please note, this is HIGHLY EXPERIMENTAL code
+that may go away anytime.\n"
+ unless $ADVANCED_QUERY;
+ my($method,$criterion) = $arg =~ /(.+?)=(.+)/;
+ my($matchcrit) = $criterion =~ m/^~(.+)/;
+ for my $self (
+ sort
+ {$a->id cmp $b->id}
+ $CPAN::META->all_objects($class)
+ ) {
+ my $lhs = $self->$method() or next; # () for 5.00503
+ if ($matchcrit) {
+ push @m, $self if $lhs =~ m/$matchcrit/;
+ } else {
+ push @m, $self if $lhs eq $criterion;
+ }
+ }
} else {
my($xarg) = $arg;
if ( $type eq 'Bundle' ) {
$xarg =~ s/^(Bundle::)?(.*)/Bundle::$2/;
- }
+ } elsif ($type eq "Distribution") {
+ $xarg = CPAN::Distribution->normalize($arg);
+ }
if ($CPAN::META->exists($class,$xarg)) {
$obj = $CPAN::META->instance($class,$xarg);
} elsif ($CPAN::META->exists($class,$arg)) {
@@ -1680,22 +1835,33 @@ sub format_result {
my($type,@args) = @_;
@args = '/./' unless @args;
my(@result) = $self->expand($type,@args);
- my $result = @result == 1 ?
+ my $result = @result == 1 ?
$result[0]->as_string :
- join "", map {$_->as_glimpse} @result;
- $result ||= "No objects of type $type found for argument @args\n";
+ @result == 0 ?
+ "No objects of type $type found for argument @args\n" :
+ join("",
+ (map {$_->as_glimpse} @result),
+ scalar @result, " items found\n",
+ );
$result;
}
# The only reason for this method is currently to have a reliable
# debugging utility that reveals which output is going through which
# channel. No, I don't like the colors ;-)
+
+#-> sub CPAN::Shell::print_ornameted ;
sub print_ornamented {
my($self,$what,$ornament) = @_;
my $longest = 0;
- my $ornamenting = 0; # turn the colors on
+ return unless defined $what;
- if ($ornamenting) {
+ if ($CPAN::Config->{term_is_latin}){
+ # courtesy jhi:
+ $what
+ =~ s{([\xC0-\xDF])([\x80-\xBF])}{chr(ord($1)<<6&0xC0|ord($2)&0x3F)}eg; #};
+ }
+ if ($PRINT_ORNAMENTING) {
unless (defined &color) {
if ($CPAN::META->has_inst("Term::ANSIColor")) {
import Term::ANSIColor "color";
@@ -1723,6 +1889,7 @@ sub print_ornamented {
sub myprint {
my($self,$what) = @_;
+
$self->print_ornamented($what, 'bold blue on_yellow');
}
@@ -1770,50 +1937,54 @@ sub rematein {
}
setup_output();
CPAN->debug("pragma[$pragma]meth[$meth] some[@some]") if $CPAN::DEBUG;
- my($s,@s);
+
+ # Here is the place to set "test_count" on all involved parties to
+ # 0. We then can pass this counter on to the involved
+ # distributions and those can refuse to test if test_count > X. In
+ # the first stab at it we could use a 1 for "X".
+
+ # But when do I reset the distributions to start with 0 again?
+ # Jost suggested to have a random or cycling interaction ID that
+ # we pass through. But the ID is something that is just left lying
+ # around in addition to the counter, so I'd prefer to set the
+ # counter to 0 now, and repeat at the end of the loop. But what
+ # about dependencies? They appear later and are not reset, they
+ # enter the queue but not its copy. How do they get a sensible
+ # test_count?
+
+ # construct the queue
+ my($s,@s,@qcopy);
foreach $s (@some) {
- CPAN::Queue->new($s);
- }
- while ($s = CPAN::Queue->first) {
my $obj;
if (ref $s) {
+ CPAN->debug("s is an object[$s]") if $CPAN::DEBUG;
$obj = $s;
- } elsif ($s =~ m|/|) { # looks like a file
- $obj = $CPAN::META->instance('CPAN::Distribution',$s);
- } elsif ($s =~ m|^Bundle::|) {
- $obj = $CPAN::META->instance('CPAN::Bundle',$s);
+ } elsif ($s =~ m|^/|) { # looks like a regexp
+ $CPAN::Frontend->mywarn("Sorry, $meth with a regular expression is ".
+ "not supported\n");
+ sleep 2;
+ next;
} else {
- $obj = $CPAN::META->instance('CPAN::Module',$s)
- if $CPAN::META->exists('CPAN::Module',$s);
+ CPAN->debug("calling expandany [$s]") if $CPAN::DEBUG;
+ $obj = CPAN::Shell->expandany($s);
}
if (ref $obj) {
- CPAN->debug(
- qq{pragma[$pragma]meth[$meth]obj[$obj]as_string\[}.
- $obj->as_string.
- qq{\]}
- ) if $CPAN::DEBUG;
- $obj->$pragma()
- if
- $pragma
- &&
- ($] < 5.00303 || $obj->can($pragma)); ###
- ### compatibility
- ### with
- ### 5.003
- if ($]>=5.00303 && $obj->can('called_for')) {
- $obj->called_for($s);
- }
- CPAN::Queue->delete($s) if $obj->$meth(); # if it is more
- # than once in
- # the queue
+ $obj->color_cmd_tmps(0,1);
+ CPAN::Queue->new($obj->id);
+ push @qcopy, $obj;
} elsif ($CPAN::META->exists('CPAN::Author',$s)) {
$obj = $CPAN::META->instance('CPAN::Author',$s);
- $CPAN::Frontend->myprint(
- join "",
- "Don't be silly, you can't $meth ",
- $obj->fullname,
- " ;-)\n"
- );
+ if ($meth eq "dump") {
+ $obj->dump;
+ } else {
+ $CPAN::Frontend->myprint(
+ join "",
+ "Don't be silly, you can't $meth ",
+ $obj->fullname,
+ " ;-)\n"
+ );
+ sleep 2;
+ }
} else {
$CPAN::Frontend
->myprint(qq{Warning: Cannot $meth $s, }.
@@ -1822,13 +1993,55 @@ Try the command
i /$s/
-to find objects with similar identifiers.
+to find objects with matching identifiers.
});
+ sleep 2;
+ }
+ }
+
+ # queuerunner (please be warned: when I started to change the
+ # queue to hold objects instead of names, I made one or two
+ # mistakes and never found which. I reverted back instead)
+ while ($s = CPAN::Queue->first) {
+ my $obj;
+ if (ref $s) {
+ $obj = $s; # I do not believe, we would survive if this happened
+ } else {
+ $obj = CPAN::Shell->expandany($s);
}
+ if ($pragma
+ &&
+ ($] < 5.00303 || $obj->can($pragma))){
+ ### compatibility with 5.003
+ $obj->$pragma($meth); # the pragma "force" in
+ # "CPAN::Distribution" must know
+ # what we are intending
+ }
+ if ($]>=5.00303 && $obj->can('called_for')) {
+ $obj->called_for($s);
+ }
+ CPAN->debug(
+ qq{pragma[$pragma]meth[$meth]obj[$obj]as_string\[}.
+ $obj->as_string.
+ qq{\]}
+ ) if $CPAN::DEBUG;
+
+ if ($obj->$meth()){
+ CPAN::Queue->delete($s);
+ } else {
+ CPAN->debug("failed");
+ }
+
+ $obj->undelay;
CPAN::Queue->delete_first($s);
}
+ for my $obj (@qcopy) {
+ $obj->color_cmd_tmps(0,0);
+ }
}
+#-> sub CPAN::Shell::dump ;
+sub dump { shift->rematein('dump',@_); }
#-> sub CPAN::Shell::force ;
sub force { shift->rematein('force',@_); }
#-> sub CPAN::Shell::get ;
@@ -1848,6 +2061,60 @@ sub look { shift->rematein('look',@_); }
#-> sub CPAN::Shell::cvs_import ;
sub cvs_import { shift->rematein('cvs_import',@_); }
+package CPAN::LWP::UserAgent;
+
+sub config {
+ return if $SETUPDONE;
+ if ($CPAN::META->has_usable('LWP::UserAgent')) {
+ require LWP::UserAgent;
+ @ISA = qw(Exporter LWP::UserAgent);
+ $SETUPDONE++;
+ } else {
+ $CPAN::Frontent->mywarn("LWP::UserAgent not available\n");
+ }
+}
+
+sub get_basic_credentials {
+ my($self, $realm, $uri, $proxy) = @_;
+ return unless $proxy;
+ if ($USER && $PASSWD) {
+ } elsif (defined $CPAN::Config->{proxy_user} &&
+ defined $CPAN::Config->{proxy_pass}) {
+ $USER = $CPAN::Config->{proxy_user};
+ $PASSWD = $CPAN::Config->{proxy_pass};
+ } else {
+ require ExtUtils::MakeMaker;
+ ExtUtils::MakeMaker->import(qw(prompt));
+ $USER = prompt("Proxy authentication needed!
+ (Note: to permanently configure username and password run
+ o conf proxy_user your_username
+ o conf proxy_pass your_password
+ )\nUsername:");
+ if ($CPAN::META->has_inst("Term::ReadKey")) {
+ Term::ReadKey::ReadMode("noecho");
+ } else {
+ $CPAN::Frontend->mywarn("Warning: Term::ReadKey seems not to be available, your password will be echoed to the terminal!\n");
+ }
+ $PASSWD = prompt("Password:");
+ if ($CPAN::META->has_inst("Term::ReadKey")) {
+ Term::ReadKey::ReadMode("restore");
+ }
+ $CPAN::Frontend->myprint("\n\n");
+ }
+ return($USER,$PASSWD);
+}
+
+sub mirror {
+ my($self,$url,$aslocal) = @_;
+ my $result = $self->SUPER::mirror($url,$aslocal);
+ if ($result->code == 407) {
+ undef $USER;
+ undef $PASSWD;
+ $result = $self->SUPER::mirror($url,$aslocal);
+ }
+ $result;
+}
+
package CPAN::FTP;
#-> sub CPAN::FTP::ftp_get ;
@@ -1860,7 +2127,7 @@ sub ftp_get {
my $ftp = Net::FTP->new($host);
return 0 unless defined $ftp;
$ftp->debug(1) if $CPAN::DEBUG{'FTP'} & $CPAN::DEBUG;
- $class->debug(qq[Going to ->login("anonymous","$Config::Config{'cf_email'}")\n]);
+ $class->debug(qq[Going to login("anonymous","$Config::Config{cf_email}")]);
unless ( $ftp->login("anonymous",$Config::Config{'cf_email'}) ){
warn "Couldn't login on $host";
return;
@@ -1881,61 +2148,33 @@ sub ftp_get {
# If more accuracy is wanted/needed, Chris Leach sent me this patch...
- # leach,> *** /install/perl/live/lib/CPAN.pm- Wed Sep 24 13:08:48 1997
- # leach,> --- /tmp/cp Wed Sep 24 13:26:40 1997
- # leach,> ***************
- # leach,> *** 1562,1567 ****
- # leach,> --- 1562,1580 ----
- # leach,> return 1 if substr($url,0,4) eq "file";
- # leach,> return 1 unless $url =~ m|://([^/]+)|;
- # leach,> my $host = $1;
- # leach,> + my $proxy = $CPAN::Config->{'http_proxy'} || $ENV{'http_proxy'};
- # leach,> + if ($proxy) {
- # leach,> + $proxy =~ m|://([^/:]+)|;
- # leach,> + $proxy = $1;
- # leach,> + my $noproxy = $CPAN::Config->{'no_proxy'} || $ENV{'no_proxy'};
- # leach,> + if ($noproxy) {
- # leach,> + if ($host !~ /$noproxy$/) {
- # leach,> + $host = $proxy;
- # leach,> + }
- # leach,> + } else {
- # leach,> + $host = $proxy;
- # leach,> + }
- # leach,> + }
- # leach,> require Net::Ping;
- # leach,> return 1 unless $Net::Ping::VERSION >= 2;
- # leach,> my $p;
-
-
-# this is quite optimistic and returns one on several occasions where
-# inappropriate. But this does no harm. It would do harm if we were
-# too pessimistic (as I was before the http_proxy
-sub is_reachable {
- my($self,$url) = @_;
- return 1; # we can't simply roll our own, firewalls may break ping
- return 0 unless $url;
- return 1 if substr($url,0,4) eq "file";
- return 1 unless $url =~ m|^(\w+)://([^/]+)|;
- my $proxytype = $1 . "_proxy"; # ftp_proxy or http_proxy
- my $host = $2;
- return 1 if $CPAN::Config->{$proxytype} || $ENV{$proxytype};
- require Net::Ping;
- return 1 unless $Net::Ping::VERSION >= 2;
- my $p;
- # 1.3101 had it different: only if the first eval raised an
- # exception we tried it with TCP. Now we are happy if icmp wins
- # the order and return, we don't even check for $@. Thanks to
- # thayer@uis.edu for the suggestion.
- eval {$p = Net::Ping->new("icmp");};
- return 1 if $p && ref($p) && $p->ping($host, 10);
- eval {$p = Net::Ping->new("tcp");};
- $CPAN::Frontend->mydie($@) if $@;
- return $p->ping($host, 10);
-}
+ # > *** /install/perl/live/lib/CPAN.pm- Wed Sep 24 13:08:48 1997
+ # > --- /tmp/cp Wed Sep 24 13:26:40 1997
+ # > ***************
+ # > *** 1562,1567 ****
+ # > --- 1562,1580 ----
+ # > return 1 if substr($url,0,4) eq "file";
+ # > return 1 unless $url =~ m|://([^/]+)|;
+ # > my $host = $1;
+ # > + my $proxy = $CPAN::Config->{'http_proxy'} || $ENV{'http_proxy'};
+ # > + if ($proxy) {
+ # > + $proxy =~ m|://([^/:]+)|;
+ # > + $proxy = $1;
+ # > + my $noproxy = $CPAN::Config->{'no_proxy'} || $ENV{'no_proxy'};
+ # > + if ($noproxy) {
+ # > + if ($host !~ /$noproxy$/) {
+ # > + $host = $proxy;
+ # > + }
+ # > + } else {
+ # > + $host = $proxy;
+ # > + }
+ # > + }
+ # > require Net::Ping;
+ # > return 1 unless $Net::Ping::VERSION >= 2;
+ # > my $p;
+
#-> sub CPAN::FTP::localize ;
-# sorry for the ugly code here, I'll clean it up as soon as Net::FTP
-# is in the core
sub localize {
my($self,$file,$aslocal,$force) = @_;
$force ||= 0;
@@ -1945,9 +2184,19 @@ sub localize {
if $CPAN::DEBUG;
if ($^O eq 'MacOS') {
+ # Comment by AK on 2000-09-03: Uniq short filenames would be
+ # available in CHECKSUMS file
my($name, $path) = File::Basename::fileparse($aslocal, '');
if (length($name) > 31) {
- $name =~ s/(\.(readme(\.(gz|Z))?|(tar\.)?(gz|Z)|tgz|zip|pm\.(gz|Z)))$//;
+ $name =~ s/(
+ \.(
+ readme(\.(gz|Z))? |
+ (tar\.)?(gz|Z) |
+ tgz |
+ zip |
+ pm\.(gz|Z)
+ )
+ )$//x;
my $suf = $1;
my $size = 31 - length($suf);
while (length($name) > $size) {
@@ -1973,19 +2222,42 @@ sub localize {
to insufficient permissions.\n}) unless -w $aslocal_dir;
# Inheritance is not easier to manage than a few if/else branches
- if ($CPAN::META->has_inst('LWP::UserAgent')) {
- require LWP::UserAgent;
+ if ($CPAN::META->has_usable('LWP::UserAgent')) {
unless ($Ua) {
- $Ua = LWP::UserAgent->new;
- my($var);
- $Ua->proxy('ftp', $var)
- if $var = $CPAN::Config->{'ftp_proxy'} || $ENV{'ftp_proxy'};
- $Ua->proxy('http', $var)
- if $var = $CPAN::Config->{'http_proxy'} || $ENV{'http_proxy'};
- $Ua->no_proxy($var)
- if $var = $CPAN::Config->{'no_proxy'} || $ENV{'no_proxy'};
+ CPAN::LWP::UserAgent->config;
+ eval {$Ua = CPAN::LWP::UserAgent->new;}; # Why is has_usable still not fit enough?
+ if ($@) {
+ $CPAN::Frontent->mywarn("CPAN::LWP::UserAgent->new dies with $@")
+ if $CPAN::DEBUG;
+ } else {
+ my($var);
+ $Ua->proxy('ftp', $var)
+ if $var = $CPAN::Config->{ftp_proxy} || $ENV{ftp_proxy};
+ $Ua->proxy('http', $var)
+ if $var = $CPAN::Config->{http_proxy} || $ENV{http_proxy};
+
+
+# >>>>> On Wed, 13 Dec 2000 09:21:34 -0500, "Robison, Jonathon (J.M.)" <jrobiso2@visteon.com> said:
+#
+# > I note that although CPAN.pm can use proxies, it doesn't seem equipped to
+# > use ones that require basic autorization.
+#
+# > Example of when I use it manually in my own stuff:
+#
+# > $ua->proxy(['http','ftp'], http://my.proxy.server:83');
+# > $req->proxy_authorization_basic("username","password");
+# > $res = $ua->request($req);
+#
+
+ $Ua->no_proxy($var)
+ if $var = $CPAN::Config->{no_proxy} || $ENV{no_proxy};
+ }
}
}
+ $ENV{ftp_proxy} = $CPAN::Config->{ftp_proxy} if $CPAN::Config->{ftp_proxy};
+ $ENV{http_proxy} = $CPAN::Config->{http_proxy}
+ if $CPAN::Config->{http_proxy};
+ $ENV{no_proxy} = $CPAN::Config->{no_proxy} if $CPAN::Config->{no_proxy};
# Try the list of urls for each single object. We keep a record
# where we did get a file from
@@ -2008,14 +2280,16 @@ sub localize {
($a == $Thesite)
} 0..$last;
}
- my($level,@levels);
+ my(@levels);
if ($Themethod) {
@levels = ($Themethod, grep {$_ ne $Themethod} qw/easy hard hardest/);
} else {
@levels = qw/easy hard hardest/;
}
@levels = qw/easy/ if $^O eq 'MacOS';
- for $level (@levels) {
+ my($levelno);
+ for $levelno (0..$#levels) {
+ my $level = $levels[$levelno];
my $method = "host$level";
my @host_seq = $level eq "easy" ?
@reordered : 0..$last; # reordered has CDROM up front
@@ -2030,17 +2304,20 @@ sub localize {
return $ret;
} else {
unlink $aslocal;
+ last if $CPAN::Signal; # need to cleanup
}
}
- my(@mess);
- push @mess,
- qq{Please check, if the URLs I found in your configuration file \(}.
- join(", ", @{$CPAN::Config->{urllist}}).
- qq{\) are valid. The urllist can be edited.},
- qq{E.g. with ``o conf urllist push ftp://myurl/''};
- $CPAN::Frontend->myprint(Text::Wrap::wrap("","",@mess). "\n\n");
- sleep 2;
- $CPAN::Frontend->myprint("Cannot fetch $file\n\n");
+ unless ($CPAN::Signal) {
+ my(@mess);
+ push @mess,
+ qq{Please check, if the URLs I found in your configuration file \(}.
+ join(", ", @{$CPAN::Config->{urllist}}).
+ qq{\) are valid. The urllist can be edited.},
+ qq{E.g. with 'o conf urllist push ftp://myurl/'};
+ $CPAN::Frontend->myprint(Text::Wrap::wrap("","",@mess). "\n\n");
+ sleep 2;
+ $CPAN::Frontend->myprint("Could not fetch $file\n");
+ }
if ($restore) {
rename "$aslocal.bak", $aslocal;
$CPAN::Frontend->myprint("Trying to get away with old file:\n" .
@@ -2054,19 +2331,13 @@ sub hosteasy {
my($self,$host_seq,$file,$aslocal) = @_;
my($i);
HOSTEASY: for $i (@$host_seq) {
- my $url = $CPAN::Config->{urllist}[$i] || $CPAN::Defaultsite;
- unless ($self->is_reachable($url)) {
- $CPAN::Frontend->myprint("Skipping $url (seems to be not reachable)\n");
- sleep 2;
- next;
- }
+ my $url = $CPAN::Config->{urllist}[$i] || $CPAN::Defaultsite;
$url .= "/" unless substr($url,-1) eq "/";
$url .= $file;
$self->debug("localizing perlish[$url]") if $CPAN::DEBUG;
if ($url =~ /^file:/) {
my $l;
- if ($CPAN::META->has_inst('LWP')) {
- require URI::URL;
+ if ($CPAN::META->has_inst('URI::URL')) {
my $u = URI::URL->new($url);
$l = $u->path;
} else { # works only on Unix, is poorly constructed, but
@@ -2080,6 +2351,7 @@ sub hosteasy {
# meant
# file://localhost
$l =~ s|^/||s unless -f $l; # e.g. /P:
+ $self->debug("without URI::URL we try local file $l") if $CPAN::DEBUG;
}
if ( -f $l && -r _) {
$Thesite = $i;
@@ -2095,13 +2367,16 @@ sub hosteasy {
}
}
}
- if ($CPAN::META->has_inst('LWP')) {
+ if ($CPAN::META->has_usable('LWP')) {
$CPAN::Frontend->myprint("Fetching with LWP:
$url
");
unless ($Ua) {
- require LWP::UserAgent;
- $Ua = LWP::UserAgent->new;
+ CPAN::LWP::UserAgent->config;
+ eval { $Ua = CPAN::LWP::UserAgent->new; };
+ if ($@) {
+ $CPAN::Frontent->mywarn("CPAN::LWP::UserAgent->new dies with $@");
+ }
}
my $res = $Ua->mirror($url, $aslocal);
if ($res->is_success) {
@@ -2110,7 +2385,7 @@ sub hosteasy {
utime $now, $now, $aslocal; # download time is more
# important than upload time
return $aslocal;
- } elsif ($url !~ /\.gz\z/) {
+ } elsif ($url !~ /\.gz(?!\n)\Z/) {
my $gzurl = "$url.gz";
$CPAN::Frontend->myprint("Fetching with LWP:
$gzurl
@@ -2121,22 +2396,25 @@ sub hosteasy {
) {
$Thesite = $i;
return $aslocal;
- } else {
- # next HOSTEASY ;
}
} else {
- # Alan Burlison informed me that in firewall envs Net::FTP
- # can still succeed where LWP fails. So we do not skip
- # Net::FTP anymore when LWP is available.
- # next HOSTEASY ;
+ $CPAN::Frontend->myprint(sprintf(
+ "LWP failed with code[%s] message[%s]\n",
+ $res->code,
+ $res->message,
+ ));
+ # Alan Burlison informed me that in firewall environments
+ # Net::FTP can still succeed where LWP fails. So we do not
+ # skip Net::FTP anymore when LWP is available.
}
} else {
- $self->debug("LWP not installed") if $CPAN::DEBUG;
+ $CPAN::Frontend->myprint("LWP not available\n");
}
+ return if $CPAN::Signal;
if ($url =~ m|^ftp://(.*?)/(.*)/(.*)|) {
# that's the nice and easy way thanks to Graham
my($host,$dir,$getfile) = ($1,$2,$3);
- if ($CPAN::META->has_inst('Net::FTP')) {
+ if ($CPAN::META->has_usable('Net::FTP')) {
$dir =~ s|/+|/|g;
$CPAN::Frontend->myprint("Fetching with Net::FTP:
$url
@@ -2147,7 +2425,7 @@ sub hosteasy {
$Thesite = $i;
return $aslocal;
}
- if ($aslocal !~ /\.gz\z/) {
+ if ($aslocal !~ /\.gz(?!\n)\Z/) {
my $gz = "$aslocal.gz";
$CPAN::Frontend->myprint("Fetching with Net::FTP
$url.gz
@@ -2165,6 +2443,7 @@ sub hosteasy {
# next HOSTEASY;
}
}
+ return if $CPAN::Signal;
}
}
@@ -2182,10 +2461,6 @@ sub hosthard {
File::Path::mkpath($aslocal_dir);
HOSTHARD: for $i (@$host_seq) {
my $url = $CPAN::Config->{urllist}[$i] || $CPAN::Defaultsite;
- unless ($self->is_reachable($url)) {
- $CPAN::Frontend->myprint("Skipping $url (not reachable)\n");
- next;
- }
$url .= "/" unless substr($url,-1) eq "/";
$url .= $file;
my($proto,$host,$dir,$getfile);
@@ -2199,91 +2474,90 @@ sub hosthard {
} else {
next HOSTHARD; # who said, we could ftp anything except ftp?
}
+ next HOSTHARD if $proto eq "file"; # file URLs would have had
+ # success above. Likely a bogus URL
$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;
next if $funkyftp =~ /^\s*$/;
- my($want_compressed);
- my $aslocal_uncompressed;
- ($aslocal_uncompressed = $aslocal) =~ s/\.gz//;
- my($source_switch) = "";
+ my($asl_ungz, $asl_gz);
+ ($asl_ungz = $aslocal) =~ s/\.gz//;
+ $asl_gz = "$asl_ungz.gz";
+ my($src_switch) = "";
if ($f eq "lynx"){
- $source_switch = " -source";
+ $src_switch = " -source";
} elsif ($f eq "ncftp"){
- $source_switch = " -c";
+ $src_switch = " -c";
+ } elsif ($f eq "wget"){
+ $src_switch = " -O -";
}
my($chdir) = "";
- my($stdout_redir) = " > $aslocal_uncompressed";
+ my($stdout_redir) = " > $asl_ungz";
if ($f eq "ncftpget"){
$chdir = "cd $aslocal_dir && ";
$stdout_redir = "";
}
$CPAN::Frontend->myprint(
qq[
-Trying with "$funkyftp$source_switch" to get
+Trying with "$funkyftp$src_switch" to get
$url
]);
my($system) =
- "$chdir$funkyftp$source_switch '$url' $devnull$stdout_redir";
+ "$chdir$funkyftp$src_switch '$url' $devnull$stdout_redir";
$self->debug("system[$system]") if $CPAN::DEBUG;
my($wstatus);
if (($wstatus = system($system)) == 0
&&
($f eq "lynx" ?
- -s $aslocal_uncompressed # lynx returns 0 on my
- # system even if it fails
+ -s $asl_ungz # lynx returns 0 when it fails somewhere
: 1
)
) {
if (-s $aslocal) {
# Looks good
- } elsif ($aslocal_uncompressed ne $aslocal) {
+ } elsif ($asl_ungz ne $aslocal) {
# test gzip integrity
- if (
- CPAN::Tarzip->gtest($aslocal_uncompressed)
- ) {
- rename $aslocal_uncompressed, $aslocal;
+ if (CPAN::Tarzip->gtest($asl_ungz)) {
+ # e.g. foo.tar is gzipped --> foo.tar.gz
+ rename $asl_ungz, $aslocal;
} else {
- CPAN::Tarzip->gzip($aslocal_uncompressed,
- "$aslocal_uncompressed.gz");
+ CPAN::Tarzip->gzip($asl_ungz,$asl_gz);
}
}
$Thesite = $i;
return $aslocal;
- } elsif ($url !~ /\.gz\z/) {
- unlink $aslocal_uncompressed if
- -f $aslocal_uncompressed && -s _ == 0;
+ } elsif ($url !~ /\.gz(?!\n)\Z/) {
+ unlink $asl_ungz if
+ -f $asl_ungz && -s _ == 0;
my $gz = "$aslocal.gz";
my $gzurl = "$url.gz";
$CPAN::Frontend->myprint(
qq[
-Trying with "$funkyftp$source_switch" to get
+Trying with "$funkyftp$src_switch" to get
$url.gz
]);
- my($system) = "$funkyftp$source_switch '$url.gz' $devnull > ".
- "$aslocal_uncompressed.gz";
+ my($system) = "$funkyftp$src_switch '$url.gz' $devnull > $asl_gz";
$self->debug("system[$system]") if $CPAN::DEBUG;
my($wstatus);
if (($wstatus = system($system)) == 0
&&
- -s "$aslocal_uncompressed.gz"
+ -s $asl_gz
) {
# test gzip integrity
- if (CPAN::Tarzip->gtest("$aslocal_uncompressed.gz")) {
- CPAN::Tarzip->gunzip("$aslocal_uncompressed.gz",
- $aslocal);
+ if (CPAN::Tarzip->gtest($asl_gz)) {
+ CPAN::Tarzip->gunzip($asl_gz,$aslocal);
} else {
- rename $aslocal_uncompressed, $aslocal;
+ # somebody uncompressed file for us?
+ rename $asl_ungz, $aslocal;
}
$Thesite = $i;
return $aslocal;
} else {
- unlink "$aslocal_uncompressed.gz" if
- -f "$aslocal_uncompressed.gz";
+ unlink $asl_gz if -f $asl_gz;
}
} else {
my $estatus = $wstatus >> 8;
@@ -2295,8 +2569,9 @@ System call "$system"
returned status $estatus (wstat $wstatus)$size
});
}
- }
- }
+ return if $CPAN::Signal;
+ } # lynx,ncftpget,ncftp
+ } # host
}
sub hosthardest {
@@ -2311,10 +2586,6 @@ sub hosthardest {
last HOSTHARDEST;
}
my $url = $CPAN::Config->{urllist}[$i] || $CPAN::Defaultsite;
- unless ($self->is_reachable($url)) {
- $CPAN::Frontend->myprint("Skipping $url (not reachable)\n");
- next;
- }
$url .= "/" unless substr($url,-1) eq "/";
$url .= $file;
$self->debug("localizing ftpwise[$url]") if $CPAN::DEBUG;
@@ -2367,6 +2638,7 @@ sub hosthardest {
} else {
$CPAN::Frontend->myprint("Hmm... Still failed!\n");
}
+ return if $CPAN::Signal;
} else {
$CPAN::Frontend->mywarn(qq{Your $netrcfile is not }.
qq{correctly protected.\n});
@@ -2396,9 +2668,10 @@ sub hosthardest {
} else {
$CPAN::Frontend->myprint("Bad luck... Still failed!\n");
}
+ return if $CPAN::Signal;
$CPAN::Frontend->myprint("Can't access URL $url.\n\n");
sleep 2;
- }
+ } # host
}
sub talk_ftp {
@@ -2526,6 +2799,7 @@ sub new {
}, $class;
}
+# CPAN::FTP::hasdefault;
sub hasdefault { shift->{'hasdefault'} }
sub netrc { shift->{'netrc'} }
sub protected { shift->{'protected'} }
@@ -2573,22 +2847,22 @@ sub cpl {
}
my @return;
if ($pos == 0) {
- @return = grep(
- /^$word/,
- sort qw(
- ! a b d h i m o q r u autobundle clean
- make test install force reload look cvs_import
- )
- );
- } elsif ( $line !~ /^[\!abcdhimorutl]/ ) {
+ @return = grep /^$word/, @CPAN::Complete::COMMANDS;
+ } elsif ( $line !~ /^[\!abcdghimorutl]/ ) {
@return = ();
- } elsif ($line =~ /^a\s/) {
- @return = cplx('CPAN::Author',$word);
+ } elsif ($line =~ /^(a|ls)\s/) {
+ @return = cplx('CPAN::Author',uc($word));
} elsif ($line =~ /^b\s/) {
+ CPAN::Shell->local_bundles;
@return = cplx('CPAN::Bundle',$word);
} elsif ($line =~ /^d\s/) {
@return = cplx('CPAN::Distribution',$word);
- } elsif ($line =~ /^([mru]|make|clean|test|install|readme|look|cvs_import)\s/ ) {
+ } elsif ($line =~ m/^(
+ [mru]|make|clean|dump|get|test|install|readme|look|cvs_import
+ )\s/x ) {
+ if ($word =~ /^Bundle::/) {
+ CPAN::Shell->local_bundles;
+ }
@return = (cplx('CPAN::Module',$word),cplx('CPAN::Bundle',$word));
} elsif ($line =~ /^i\s/) {
@return = cpl_any($word);
@@ -2596,6 +2870,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 = ();
}
@@ -2605,7 +2882,11 @@ sub cpl {
#-> sub CPAN::Complete::cplx ;
sub cplx {
my($class, $word) = @_;
- grep /^\Q$word\E/, map { $_->id } $CPAN::META->all_objects($class);
+ # I believed for many years that this was sorted, today I
+ # realized, it wasn't sorted anymore. Now (rev 1.301 / v 1.55) I
+ # make it sorted again. Maybe sort was dropped when GNU-readline
+ # support came in? The RCS file is difficult to read on that:-(
+ sort grep /^\Q$word\E/, map { $_->id } $CPAN::META->all_objects($class);
}
#-> sub CPAN::Complete::cpl_any ;
@@ -2654,7 +2935,7 @@ package CPAN::Index;
#-> sub CPAN::Index::force_reload ;
sub force_reload {
my($class) = @_;
- $CPAN::Index::last_time = 0;
+ $CPAN::Index::LAST_TIME = 0;
$class->reload(1);
}
@@ -2668,51 +2949,71 @@ sub reload {
for ($CPAN::Config->{index_expire}) {
$_ = 0.001 unless $_ && $_ > 0.001;
}
- return if $last_time + $CPAN::Config->{index_expire}*86400 > $time
+ 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
+ }
+ return if $LAST_TIME + $CPAN::Config->{index_expire}*86400 > $time
and ! $force;
- ## IFF we are developing, it helps to wipe out the memory between
- ## reloads, otherwise it is not what a user expects.
-
- ## undef $CPAN::META; # Neue Gruendlichkeit since v1.52(r1.274)
- ## $CPAN::META = CPAN->new;
- my($debug,$t2);
- $last_time = $time;
-
- my $needshort = $^O eq "dos";
-
- $cl->rd_authindex($cl
- ->reload_x(
- "authors/01mailrc.txt.gz",
- $needshort ?
- File::Spec->catfile('authors', '01mailrc.gz') :
- File::Spec->catfile('authors', '01mailrc.txt.gz'),
- $force));
- $t2 = time;
- $debug = "timing reading 01[".($t2 - $time)."]";
- $time = $t2;
- return if $CPAN::Signal; # this is sometimes lengthy
- $cl->rd_modpacks($cl
- ->reload_x(
- "modules/02packages.details.txt.gz",
- $needshort ?
- File::Spec->catfile('modules', '02packag.gz') :
- File::Spec->catfile('modules', '02packages.details.txt.gz'),
- $force));
- $t2 = time;
- $debug .= "02[".($t2 - $time)."]";
- $time = $t2;
- return if $CPAN::Signal; # this is sometimes lengthy
- $cl->rd_modlist($cl
- ->reload_x(
- "modules/03modlist.data.gz",
- $needshort ?
- File::Spec->catfile('modules', '03mlist.gz') :
- File::Spec->catfile('modules', '03modlist.data.gz'),
- $force));
- $t2 = time;
- $debug .= "03[".($t2 - $time)."]";
- $time = $t2;
- CPAN->debug($debug) if $CPAN::DEBUG;
+ if (0) {
+ # IFF we are developing, it helps to wipe out the memory
+ # between reloads, otherwise it is not what a user expects.
+ undef $CPAN::META; # Neue Gruendlichkeit since v1.52(r1.274)
+ $CPAN::META = CPAN->new;
+ }
+ {
+ my($debug,$t2);
+ local $LAST_TIME = $time;
+ local $CPAN::META->{PROTOCOL} = PROTOCOL;
+
+ my $needshort = $^O eq "dos";
+
+ $cl->rd_authindex($cl
+ ->reload_x(
+ "authors/01mailrc.txt.gz",
+ $needshort ?
+ File::Spec->catfile('authors', '01mailrc.gz') :
+ File::Spec->catfile('authors', '01mailrc.txt.gz'),
+ $force));
+ $t2 = time;
+ $debug = "timing reading 01[".($t2 - $time)."]";
+ $time = $t2;
+ return if $CPAN::Signal; # this is sometimes lengthy
+ $cl->rd_modpacks($cl
+ ->reload_x(
+ "modules/02packages.details.txt.gz",
+ $needshort ?
+ File::Spec->catfile('modules', '02packag.gz') :
+ File::Spec->catfile('modules', '02packages.details.txt.gz'),
+ $force));
+ $t2 = time;
+ $debug .= "02[".($t2 - $time)."]";
+ $time = $t2;
+ return if $CPAN::Signal; # this is sometimes lengthy
+ $cl->rd_modlist($cl
+ ->reload_x(
+ "modules/03modlist.data.gz",
+ $needshort ?
+ File::Spec->catfile('modules', '03mlist.gz') :
+ File::Spec->catfile('modules', '03modlist.data.gz'),
+ $force));
+ $cl->write_metadata_cache;
+ $t2 = time;
+ $debug .= "03[".($t2 - $time)."]";
+ $time = $t2;
+ CPAN->debug($debug) if $CPAN::DEBUG;
+ }
+ $LAST_TIME = $time;
+ $CPAN::META->{PROTOCOL} = PROTOCOL;
}
#-> sub CPAN::Index::reload_x ;
@@ -2745,9 +3046,6 @@ sub rd_authindex {
my @lines;
return unless defined $index_target;
$CPAN::Frontend->myprint("Going to read $index_target\n");
-# my $fh = CPAN::Tarzip->TIEHANDLE($index_target);
-# while ($_ = $fh->READLINE) {
- # no strict 'refs';
local(*FH);
tie *FH, CPAN::Tarzip, $index_target;
local($/) = "\n";
@@ -2773,7 +3071,7 @@ sub userid {
#-> sub CPAN::Index::rd_modpacks ;
sub rd_modpacks {
- my($cl, $index_target) = @_;
+ my($self, $index_target) = @_;
my @lines;
return unless defined $index_target;
$CPAN::Frontend->myprint("Going to read $index_target\n");
@@ -2785,16 +3083,78 @@ sub rd_modpacks {
unshift @ls, "\n" x length($1) if /^(\n+)/;
push @lines, @ls;
}
+ # read header
+ my($line_count,$last_updated);
while (@lines) {
my $shift = shift(@lines);
last if $shift =~ /^\s*$/;
+ $shift =~ /^Line-Count:\s+(\d+)/ and $line_count = $1;
+ $shift =~ /^Last-Updated:\s+(.+)/ and $last_updated = $1;
}
+ if (not defined $line_count) {
+
+ warn qq{Warning: Your $index_target does not contain a Line-Count header.
+Please check the validity of the index file by comparing it to more
+than one CPAN mirror. I'll continue but problems seem likely to
+happen.\a
+};
+
+ sleep 5;
+ } elsif ($line_count != scalar @lines) {
+
+ warn sprintf qq{Warning: Your %s
+contains a Line-Count header of %d but I see %d lines there. Please
+check the validity of the index file by comparing it to more than one
+CPAN mirror. I'll continue but problems seem likely to happen.\a\n},
+$index_target, $line_count, scalar(@lines);
+
+ }
+ if (not defined $last_updated) {
+
+ warn qq{Warning: Your $index_target does not contain a Last-Updated header.
+Please check the validity of the index file by comparing it to more
+than one CPAN mirror. I'll continue but problems seem likely to
+happen.\a
+};
+
+ sleep 5;
+ } else {
+
+ $CPAN::Frontend
+ ->myprint(sprintf qq{ Database was generated on %s\n},
+ $last_updated);
+ $DATE_OF_02 = $last_updated;
+
+ if ($CPAN::META->has_inst(HTTP::Date)) {
+ require HTTP::Date;
+ my($age) = (time - HTTP::Date::str2time($last_updated))/3600/24;
+ if ($age > 30) {
+
+ $CPAN::Frontend
+ ->mywarn(sprintf
+ qq{Warning: This index file is %d days old.
+ Please check the host you chose as your CPAN mirror for staleness.
+ I'll continue but problems seem likely to happen.\a\n},
+ $age);
+
+ }
+ } else {
+ $CPAN::Frontend->myprint(" HTTP::Date not available\n");
+ }
+ }
+
+
+ # A necessity since we have metadata_cache: delete what isn't
+ # there anymore
+ my $secondtime = $CPAN::META->exists("CPAN::Module","CPAN");
+ CPAN->debug("secondtime[$secondtime]") if $CPAN::DEBUG;
+ my(%exists);
foreach (@lines) {
chomp;
- my($mod,$version,$dist) = split;
-### $version =~ s/^\+//;
-
- # if it is a bundle, instantiate a bundle object
+ # before 1.56 we split into 3 and discarded the rest. From
+ # 1.57 we assign remaining text to $comment thus allowing to
+ # influence isa_perl
+ my($mod,$version,$dist,$comment) = split " ", $_, 4;
my($bundle,$id,$userid);
if ($mod eq 'CPAN' &&
@@ -2803,18 +3163,18 @@ sub rd_modpacks {
CPAN::Queue->exists('CPAN')
)
) {
- local($^W)= 0;
- if ($version > $CPAN::VERSION){
- $CPAN::Frontend->myprint(qq{
- There\'s a new CPAN.pm version (v$version) available!
+ local($^W)= 0;
+ if ($version > $CPAN::VERSION){
+ $CPAN::Frontend->myprint(qq{
+ There's a new CPAN.pm version (v$version) available!
[Current version is v$CPAN::VERSION]
You might want to try
install Bundle::CPAN
reload cpan
without quitting the current session. It should be a seamless upgrade
while we are running...
-});
- sleep 2;
+}); #});
+ sleep 2;
$CPAN::Frontend->myprint(qq{\n});
}
last if $CPAN::Signal;
@@ -2824,29 +3184,29 @@ sub rd_modpacks {
if ($bundle){
$id = $CPAN::META->instance('CPAN::Bundle',$mod);
- # warn "made mod[$mod]a bundle";
# Let's make it a module too, because bundles have so much
- # in common with modules
- $CPAN::META->instance('CPAN::Module',$mod);
- # warn "made mod[$mod]a module";
+ # in common with modules.
-# This "next" makes us faster but if the job is running long, we ignore
-# rereads which is bad. So we have to be a bit slower again.
-# } elsif ($CPAN::META->exists('CPAN::Module',$mod)) {
-# next;
+ # Changed in 1.57_63: seems like memory bloat now without
+ # any value, so commented out
+
+ # $CPAN::META->instance('CPAN::Module',$mod);
+
+ } else {
- }
- else {
# instantiate a module object
$id = $CPAN::META->instance('CPAN::Module',$mod);
+
}
- if ($id->cpan_file ne $dist){
- $userid = $cl->userid($dist);
+ if ($id->cpan_file ne $dist){ # update only if file is
+ # different. CPAN prohibits same
+ # name with different version
+ $userid = $self->userid($dist);
$id->set(
'CPAN_USERID' => $userid,
'CPAN_VERSION' => $version,
- 'CPAN_FILE' => $dist
+ 'CPAN_FILE' => $dist,
);
}
@@ -2863,13 +3223,29 @@ sub rd_modpacks {
$CPAN::META->instance(
'CPAN::Distribution' => $dist
)->set(
- 'CPAN_USERID' => $userid
+ 'CPAN_USERID' => $userid,
+ 'CPAN_COMMENT' => $comment,
);
}
-
+ if ($secondtime) {
+ for my $name ($mod,$dist) {
+ CPAN->debug("exists name[$name]") if $CPAN::DEBUG;
+ $exists{$name} = undef;
+ }
+ }
return if $CPAN::Signal;
}
undef $fh;
+ if ($secondtime) {
+ for my $class (qw(CPAN::Module CPAN::Bundle CPAN::Distribution)) {
+ for my $o ($CPAN::META->all_objects($class)) {
+ next if exists $exists{$o->{ID}};
+ $CPAN::META->delete($class,$o->{ID});
+ CPAN->debug("deleting ID[$o->{ID}] in class[$class]")
+ if $CPAN::DEBUG;
+ }
+ }
+ }
}
#-> sub CPAN::Index::rd_modlist ;
@@ -2889,8 +3265,8 @@ sub rd_modlist {
while (@eval) {
my $shift = shift(@eval);
if ($shift =~ /^Date:\s+(.*)/){
- return if $date_of_03 eq $1;
- ($date_of_03) = $1;
+ return if $DATE_OF_03 eq $1;
+ ($DATE_OF_03) = $1;
}
last if $shift =~ /^\s*$/;
}
@@ -2903,26 +3279,132 @@ 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;
}
}
+#-> sub CPAN::Index::write_metadata_cache ;
+sub write_metadata_cache {
+ my($self) = @_;
+ return unless $CPAN::Config->{'cache_metadata'};
+ return unless $CPAN::META->has_usable("Storable");
+ my $cache;
+ foreach my $k (qw(CPAN::Bundle CPAN::Author CPAN::Module
+ CPAN::Distribution)) {
+ $cache->{$k} = $CPAN::META->{readonly}{$k}; # unsafe meta access, ok
+ }
+ my $metadata_file = MM->catfile($CPAN::Config->{cpan_home},"Metadata");
+ $cache->{last_time} = $LAST_TIME;
+ $cache->{DATE_OF_02} = $DATE_OF_02;
+ $cache->{PROTOCOL} = PROTOCOL;
+ $CPAN::Frontend->myprint("Going to write $metadata_file\n");
+ eval { Storable::nstore($cache, $metadata_file) };
+ $CPAN::Frontend->mywarn($@) if $@;
+}
+
+#-> sub CPAN::Index::read_metadata_cache ;
+sub read_metadata_cache {
+ my($self) = @_;
+ return unless $CPAN::Config->{'cache_metadata'};
+ return unless $CPAN::META->has_usable("Storable");
+ my $metadata_file = MM->catfile($CPAN::Config->{cpan_home},"Metadata");
+ return unless -r $metadata_file and -f $metadata_file;
+ $CPAN::Frontend->myprint("Going to read $metadata_file\n");
+ my $cache;
+ eval { $cache = Storable::retrieve($metadata_file) };
+ $CPAN::Frontend->mywarn($@) if $@;
+ if (!$cache || ref $cache ne 'HASH'){
+ $LAST_TIME = 0;
+ return;
+ }
+ if (exists $cache->{PROTOCOL}) {
+ if (PROTOCOL > $cache->{PROTOCOL}) {
+ $CPAN::Frontend->mywarn(sprintf("Ignoring Metadata cache written ".
+ "with protocol v%s, requiring v%s",
+ $cache->{PROTOCOL},
+ PROTOCOL)
+ );
+ return;
+ }
+ } else {
+ $CPAN::Frontend->mywarn("Ignoring Metadata cache written ".
+ "with protocol v1.0");
+ return;
+ }
+ my $clcnt = 0;
+ my $idcnt = 0;
+ while(my($class,$v) = each %$cache) {
+ next unless $class =~ /^CPAN::/;
+ $CPAN::META->{readonly}{$class} = $v; # unsafe meta access, ok
+ while (my($id,$ro) = each %$v) {
+ $CPAN::META->{readwrite}{$class}{$id} ||=
+ $class->new(ID=>$id, RO=>$ro);
+ $idcnt++;
+ }
+ $clcnt++;
+ }
+ unless ($clcnt) { # sanity check
+ $CPAN::Frontend->myprint("Warning: Found no data in $metadata_file\n");
+ return;
+ }
+ if ($idcnt < 1000) {
+ $CPAN::Frontend->myprint("Warning: Found only $idcnt objects ".
+ "in $metadata_file\n");
+ return;
+ }
+ $CPAN::META->{PROTOCOL} ||=
+ $cache->{PROTOCOL}; # reading does not up or downgrade, but it
+ # does initialize to some protocol
+ $LAST_TIME = $cache->{last_time};
+ $DATE_OF_02 = $cache->{DATE_OF_02};
+ $CPAN::Frontend->myprint(" Database was generated on $DATE_OF_02\n");
+ return;
+}
+
package CPAN::InfoObj;
+# Accessors
+sub cpan_userid { shift->{RO}{CPAN_USERID} }
+sub id { shift->{ID}; }
+
#-> sub CPAN::InfoObj::new ;
-sub new { my $this = bless {}, shift; %$this = @_; $this }
+sub new {
+ my $this = bless {}, shift;
+ %$this = @_;
+ $this
+}
+
+# The set method may only be used by code that reads index data or
+# otherwise "objective" data from the outside world. All session
+# related material may do anything else with instance variables but
+# must not touch the hash under the RO attribute. The reason is that
+# the RO hash gets written to Metadata file and is thus persistent.
#-> sub CPAN::InfoObj::set ;
sub set {
my($self,%att) = @_;
- my(%oldatt) = %$self;
- %$self = (%oldatt, %att);
-}
+ my $class = ref $self;
+
+ # This must be ||=, not ||, because only if we write an empty
+ # reference, only then the set method will write into the readonly
+ # area. But for Distributions that spring into existence, maybe
+ # because of a typo, we do not like it that they are written into
+ # the readonly area and made permanent (at least for a while) and
+ # that is why we do not "allow" other places to call ->set.
+ unless ($self->id) {
+ CPAN->debug("Bug? Empty ID, rejecting");
+ return;
+ }
+ my $ro = $self->{RO} =
+ $CPAN::META->{readonly}{$class}{$self->id} ||= {};
-#-> sub CPAN::InfoObj::id ;
-sub id { shift->{'ID'} }
+ while (my($k,$v) = each %att) {
+ $ro->{$k} = $v;
+ }
+}
#-> sub CPAN::InfoObj::as_glimpse ;
sub as_glimpse {
@@ -2941,31 +3423,39 @@ sub as_string {
my $class = ref($self);
$class =~ s/^CPAN:://;
push @m, $class, " id = $self->{ID}\n";
- for (sort keys %$self) {
- next if $_ eq 'ID';
+ for (sort keys %{$self->{RO}}) {
+ # 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->{$_}
- )->email) {
- $extra .= " <$email>";
- } else {
- $extra .= " <no email>";
- }
- $extra .= ")";
- }
- if (ref($self->{$_}) eq "ARRAY") { # language interface? XXX
- push @m, sprintf " %-12s %s%s\n", $_, "@{$self->{$_}}", $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;
+ }
+ for (sort keys %$self) {
+ next if m/^(ID|RO)$/;
+ if (ref($self->{$_}) eq "ARRAY") {
+ push @m, sprintf " %-12s %s\n", $_, "@{$self->{$_}}";
} elsif (ref($self->{$_}) eq "HASH") {
push @m, sprintf(
- " %-12s %s%s\n",
+ " %-12s %s\n",
$_,
join(" ",keys %{$self->{$_}}),
- $extra);
+ );
} else {
- push @m, sprintf " %-12s %s%s\n", $_, $self->{$_}, $extra;
+ push @m, sprintf " %-12s %s\n", $_, $self->{$_};
}
}
join "", @m, "\n";
@@ -2974,42 +3464,204 @@ 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 ;
sub dump {
my($self) = @_;
require Data::Dumper;
- Data::Dumper::Dumper($self);
+ print Data::Dumper::Dumper($self);
}
package CPAN::Author;
+#-> sub CPAN::Author::id
+sub id {
+ my $self = shift;
+ my $id = $self->{ID};
+ $CPAN::Frontend->mydie("Illegal author id[$id]") unless $id =~ /^[A-Z]/;
+ $id;
+}
+
#-> sub CPAN::Author::as_glimpse ;
sub as_glimpse {
my($self) = @_;
my(@m);
my $class = ref($self);
$class =~ s/^CPAN:://;
- push @m, sprintf "%-15s %s (%s)\n", $class, $self->{ID}, $self->fullname;
+ push @m, sprintf(qq{%-15s %s ("%s" <%s>)\n},
+ $class,
+ $self->{ID},
+ $self->fullname,
+ $self->email);
join "", @m;
}
-# Dead code, I would have liked to have,,, but it was never reached,,,
-#sub make {
-# my($self) = @_;
-# return "Don't be silly, you can't make $self->{FULLNAME} ;-)\n";
-#}
-
#-> sub CPAN::Author::fullname ;
-sub fullname { shift->{'FULLNAME'} }
+sub fullname {
+ shift->{RO}{FULLNAME};
+}
*name = \&fullname;
#-> sub CPAN::Author::email ;
-sub email { shift->{'EMAIL'} }
+sub email { shift->{RO}{EMAIL}; }
+
+#-> sub CPAN::Author::ls ;
+sub ls {
+ my $self = shift;
+ my $id = $self->id;
+
+ # adapted from CPAN::Distribution::verifyMD5 ;
+ my(@csf); # chksumfile
+ @csf = $self->id =~ /(.)(.)(.*)/;
+ $csf[1] = join "", @csf[0,1];
+ $csf[2] = join "", @csf[1,2];
+ my(@dl);
+ @dl = $self->dir_listing([$csf[0],"CHECKSUMS"], 0);
+ unless (grep {$_->[2] eq $csf[1]} @dl) {
+ $CPAN::Frontend->myprint("No files in the directory of $id\n");
+ return;
+ }
+ @dl = $self->dir_listing([@csf[0,1],"CHECKSUMS"], 0);
+ unless (grep {$_->[2] eq $csf[2]} @dl) {
+ $CPAN::Frontend->myprint("No files in the directory of $id\n");
+ return;
+ }
+ @dl = $self->dir_listing([@csf,"CHECKSUMS"], 1);
+ $CPAN::Frontend->myprint(join "", map {
+ sprintf("%8d %10s %s/%s\n", $_->[0], $_->[1], $id, $_->[2])
+ } sort { $a->[2] cmp $b->[2] } @dl);
+}
+
+# returns an array of arrays, the latter contain (size,mtime,filename)
+#-> sub CPAN::Author::dir_listing ;
+sub dir_listing {
+ my $self = shift;
+ my $chksumfile = shift;
+ my $recursive = shift;
+ my $lc_want =
+ MM->catfile($CPAN::Config->{keep_source_where},
+ "authors", "id", @$chksumfile);
+ local($") = "/";
+ # connect "force" argument with "index_expire".
+ my $force = 0;
+ if (my @stat = stat $lc_want) {
+ $force = $stat[9] + $CPAN::Config->{index_expire}*86400 <= time;
+ }
+ my $lc_file = CPAN::FTP->localize("authors/id/@$chksumfile",
+ $lc_want,$force);
+ unless ($lc_file) {
+ $CPAN::Frontend->myprint("Trying $lc_want.gz\n");
+ $chksumfile->[-1] .= ".gz";
+ $lc_file = CPAN::FTP->localize("authors/id/@$chksumfile",
+ "$lc_want.gz",1);
+ if ($lc_file) {
+ $lc_file =~ s{\.gz(?!\n)\Z}{}; #};
+ CPAN::Tarzip->gunzip("$lc_file.gz",$lc_file);
+ } else {
+ return;
+ }
+ }
+
+ # adapted from CPAN::Distribution::MD5_check_file ;
+ my $fh = FileHandle->new;
+ my($cksum);
+ if (open $fh, $lc_file){
+ local($/);
+ my $eval = <$fh>;
+ $eval =~ s/\015?\012/\n/g;
+ close $fh;
+ my($comp) = Safe->new();
+ $cksum = $comp->reval($eval);
+ if ($@) {
+ rename $lc_file, "$lc_file.bad";
+ Carp::confess($@) if $@;
+ }
+ } else {
+ Carp::carp "Could not open $lc_file for reading";
+ }
+ my(@result,$f);
+ for $f (sort keys %$cksum) {
+ if (exists $cksum->{$f}{isdir}) {
+ if ($recursive) {
+ my(@dir) = @$chksumfile;
+ pop @dir;
+ push @dir, $f, "CHECKSUMS";
+ push @result, map {
+ [$_->[0], $_->[1], "$f/$_->[2]"]
+ } $self->dir_listing(\@dir,1);
+ } else {
+ push @result, [ 0, "-", $f ];
+ }
+ } else {
+ push @result, [
+ ($cksum->{$f}{"size"}||0),
+ $cksum->{$f}{"mtime"}||"---",
+ $f
+ ];
+ }
+ }
+ @result;
+}
package CPAN::Distribution;
+# Accessors
+sub cpan_comment { shift->{RO}{CPAN_COMMENT} }
+
+sub undelay {
+ my $self = shift;
+ delete $self->{later};
+}
+
+# CPAN::Distribution::normalize
+sub normalize {
+ my($self,$s) = @_;
+ $s = $self->id unless defined $s;
+ if (
+ $s =~ tr|/|| == 1
+ or
+ $s !~ m|[A-Z]/[A-Z-]{2}/[A-Z-]{2,}/|
+ ) {
+ return $s if $s =~ m:^N/A|^Contact Author: ;
+ $s =~ s|^(.)(.)([^/]*/)(.+)$|$1/$1$2/$1$2$3$4| or
+ $CPAN::Frontend->mywarn("Strange distribution name [$s]");
+ CPAN->debug("s[$s]") if $CPAN::DEBUG;
+ }
+ $s;
+}
+
+#-> sub CPAN::Distribution::color_cmd_tmps ;
+sub color_cmd_tmps {
+ my($self) = shift;
+ my($depth) = shift || 0;
+ my($color) = shift || 0;
+ # a distribution needs to recurse into its prereq_pms
+
+ return if exists $self->{incommandcolor}
+ && $self->{incommandcolor}==$color;
+ $CPAN::Frontend->mydie(sprintf("CPAN.pm panic: deep recursion in ".
+ "color_cmd_tmps depth[%s] self[%s] id[%s]",
+ $depth,
+ $self,
+ $self->id
+ )) if $depth>=100;
+ ##### warn "color_cmd_tmps $depth $color " . $self->id; # sleep 1;
+ my $prereq_pm = $self->prereq_pm;
+ if (defined $prereq_pm) {
+ for my $pre (keys %$prereq_pm) {
+ my $premo = CPAN::Shell->expand("Module",$pre);
+ $premo->color_cmd_tmps($depth+1,$color);
+ }
+ }
+ if ($color==0) {
+ delete $self->{sponsored_mods};
+ delete $self->{badtestcnt};
+ }
+ $self->{incommandcolor} = $color;
+}
+
#-> sub CPAN::Distribution::as_string ;
sub as_string {
my $self = shift;
@@ -3020,20 +3672,50 @@ 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_file = $mod->cpan_file 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::uptodate ;
+sub uptodate {
+ my($self) = @_;
+ my $c;
+ foreach $c ($self->containsmods) {
+ my $obj = CPAN::Shell->expandany($c);
+ return 0 unless $obj->uptodate;
+ }
+ return 1;
}
#-> sub CPAN::Distribution::called_for ;
sub called_for {
my($self,$id) = @_;
- $self->{'CALLED_FOR'} = $id if defined $id;
- return $self->{'CALLED_FOR'};
+ $self->{CALLED_FOR} = $id if defined $id;
+ return $self->{CALLED_FOR};
+}
+
+#-> sub CPAN::Distribution::safe_chdir ;
+sub safe_chdir {
+ my($self,$todir) = @_;
+ # we die if we cannot chdir and we are debuggable
+ Carp::confess("safe_chdir called without todir argument")
+ unless defined $todir and length $todir;
+ if (chdir $todir) {
+ $self->debug(sprintf "changed directory to %s", CPAN::anycwd())
+ if $CPAN::DEBUG;
+ } else {
+ my $cwd = CPAN::anycwd();
+ $CPAN::Frontend->mydie(qq{Could not chdir from cwd[$cwd] }.
+ qq{to todir[$todir]: $!});
+ }
}
#-> sub CPAN::Distribution::get ;
@@ -3042,106 +3724,180 @@ sub get {
EXCUSE: {
my @e;
exists $self->{'build_dir'} and push @e,
- "Unwrapped into directory $self->{'build_dir'}";
+ "Is already unwrapped into directory $self->{'build_dir'}";
$CPAN::Frontend->myprint(join "", map {" $_\n"} @e) and return if @e;
}
+ my $sub_wd = CPAN::anycwd(); # for cleaning up as good as possible
+
+ #
+ # Get the file on local disk
+ #
+
my($local_file);
my($local_wanted) =
- MM->catfile(
- $CPAN::Config->{keep_source_where},
- "authors",
- "id",
- split("/",$self->{ID})
- );
+ MM->catfile(
+ $CPAN::Config->{keep_source_where},
+ "authors",
+ "id",
+ split("/",$self->id)
+ );
$self->debug("Doing localize") if $CPAN::DEBUG;
- $local_file =
- CPAN::FTP->localize("authors/id/$self->{ID}", $local_wanted)
- or $CPAN::Frontend->mydie("Giving up on '$local_wanted'\n");
+ unless ($local_file =
+ CPAN::FTP->localize("authors/id/$self->{ID}",
+ $local_wanted)) {
+ my $note = "";
+ if ($CPAN::Index::DATE_OF_02) {
+ $note = "Note: Current database in memory was generated ".
+ "on $CPAN::Index::DATE_OF_02\n";
+ }
+ $CPAN::Frontend->mydie("Giving up on '$local_wanted'\n$note");
+ }
+ $self->debug("local_file[$local_file]") if $CPAN::DEBUG;
$self->{localfile} = $local_file;
- my $builddir = $CPAN::META->{cachemgr}->dir;
- $self->debug("doing chdir $builddir") if $CPAN::DEBUG;
- chdir $builddir or Carp::croak("Couldn't chdir $builddir: $!");
- my $packagedir;
+ return if $CPAN::Signal;
- $self->debug("local_file[$local_file]") if $CPAN::DEBUG;
- if ($CPAN::META->has_inst('MD5')) {
+ #
+ # Check integrity
+ #
+ if ($CPAN::META->has_inst("MD5")) {
$self->debug("MD5 is installed, verifying");
$self->verifyMD5;
} else {
$self->debug("MD5 is NOT installed");
}
+ return if $CPAN::Signal;
+
+ #
+ # Create a clean room and go there
+ #
+ $CPAN::META->{cachemgr} ||= CPAN::CacheMgr->new(); # unsafe meta access, ok
+ my $builddir = $CPAN::META->{cachemgr}->dir; # unsafe meta access, ok
+ $self->safe_chdir($builddir);
$self->debug("Removing tmp") if $CPAN::DEBUG;
File::Path::rmtree("tmp");
mkdir "tmp", 0755 or Carp::croak "Couldn't mkdir tmp: $!";
- chdir "tmp";
- $self->debug("Changed directory to tmp") if $CPAN::DEBUG;
- if (! $local_file) {
- Carp::croak "bad download, can't do anything :-(\n";
- } elsif ($local_file =~ /(\.tar\.(gz|Z)|\.tgz)\z/i){
+ if ($CPAN::Signal){
+ $self->safe_chdir($sub_wd);
+ return;
+ }
+ $self->safe_chdir("tmp");
+
+ #
+ # Unpack the goods
+ #
+ if ($local_file =~ /(\.tar\.(gz|Z)|\.tgz)(?!\n)\Z/i){
+ $self->{was_uncompressed}++ unless CPAN::Tarzip->gtest($local_file);
$self->untar_me($local_file);
- } elsif ( $local_file =~ /\.zip\z/i ) {
+ } elsif ( $local_file =~ /\.zip(?!\n)\Z/i ) {
$self->unzip_me($local_file);
- } elsif ( $local_file =~ /\.pm\.(gz|Z)\z/) {
+ } elsif ( $local_file =~ /\.pm\.(gz|Z)(?!\n)\Z/) {
+ $self->{was_uncompressed}++ unless CPAN::Tarzip->gtest($local_file);
$self->pm2dir_me($local_file);
} else {
$self->{archived} = "NO";
+ $self->safe_chdir($sub_wd);
+ return;
}
- chdir File::Spec->updir;
- if ($self->{archived} ne 'NO') {
- chdir File::Spec->catdir(File::Spec->curdir, "tmp");
- # Let's check if the package has its own directory.
- my $dh = DirHandle->new(File::Spec->curdir)
- or Carp::croak("Couldn't opendir .: $!");
- my @readdir = grep $_ !~ /^\.\.?\z/s, $dh->read; ### MAC??
- $dh->close;
- my ($distdir,$packagedir);
- if (@readdir == 1 && -d $readdir[0]) {
- $distdir = $readdir[0];
- $packagedir = MM->catdir($builddir,$distdir);
- -d $packagedir and $CPAN::Frontend->myprint("Removing previously used $packagedir\n");
- File::Path::rmtree($packagedir);
- rename($distdir,$packagedir) or Carp::confess("Couldn't rename $distdir to $packagedir: $!");
- } else {
- my $pragmatic_dir = $self->{'CPAN_USERID'} . '000';
- $pragmatic_dir =~ s/\W_//g;
- $pragmatic_dir++ while -d "../$pragmatic_dir";
- $packagedir = MM->catdir($builddir,$pragmatic_dir);
- File::Path::mkpath($packagedir);
- my($f);
- for $f (@readdir) { # is already without "." and ".."
- my $to = MM->catdir($packagedir,$f);
- rename($f,$to) or Carp::confess("Couldn't rename $f to $to: $!");
- }
- }
- $self->{'build_dir'} = $packagedir;
- chdir File::Spec->updir;
-
- $self->debug("Changed directory to .. (self is $self [".$self->as_string."])")
- if $CPAN::DEBUG;
- File::Path::rmtree("tmp");
- if ($CPAN::Config->{keep_source_where} =~ /^no/i ){
- $CPAN::Frontend->myprint("Going to unlink $local_file\n");
- unlink $local_file or Carp::carp "Couldn't unlink $local_file";
- }
- my($makefilepl) = MM->catfile($packagedir,"Makefile.PL");
- unless (-f $makefilepl) {
- my($configure) = MM->catfile($packagedir,"Configure");
- if (-f $configure) {
- # do we have anything to do?
- $self->{'configure'} = $configure;
- } elsif (-f MM->catfile($packagedir,"Makefile")) {
- $CPAN::Frontend->myprint(qq{
+
+ # we are still in the tmp directory!
+ # Let's check if the package has its own directory.
+ my $dh = DirHandle->new(File::Spec->curdir)
+ or Carp::croak("Couldn't opendir .: $!");
+ my @readdir = grep $_ !~ /^\.\.?(?!\n)\Z/s, $dh->read; ### MAC??
+ $dh->close;
+ my ($distdir,$packagedir);
+ if (@readdir == 1 && -d $readdir[0]) {
+ $distdir = $readdir[0];
+ $packagedir = MM->catdir($builddir,$distdir);
+ $self->debug("packagedir[$packagedir]builddir[$builddir]distdir[$distdir]")
+ if $CPAN::DEBUG;
+ -d $packagedir and $CPAN::Frontend->myprint("Removing previously used ".
+ "$packagedir\n");
+ File::Path::rmtree($packagedir);
+ rename($distdir,$packagedir) or
+ Carp::confess("Couldn't rename $distdir to $packagedir: $!");
+ $self->debug(sprintf("renamed distdir[%s] to packagedir[%s] -e[%s]-d[%s]",
+ $distdir,
+ $packagedir,
+ -e $packagedir,
+ -d $packagedir,
+ )) if $CPAN::DEBUG;
+ } else {
+ my $userid = $self->cpan_userid;
+ unless ($userid) {
+ CPAN->debug("no userid? self[$self]");
+ $userid = "anon";
+ }
+ my $pragmatic_dir = $userid . '000';
+ $pragmatic_dir =~ s/\W_//g;
+ $pragmatic_dir++ while -d "../$pragmatic_dir";
+ $packagedir = MM->catdir($builddir,$pragmatic_dir);
+ $self->debug("packagedir[$packagedir]") if $CPAN::DEBUG;
+ File::Path::mkpath($packagedir);
+ my($f);
+ for $f (@readdir) { # is already without "." and ".."
+ my $to = MM->catdir($packagedir,$f);
+ rename($f,$to) or Carp::confess("Couldn't rename $f to $to: $!");
+ }
+ }
+ if ($CPAN::Signal){
+ $self->safe_chdir($sub_wd);
+ return;
+ }
+
+ $self->{'build_dir'} = $packagedir;
+ $self->safe_chdir(File::Spec->updir);
+ File::Path::rmtree("tmp");
+
+ my($mpl) = MM->catfile($packagedir,"Makefile.PL");
+ my($mpl_exists) = -f $mpl;
+ unless ($mpl_exists) {
+ # NFS has been reported to have racing problems after the
+ # renaming of a directory in some environments.
+ # This trick helps.
+ sleep 1;
+ my $mpldh = DirHandle->new($packagedir)
+ or Carp::croak("Couldn't opendir $packagedir: $!");
+ $mpl_exists = grep /^Makefile\.PL$/, $mpldh->read;
+ $mpldh->close;
+ }
+ unless ($mpl_exists) {
+ $self->debug(sprintf("makefilepl[%s]anycwd[%s]",
+ $mpl,
+ CPAN::anycwd(),
+ )) if $CPAN::DEBUG;
+ my($configure) = MM->catfile($packagedir,"Configure");
+ if (-f $configure) {
+ # do we have anything to do?
+ $self->{'configure'} = $configure;
+ } elsif (-f MM->catfile($packagedir,"Makefile")) {
+ $CPAN::Frontend->myprint(qq{
Package comes with a Makefile and without a Makefile.PL.
We\'ll try to build it with that Makefile then.
});
- $self->{writemakefile} = "YES";
- sleep 2;
- } else {
- my $fh = FileHandle->new(">$makefilepl")
- or Carp::croak("Could not open >$makefilepl");
- my $cf = $self->called_for || "unknown";
- $fh->print(
+ $self->{writemakefile} = "YES";
+ sleep 2;
+ } else {
+ my $cf = $self->called_for || "unknown";
+ if ($cf =~ m|/|) {
+ $cf =~ s|.*/||;
+ $cf =~ s|\W.*||;
+ }
+ $cf =~ s|[/\\:]||g; # risk of filesystem damage
+ $cf = "unknown" unless length($cf);
+ $CPAN::Frontend->myprint(qq{Package seems to come without Makefile.PL.
+ (The test -f "$mpl" returned false.)
+ Writing one on our own (setting NAME to $cf)\a\n});
+ $self->{had_no_makefile_pl}++;
+ sleep 3;
+
+ # Writing our own Makefile.PL
+
+ my $fh = FileHandle->new;
+ $fh->open(">$mpl")
+ or Carp::croak("Could not open >$mpl: $!");
+ $fh->print(
qq{# This Makefile.PL has been autogenerated by the module CPAN.pm
# because there was no Makefile.PL supplied.
# Autogenerated on: }.scalar localtime().qq{
@@ -3150,14 +3906,14 @@ use ExtUtils::MakeMaker;
WriteMakefile(NAME => q[$cf]);
});
- $CPAN::Frontend->myprint(qq{Package comes without Makefile.PL.
- Writing one on our own (calling it $cf)\n});
- }
- }
+ $fh->close;
+ }
}
+
return $self;
}
+# CPAN::Distribution::untar_me ;
sub untar_me {
my($self,$local_file) = @_;
$self->{archived} = "tar";
@@ -3168,22 +3924,23 @@ sub untar_me {
}
}
+# CPAN::Distribution::unzip_me ;
sub unzip_me {
my($self,$local_file) = @_;
$self->{archived} = "zip";
- my $system = "$CPAN::Config->{unzip} $local_file";
- if (system($system) == 0) {
+ if (CPAN::Tarzip->unzip($local_file)) {
$self->{unwrapped} = "YES";
} else {
$self->{unwrapped} = "NO";
}
+ return;
}
sub pm2dir_me {
my($self,$local_file) = @_;
$self->{archived} = "pm";
my $to = File::Basename::basename($local_file);
- $to =~ s/\.(gz|Z)\z//;
+ $to =~ s/\.(gz|Z)(?!\n)\Z//;
if (CPAN::Tarzip->gunzip($local_file,$to)) {
$self->{unwrapped} = "YES";
} else {
@@ -3195,7 +3952,7 @@ sub pm2dir_me {
sub new {
my($class,%att) = @_;
- $CPAN::META->{cachemgr} ||= CPAN::CacheMgr->new();
+ # $CPAN::META->{cachemgr} ||= CPAN::CacheMgr->new();
my $this = { %att };
return bless $this, $class;
@@ -3222,18 +3979,25 @@ Please define it with "o conf shell <your shell>"
return;
}
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();
- chdir($dir);
+ my $dir;
+ unless ($dir = $self->dir) {
+ $self->get;
+ }
+ unless ($dir ||= $self->dir) {
+ $CPAN::Frontend->mywarn(qq{
+Could not determine which directory to use for looking at $dist.
+});
+ return;
+ }
+ my $pwd = CPAN::anycwd();
+ $self->safe_chdir($dir);
$CPAN::Frontend->myprint(qq{Working directory is $dir\n});
system($CPAN::Config->{'shell'}) == 0
or $CPAN::Frontend->mydie("Subprocess shell error");
- chdir($pwd);
+ $self->safe_chdir($pwd);
}
+# CPAN::Distribution::cvs_import ;
sub cvs_import {
my($self) = @_;
$self->get;
@@ -3243,10 +4007,10 @@ sub cvs_import {
my $module = $CPAN::META->instance('CPAN::Module', $package);
my $version = $module->cpan_version;
- my $userid = $self->{CPAN_USERID};
+ my $userid = $self->cpan_userid;
my $cvs_dir = (split '/', $dir)[-1];
- $cvs_dir =~ s/-\d+[^-]+\z//;
+ $cvs_dir =~ s/-\d+[^-]+(?!\n)\Z//;
my $cvs_root =
$CPAN::Config->{cvsroot} || $ENV{CVSROOT};
my $cvs_site_perl =
@@ -3259,17 +4023,15 @@ 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();
- chdir($dir);
+ 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});
$CPAN::Frontend->myprint(qq{@cmd\n});
- system(@cmd) == 0 or
+ system(@cmd) == 0 or
$CPAN::Frontend->mydie("cvs import failed");
- chdir($pwd);
+ chdir($pwd) or $CPAN::Frontend->mydie(qq{Could not chdir to "$pwd": $!});
}
#-> sub CPAN::Distribution::readme ;
@@ -3322,7 +4084,7 @@ sub verifyMD5 {
$CPAN::Frontend->myprint(join "", map {" $_\n"} @e) and return if @e;
}
my($lc_want,$lc_file,@local,$basename);
- @local = split("/",$self->{ID});
+ @local = split("/",$self->id);
pop @local;
push @local, "CHECKSUMS";
$lc_want =
@@ -3339,11 +4101,12 @@ sub verifyMD5 {
$lc_file = CPAN::FTP->localize("authors/id/@local",
$lc_want,1);
unless ($lc_file) {
+ $CPAN::Frontend->myprint("Trying $lc_want.gz\n");
$local[-1] .= ".gz";
$lc_file = CPAN::FTP->localize("authors/id/@local",
"$lc_want.gz",1);
if ($lc_file) {
- $lc_file =~ s/\.gz\z//;
+ $lc_file =~ s/\.gz(?!\n)\Z//;
CPAN::Tarzip->gunzip("$lc_file.gz",$lc_file);
} else {
return;
@@ -3401,33 +4164,42 @@ sub MD5_check_file {
$CPAN::Frontend->myprint("Checksum for $file ok\n");
return $self->{MD5_STATUS} = "OK";
} else {
- $CPAN::Frontend->myprint(qq{Checksum mismatch for }.
+ $CPAN::Frontend->myprint(qq{\nChecksum mismatch for }.
qq{distribution file. }.
qq{Please investigate.\n\n}.
$self->as_string,
$CPAN::META->instance(
'CPAN::Author',
- $self->{CPAN_USERID}
+ $self->cpan_userid
)->as_string);
- my $wrap = qq{I\'d recommend removing $file. It seems to
-be a bogus file. Maybe you have configured your \`urllist\' with a
-bad URL. Please check this array with \`o conf urllist\', and
+
+ my $wrap = qq{I\'d recommend removing $file. Its MD5
+checksum is incorrect. Maybe you have configured your 'urllist' with
+a bad URL. Please check this array with 'o conf urllist', and
retry.};
- $CPAN::Frontend->myprint(Text::Wrap::wrap("","",$wrap));
- $CPAN::Frontend->myprint("\n\n");
- sleep 3;
- return;
+
+ $CPAN::Frontend->mydie(Text::Wrap::wrap("","",$wrap));
+
+ # former versions just returned here but this seems a
+ # serious threat that deserves a die
+
+ # $CPAN::Frontend->myprint("\n\n");
+ # sleep 3;
+ # return;
}
# close $fh if fileno($fh);
} else {
$self->{MD5_STATUS} ||= "";
if ($self->{MD5_STATUS} eq "NIL") {
- $CPAN::Frontend->myprint(qq{
-No md5 checksum for $basename in local $chk_file.
-Removing $chk_file
+ $CPAN::Frontend->mywarn(qq{
+Warning: No md5 checksum for $basename in $chk_file.
+
+The cause for this may be that the file is very new and the checksum
+has not yet been calculated, but it may also be that something is
+going awry right now.
});
- unlink $chk_file or $CPAN::Frontend->myprint("Could not unlink: $!");
- sleep 1;
+ my $answer = ExtUtils::MakeMaker::prompt("Proceed?", "yes");
+ $answer =~ /^\s*y/i or $CPAN::Frontend->mydie("Aborted.");
}
$self->{MD5_STATUS} = "NIL";
return;
@@ -3449,36 +4221,65 @@ sub eq_MD5 {
}
#-> sub CPAN::Distribution::force ;
+
+# Both modules and distributions know if "force" is in effect by
+# autoinspection, not by inspecting a global variable. One of the
+# reason why this was chosen to work that way was the treatment of
+# dependencies. They should not autpomatically inherit the force
+# status. But this has the downside that ^C and die() will return to
+# the prompt but will not be able to reset the force_update
+# attributes. We try to correct for it currently in the read_metadata
+# routine, and immediately before we check for a Signal. I hope this
+# works out in one of v1.57_53ff
+
sub force {
- my($self) = @_;
- $self->{'force_update'}++;
+ my($self, $method) = @_;
for my $att (qw(
MD5_STATUS archived build_dir localfile make install unwrapped
writemakefile
)) {
delete $self->{$att};
}
+ if ($method && $method eq "install") {
+ $self->{"force_update"}++; # name should probably have been force_install
+ }
}
+#-> sub CPAN::Distribution::unforce ;
+sub unforce {
+ my($self) = @_;
+ delete $self->{'force_update'};
+}
+
+#-> sub CPAN::Distribution::isa_perl ;
sub isa_perl {
my($self) = @_;
my $file = File::Basename::basename($self->id);
- return unless $file =~ m{ ^ perl
- (5)
- ([._-])
- (\d{3}(_[0-4][0-9])?)
- \.tar[._-]gz
- \z
- }xs;
- "$1.$3";
+ if ($file =~ m{ ^ perl
+ -?
+ (5)
+ ([._-])
+ (
+ \d{3}(_[0-4][0-9])?
+ |
+ \d*[24680]\.\d+
+ )
+ \.tar[._-]gz
+ (?!\n)\Z
+ }xs){
+ return "$1.$3";
+ } elsif ($self->cpan_comment
+ &&
+ $self->cpan_comment =~ /isa_perl\(.+?\)/){
+ return $1;
+ }
}
#-> sub CPAN::Distribution::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) {
@@ -3505,9 +4306,11 @@ sub make {
# Emergency brake if they said install Pippi and get newest perl
if ($self->isa_perl) {
if (
- $self->called_for ne $self->id && ! $self->{'force_update'}
+ $self->called_for ne $self->id &&
+ ! $self->{force_update}
) {
- $CPAN::Frontend->mydie(sprintf qq{
+ # if we die here, we break bundles
+ $CPAN::Frontend->mywarn(sprintf qq{
The most recent version "%s" of the module "%s"
comes with the current version of perl (%s).
I\'ll build that only if you ask for something like
@@ -3523,6 +4326,7 @@ or
$self->isa_perl,
$self->called_for,
$self->id);
+ sleep 5; return;
}
}
$self->get;
@@ -3539,7 +4343,10 @@ or
$1 || "Had some problem writing Makefile";
defined $self->{'make'} and push @e,
- "Has already been processed within this session";
+ "Has already been processed within this session";
+
+ exists $self->{later} and length($self->{later}) and
+ push @e, $self->{later};
$CPAN::Frontend->myprint(join "", map {" $_\n"} @e) and return if @e;
}
@@ -3606,6 +4413,7 @@ or
}
if (-f "Makefile") {
$self->{writemakefile} = "YES";
+ delete $self->{make_clean}; # if cleaned before, enable next
} else {
$self->{writemakefile} =
qq{NO Makefile.PL refused to write a Makefile.};
@@ -3615,98 +4423,177 @@ or
# $self->{writemakefile} .= <$fh>;
}
}
- return if $CPAN::Signal;
- if (my @prereq = $self->needs_prereq){
- my $id = $self->id;
- $CPAN::Frontend->myprint("---- Dependencies detected ".
- "during [$id] -----\n");
+ if ($CPAN::Signal){
+ delete $self->{force_update};
+ return;
+ }
+ if (my @prereq = $self->unsat_prereq){
+ return 1 if $self->follow_prereqs(@prereq); # signal success to the queuerunner
+ }
+ $system = join " ", $CPAN::Config->{'make'}, $CPAN::Config->{make_arg};
+ if (system($system) == 0) {
+ $CPAN::Frontend->myprint(" $system -- OK\n");
+ $self->{'make'} = "YES";
+ } else {
+ $self->{writemakefile} ||= "YES";
+ $self->{'make'} = "NO";
+ $CPAN::Frontend->myprint(" $system -- NOT OK\n");
+ }
+}
+
+sub follow_prereqs {
+ my($self) = shift;
+ my(@prereq) = @_;
+ my $id = $self->id;
+ $CPAN::Frontend->myprint("---- Unsatisfied dependencies detected ".
+ "during [$id] -----\n");
- for my $p (@prereq) {
+ for my $p (@prereq) {
$CPAN::Frontend->myprint(" $p\n");
- }
- my $follow = 0;
- if ($CPAN::Config->{prerequisites_policy} eq "follow") {
+ }
+ my $follow = 0;
+ if ($CPAN::Config->{prerequisites_policy} eq "follow") {
$follow = 1;
- } elsif ($CPAN::Config->{prerequisites_policy} eq "ask") {
+ } elsif ($CPAN::Config->{prerequisites_policy} eq "ask") {
require ExtUtils::MakeMaker;
my $answer = ExtUtils::MakeMaker::prompt(
"Shall I follow them and prepend them to the queue
of modules we are processing right now?", "yes");
$follow = $answer =~ /^\s*y/i;
- } else {
+ } else {
local($") = ", ";
- $CPAN::Frontend->myprint(" Ignoring dependencies on modules @prereq\n");
- }
- if ($follow) {
- CPAN::Queue->jumpqueue(@prereq,$id); # requeue yourself
- return;
- }
+ $CPAN::Frontend->
+ myprint(" Ignoring dependencies on modules @prereq\n");
}
- $system = join " ", $CPAN::Config->{'make'}, $CPAN::Config->{make_arg};
- if (system($system) == 0) {
- $CPAN::Frontend->myprint(" $system -- OK\n");
- $self->{'make'} = "YES";
- } else {
- $self->{writemakefile} ||= "YES";
- $self->{'make'} = "NO";
- $CPAN::Frontend->myprint(" $system -- NOT OK\n");
+ if ($follow) {
+ # color them as dirty
+ for my $p (@prereq) {
+ CPAN::Shell->expandany($p)->color_cmd_tmps(0,1);
+ }
+ CPAN::Queue->jumpqueue(@prereq,$id); # queue them and requeue yourself
+ $self->{later} = "Delayed until after prerequisites";
+ return 1; # signal success to the queuerunner
}
}
-#-> sub CPAN::Distribution::needs_prereq ;
-sub needs_prereq {
+#-> sub CPAN::Distribution::unsat_prereq ;
+sub unsat_prereq {
+ my($self) = @_;
+ my $prereq_pm = $self->prereq_pm or return;
+ my(@need);
+ NEED: while (my($need_module, $need_version) = each %$prereq_pm) {
+ my $nmo = $CPAN::META->instance("CPAN::Module",$need_module);
+ # we were too demanding:
+ next if $nmo->uptodate;
+
+ # if they have not specified a version, we accept any installed one
+ if (not defined $need_version or
+ $need_version == 0 or
+ $need_version eq "undef") {
+ next if defined $nmo->inst_file;
+ }
+
+ # We only want to install prereqs if either they're not installed
+ # or if the installed version is too old. We cannot omit this
+ # check, because if 'force' is in effect, nobody else will check.
+ {
+ local($^W) = 0;
+ if (
+ defined $nmo->inst_file &&
+ ! CPAN::Version->vgt($need_version, $nmo->inst_version)
+ ){
+ CPAN->debug(sprintf "id[%s]inst_file[%s]inst_version[%s]need_version[%s]",
+ $nmo->id,
+ $nmo->inst_file,
+ $nmo->inst_version,
+ CPAN::Version->readable($need_version)
+ );
+ next NEED;
+ }
+ }
+
+ if ($self->{sponsored_mods}{$need_module}++){
+ # We have already sponsored it and for some reason it's still
+ # not available. So we do nothing. Or what should we do?
+ # if we push it again, we have a potential infinite loop
+ next;
+ }
+ push @need, $need_module;
+ }
+ @need;
+}
+
+#-> sub CPAN::Distribution::prereq_pm ;
+sub prereq_pm {
my($self) = @_;
- return unless -f "Makefile"; # we cannot say much
- my $fh = FileHandle->new("<Makefile") or
- $CPAN::Frontend->mydie("Couldn't open Makefile: $!");
- local($/) = "\n";
-
- my(@p,@need);
- while (<$fh>) {
- last if /MakeMaker post_initialize section/;
- my($p) = m{^[\#]
+ return $self->{prereq_pm} if
+ exists $self->{prereq_pm_detected} && $self->{prereq_pm_detected};
+ return unless $self->{writemakefile}; # no need to have succeeded
+ # but we must have run it
+ my $build_dir = $self->{build_dir} or die "Panic: no build_dir?";
+ my $makefile = File::Spec->catfile($build_dir,"Makefile");
+ my(%p) = ();
+ my $fh;
+ if (-f $makefile
+ and
+ $fh = FileHandle->new("<$makefile\0")) {
+
+ local($/) = "\n";
+
+ # A.Speer @p -> %p, where %p is $p{Module::Name}=Required_Version
+ while (<$fh>) {
+ last if /MakeMaker post_initialize section/;
+ my($p) = m{^[\#]
\s+PREREQ_PM\s+=>\s+(.+)
}x;
- next unless $p;
- # warn "Found prereq expr[$p]";
-
- while ( $p =~ m/(?:\s)([\w\:]+)=>q\[.*?\],?/g ){
- push @p, $1;
- }
- last;
- }
- for my $p (@p) {
- my $mo = $CPAN::META->instance("CPAN::Module",$p);
- next if $mo->uptodate;
- # it's not needed, so don't push it. We cannot omit this step, because
- # if 'force' is in effect, nobody else will check.
- if ($self->{have_sponsored}{$p}++){
- # We have already sponsored it and for some reason it's still
- # not available. So we do nothing. Or what should we do?
- # if we push it again, we have a potential infinite loop
- next;
- }
- push @need, $p;
+ next unless $p;
+ # warn "Found prereq expr[$p]";
+
+ # Regexp modified by A.Speer to remember actual version of file
+ # PREREQ_PM hash key wants, then add to
+ while ( $p =~ m/(?:\s)([\w\:]+)=>q\[(.*?)\],?/g ){
+ # In case a prereq is mentioned twice, complain.
+ if ( defined $p{$1} ) {
+ warn "Warning: PREREQ_PM mentions $1 more than once, last mention wins";
+ }
+ $p{$1} = $2;
+ }
+ last;
+ }
}
- return @need;
+ $self->{prereq_pm_detected}++;
+ return $self->{prereq_pm} = \%p;
}
#-> sub CPAN::Distribution::test ;
sub test {
my($self) = @_;
$self->make;
- return if $CPAN::Signal;
+ if ($CPAN::Signal){
+ delete $self->{force_update};
+ return;
+ }
$CPAN::Frontend->myprint("Running make test\n");
+ if (my @prereq = $self->unsat_prereq){
+ return 1 if $self->follow_prereqs(@prereq); # signal success to the queuerunner
+ }
EXCUSE: {
my @e;
- exists $self->{'make'} or push @e,
+ exists $self->{make} or exists $self->{later} or push @e,
"Make had some problems, maybe interrupted? Won't test";
exists $self->{'make'} and
$self->{'make'} eq 'NO' and
- push @e, "Oops, make had returned bad status";
+ push @e, "Can't test without successful make";
+
+ exists $self->{build_dir} or push @e, "Has no own directory";
+ $self->{badtestcnt} ||= 0;
+ $self->{badtestcnt} > 0 and
+ push @e, "Won't repeat unsuccessful test during this command";
+
+ exists $self->{later} and length($self->{later}) and
+ push @e, $self->{later};
- exists $self->{'build_dir'} or push @e, "Has no own directory";
$CPAN::Frontend->myprint(join "", map {" $_\n"} @e) and return if @e;
}
chdir $self->{'build_dir'} or
@@ -3722,9 +4609,10 @@ sub test {
my $system = join " ", $CPAN::Config->{'make'}, "test";
if (system($system) == 0) {
$CPAN::Frontend->myprint(" $system -- OK\n");
- $self->{'make_test'} = "YES";
+ $self->{make_test} = "YES";
} else {
- $self->{'make_test'} = "NO";
+ $self->{make_test} = "NO";
+ $self->{badtestcnt}++;
$CPAN::Frontend->myprint(" $system -- NOT OK\n");
}
}
@@ -3735,7 +4623,9 @@ sub clean {
$CPAN::Frontend->myprint("Running make clean\n");
EXCUSE: {
my @e;
- exists $self->{'build_dir'} or push @e, "Has no own directory";
+ exists $self->{make_clean} and $self->{make_clean} eq "YES" and
+ push @e, "make clean already called once";
+ exists $self->{build_dir} or push @e, "Has no own directory";
$CPAN::Frontend->myprint(join "", map {" $_\n"} @e) and return if @e;
}
chdir $self->{'build_dir'} or
@@ -3749,10 +4639,31 @@ sub clean {
my $system = join " ", $CPAN::Config->{'make'}, "clean";
if (system($system) == 0) {
- $CPAN::Frontend->myprint(" $system -- OK\n");
- $self->force;
+ $CPAN::Frontend->myprint(" $system -- OK\n");
+
+ # $self->force;
+
+ # Jost Krieger pointed out that this "force" was wrong because
+ # it has the effect that the next "install" on this distribution
+ # will untar everything again. Instead we should bring the
+ # object's state back to where it is after untarring.
+
+ delete $self->{force_update};
+ delete $self->{install};
+ delete $self->{writemakefile};
+ delete $self->{make};
+ delete $self->{make_test}; # no matter if yes or no, tests must be redone
+ $self->{make_clean} = "YES";
+
} else {
- # Hmmm, what to do if make clean failed?
+ # Hmmm, what to do if make clean failed?
+
+ $CPAN::Frontend->myprint(qq{ $system -- NOT OK
+
+make clean did not succeed, marking directory as unusable for further work.
+});
+ $self->force("make"); # so that this directory won't be used again
+
}
}
@@ -3760,18 +4671,21 @@ sub clean {
sub install {
my($self) = @_;
$self->test;
- return if $CPAN::Signal;
+ if ($CPAN::Signal){
+ delete $self->{force_update};
+ return;
+ }
$CPAN::Frontend->myprint("Running make install\n");
EXCUSE: {
my @e;
- exists $self->{'build_dir'} or push @e, "Has no own directory";
+ exists $self->{build_dir} or push @e, "Has no own directory";
- exists $self->{'make'} or push @e,
+ exists $self->{make} or exists $self->{later} or push @e,
"Make had some problems, maybe interrupted? Won't install";
exists $self->{'make'} and
$self->{'make'} eq 'NO' and
- push @e, "Oops, make had returned bad status";
+ push @e, "make had returned bad status, install seems impossible";
push @e, "make test had returned bad status, ".
"won't install without force"
@@ -3783,6 +4697,9 @@ sub install {
$self->{'install'} eq "YES" ?
"Already done" : "Already tried without success";
+ exists $self->{later} and length($self->{later}) and
+ push @e, $self->{later};
+
$CPAN::Frontend->myprint(join "", map {" $_\n"} @e) and return if @e;
}
chdir $self->{'build_dir'} or
@@ -3816,6 +4733,7 @@ sub install {
qq{to root to install the package\n});
}
}
+ delete $self->{force_update};
}
#-> sub CPAN::Distribution::dir ;
@@ -3825,69 +4743,114 @@ sub dir {
package CPAN::Bundle;
+sub undelay {
+ my $self = shift;
+ delete $self->{later};
+ for my $c ( $self->contains ) {
+ my $obj = CPAN::Shell->expandany($c) or next;
+ $obj->undelay;
+ }
+}
+
+#-> sub CPAN::Bundle::color_cmd_tmps ;
+sub color_cmd_tmps {
+ my($self) = shift;
+ my($depth) = shift || 0;
+ my($color) = shift || 0;
+ # a module needs to recurse to its cpan_file, a distribution needs
+ # to recurse into its prereq_pms, a bundle needs to recurse into its modules
+
+ return if exists $self->{incommandcolor}
+ && $self->{incommandcolor}==$color;
+ $CPAN::Frontend->mydie(sprintf("CPAN.pm panic: deep recursion in ".
+ "color_cmd_tmps depth[%s] self[%s] id[%s]",
+ $depth,
+ $self,
+ $self->id
+ )) if $depth>=100;
+ ##### warn "color_cmd_tmps $depth $color " . $self->id; # sleep 1;
+
+ for my $c ( $self->contains ) {
+ my $obj = CPAN::Shell->expandany($c) or next;
+ CPAN->debug("c[$c]obj[$obj]") if $CPAN::DEBUG;
+ $obj->color_cmd_tmps($depth+1,$color);
+ }
+ if ($color==0) {
+ delete $self->{badtestcnt};
+ }
+ $self->{incommandcolor} = $color;
+}
+
#-> sub CPAN::Bundle::as_string ;
sub as_string {
my($self) = @_;
$self->contains;
+ # following line must be "=", not "||=" because we have a moving target
$self->{INST_VERSION} = $self->inst_version;
return $self->SUPER::as_string;
}
#-> sub CPAN::Bundle::contains ;
sub contains {
- my($self) = @_;
- my($parsefile) = $self->inst_file;
- my($id) = $self->id;
- $self->debug("parsefile[$parsefile]id[$id]") if $CPAN::DEBUG;
- unless ($parsefile) {
- # Try to get at it in the cpan directory
- $self->debug("no parsefile") if $CPAN::DEBUG;
- Carp::confess "I don't know a $id" unless $self->{CPAN_FILE};
- my $dist = $CPAN::META->instance('CPAN::Distribution',
- $self->{CPAN_FILE});
- $dist->get;
- $self->debug($dist->as_string) if $CPAN::DEBUG;
- my($todir) = $CPAN::Config->{'cpan_home'};
- my(@me,$from,$to,$me);
- @me = split /::/, $self->id;
- $me[-1] .= ".pm";
- $me = MM->catfile(@me);
- $from = $self->find_bundle_file($dist->{'build_dir'},$me);
- $to = MM->catfile($todir,$me);
- File::Path::mkpath(File::Basename::dirname($to));
- File::Copy::copy($from, $to)
- or Carp::confess("Couldn't copy $from to $to: $!");
- $parsefile = $to;
- }
- my @result;
- my $fh = FileHandle->new;
- local $/ = "\n";
- open($fh,$parsefile) or die "Could not open '$parsefile': $!";
- my $in_cont = 0;
- $self->debug("parsefile[$parsefile]") if $CPAN::DEBUG;
- while (<$fh>) {
- $in_cont = m/^=(?!head1\s+CONTENTS)/ ? 0 :
- m/^=head1\s+CONTENTS/ ? 1 : $in_cont;
- next unless $in_cont;
- next if /^=/;
- s/\#.*//;
- next if /^\s+$/;
- chomp;
- push @result, (split " ", $_, 2)[0];
- }
- close $fh;
- delete $self->{STATUS};
- $self->{CONTAINS} = join ", ", @result;
- $self->debug("CONTAINS[@result]") if $CPAN::DEBUG;
- unless (@result) {
- $CPAN::Frontend->mywarn(qq{
-The bundle file "$parsefile" may be a broken
+ my($self) = @_;
+ my($inst_file) = $self->inst_file || "";
+ my($id) = $self->id;
+ $self->debug("inst_file[$inst_file]id[$id]") if $CPAN::DEBUG;
+ unless ($inst_file) {
+ # Try to get at it in the cpan directory
+ $self->debug("no inst_file") if $CPAN::DEBUG;
+ my $cpan_file;
+ $CPAN::Frontend->mydie("I don't know a bundle with ID $id\n") unless
+ $cpan_file = $self->cpan_file;
+ if ($cpan_file eq "N/A") {
+ $CPAN::Frontend->mydie("Bundle $id not found on disk and not on CPAN.
+ Maybe stale symlink? Maybe removed during session? Giving up.\n");
+ }
+ my $dist = $CPAN::META->instance('CPAN::Distribution',
+ $self->cpan_file);
+ $dist->get;
+ $self->debug($dist->as_string) if $CPAN::DEBUG;
+ my($todir) = $CPAN::Config->{'cpan_home'};
+ my(@me,$from,$to,$me);
+ @me = split /::/, $self->id;
+ $me[-1] .= ".pm";
+ $me = MM->catfile(@me);
+ $from = $self->find_bundle_file($dist->{'build_dir'},$me);
+ $to = MM->catfile($todir,$me);
+ File::Path::mkpath(File::Basename::dirname($to));
+ File::Copy::copy($from, $to)
+ or Carp::confess("Couldn't copy $from to $to: $!");
+ $inst_file = $to;
+ }
+ my @result;
+ my $fh = FileHandle->new;
+ local $/ = "\n";
+ open($fh,$inst_file) or die "Could not open '$inst_file': $!";
+ my $in_cont = 0;
+ $self->debug("inst_file[$inst_file]") if $CPAN::DEBUG;
+ while (<$fh>) {
+ $in_cont = m/^=(?!head1\s+CONTENTS)/ ? 0 :
+ m/^=head1\s+CONTENTS/ ? 1 : $in_cont;
+ next unless $in_cont;
+ next if /^=/;
+ s/\#.*//;
+ next if /^\s+$/;
+ chomp;
+ push @result, (split " ", $_, 2)[0];
+ }
+ close $fh;
+ delete $self->{STATUS};
+ $self->{CONTAINS} = \@result;
+ $self->debug("CONTAINS[@result]") if $CPAN::DEBUG;
+ unless (@result) {
+ $CPAN::Frontend->mywarn(qq{
+The bundle file "$inst_file" may be a broken
bundlefile. It seems not to contain any bundle definition.
Please check the file and if it is bogus, please delete it.
Sorry for the inconvenience.
});
- }
- @result;
+ }
+ @result;
}
#-> sub CPAN::Bundle::find_bundle_file
@@ -3900,11 +4863,10 @@ 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();
- chdir $where;
+ my $cwd = CPAN::anycwd();
+ chdir $where or $CPAN::Frontend->mydie(qq{Could not chdir to "$where": $!});
ExtUtils::Manifest::mkmanifest();
- chdir $cwd;
+ chdir $cwd or $CPAN::Frontend->mydie(qq{Could not chdir to "$cwd": $!});
}
my $fh = FileHandle->new($manifest)
or Carp::croak("Couldn't open $manifest: $!");
@@ -3936,22 +4898,37 @@ sub find_bundle_file {
Carp::croak("Couldn't find a Bundle file in $where");
}
+# needs to work quite differently from Module::inst_file because of
+# cpan_home/Bundle/ directory and the possibility that we have
+# shadowing effect. As it makes no sense to take the first in @INC for
+# Bundles, we parse them all for $VERSION and take the newest.
+
#-> sub CPAN::Bundle::inst_file ;
sub inst_file {
my($self) = @_;
- my($me,$inst_file);
- ($me = $self->id) =~ s/.*://;
-## my(@me,$inst_file);
-## @me = split /::/, $self->id;
-## $me[-1] .= ".pm";
- $inst_file = MM->catfile($CPAN::Config->{'cpan_home'},
- "Bundle", "$me.pm");
-## "Bundle", @me);
- return $self->{'INST_FILE'} = $inst_file if -f $inst_file;
-# $inst_file =
- $self->SUPER::inst_file;
-# return $self->{'INST_FILE'} = $inst_file if -f $inst_file;
-# return $self->{'INST_FILE'}; # even if undefined?
+ my($inst_file);
+ my(@me);
+ @me = split /::/, $self->id;
+ $me[-1] .= ".pm";
+ my($incdir,$bestv);
+ foreach $incdir ($CPAN::Config->{'cpan_home'},@INC) {
+ my $bfile = MM->catfile($incdir, @me);
+ CPAN->debug("bfile[$bfile]") if $CPAN::DEBUG;
+ next unless -f $bfile;
+ my $foundv = MM->parse_version($bfile);
+ if (!$bestv || CPAN::Version->vgt($foundv,$bestv)) {
+ $self->{INST_FILE} = $bfile;
+ $self->{INST_VERSION} = $bestv = $foundv;
+ }
+ }
+ $self->{INST_FILE};
+}
+
+#-> sub CPAN::Bundle::inst_version ;
+sub inst_version {
+ my($self) = @_;
+ $self->inst_file; # finds INST_VERSION as side effect
+ $self->{INST_VERSION};
}
#-> sub CPAN::Bundle::rematein ;
@@ -3960,7 +4937,7 @@ sub rematein {
$self->debug("self[$self] meth[$meth]") if $CPAN::DEBUG;
my($id) = $self->id;
Carp::croak "Can't $meth $id, don't have an associated bundle file. :-(\n"
- unless $self->inst_file || $self->{CPAN_FILE};
+ unless $self->inst_file || $self->cpan_file;
my($s,%fail);
for $s ($self->contains) {
my($type) = $s =~ m|/| ? 'CPAN::Distribution' :
@@ -3973,14 +4950,36 @@ explicitly a file $s.
sleep 3;
}
# possibly noisy action:
+ $self->debug("type[$type] s[$s]") if $CPAN::DEBUG;
my $obj = $CPAN::META->instance($type,$s);
$obj->$meth();
- my $success = $obj->can("uptodate") ? $obj->uptodate : 0;
- $success ||= $obj->{'install'} && $obj->{'install'} eq "YES";
- $fail{$s} = 1 unless $success;
+ if ($obj->isa(CPAN::Bundle)
+ &&
+ exists $obj->{install_failed}
+ &&
+ ref($obj->{install_failed}) eq "HASH"
+ ) {
+ for (keys %{$obj->{install_failed}}) {
+ $self->{install_failed}{$_} = undef; # propagate faiure up
+ # to me in a
+ # recursive call
+ $fail{$s} = 1; # the bundle itself may have succeeded but
+ # not all children
+ }
+ } else {
+ my $success;
+ $success = $obj->can("uptodate") ? $obj->uptodate : 0;
+ $success ||= $obj->{'install'} && $obj->{'install'} eq "YES";
+ if ($success) {
+ delete $self->{install_failed}{$s};
+ } else {
+ $fail{$s} = 1;
+ }
+ }
}
+
# recap with less noise
- if ( $meth eq "install") {
+ if ( $meth eq "install" ) {
if (%fail) {
require Text::Wrap;
my $raw = sprintf(qq{Bundle summary:
@@ -3990,9 +4989,21 @@ The following items in bundle %s had installation problems:},
$CPAN::Frontend->myprint(Text::Wrap::fill("","",$raw));
$CPAN::Frontend->myprint("\n");
my $paragraph = "";
+ my %reported;
for $s ($self->contains) {
- $paragraph .= "$s " if $fail{$s};
+ if ($fail{$s}){
+ $paragraph .= "$s ";
+ $self->{install_failed}{$s} = undef;
+ $reported{$s} = undef;
+ }
}
+ my $report_propagated;
+ for $s (sort keys %{$self->{install_failed}}) {
+ next if exists $reported{$s};
+ $paragraph .= "and the following items had problems
+during recursive bundle calls: " unless $report_propagated++;
+ $paragraph .= "$s ";
+ }
$CPAN::Frontend->myprint(Text::Wrap::fill(" "," ",$paragraph));
$CPAN::Frontend->myprint("\n");
} else {
@@ -4015,7 +5026,11 @@ sub get { shift->rematein('get',@_); }
#-> sub CPAN::Bundle::make ;
sub make { shift->rematein('make',@_); }
#-> sub CPAN::Bundle::test ;
-sub test { shift->rematein('test',@_); }
+sub test {
+ my $self = shift;
+ $self->{badtestcnt} ||= 0;
+ $self->rematein('test',@_);
+}
#-> sub CPAN::Bundle::install ;
sub install {
my $self = shift;
@@ -4024,6 +5039,18 @@ sub install {
#-> sub CPAN::Bundle::clean ;
sub clean { shift->rematein('clean',@_); }
+#-> sub CPAN::Bundle::uptodate ;
+sub uptodate {
+ my($self) = @_;
+ return 0 unless $self->SUPER::uptodate; # we mut have the current Bundle def
+ my $c;
+ foreach $c ($self->contains) {
+ my $obj = CPAN::Shell->expandany($c);
+ return 0 unless $obj->uptodate;
+ }
+ return 1;
+}
+
#-> sub CPAN::Bundle::readme ;
sub readme {
my($self) = @_;
@@ -4035,13 +5062,72 @@ No File found for bundle } . $self->id . qq{\n}), return;
package CPAN::Module;
+# Accessors
+# sub cpan_userid { shift->{RO}{CPAN_USERID} }
+sub userid {
+ my $self = shift;
+ return unless exists $self->{RO}; # should never happen
+ return $self->{RO}{CPAN_USERID} || $self->{RO}{userid};
+}
+sub description { shift->{RO}{description} }
+
+sub undelay {
+ my $self = shift;
+ delete $self->{later};
+ if ( my $dist = CPAN::Shell->expand("Distribution", $self->cpan_file) ) {
+ $dist->undelay;
+ }
+}
+
+#-> sub CPAN::Module::color_cmd_tmps ;
+sub color_cmd_tmps {
+ my($self) = shift;
+ my($depth) = shift || 0;
+ my($color) = shift || 0;
+ # a module needs to recurse to its cpan_file
+
+ return if exists $self->{incommandcolor}
+ && $self->{incommandcolor}==$color;
+ $CPAN::Frontend->mydie(sprintf("CPAN.pm panic: deep recursion in ".
+ "color_cmd_tmps depth[%s] self[%s] id[%s]",
+ $depth,
+ $self,
+ $self->id
+ )) if $depth>=100;
+ ##### warn "color_cmd_tmps $depth $color " . $self->id; # sleep 1;
+
+ if ( my $dist = CPAN::Shell->expand("Distribution", $self->cpan_file) ) {
+ $dist->color_cmd_tmps($depth+1,$color);
+ }
+ if ($color==0) {
+ delete $self->{badtestcnt};
+ }
+ $self->{incommandcolor} = $color;
+}
+
#-> sub CPAN::Module::as_glimpse ;
sub as_glimpse {
my($self) = @_;
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;
}
@@ -4056,11 +5142,11 @@ sub as_string {
local($^W) = 0;
push @m, $class, " id = $self->{ID}\n";
my $sprintf = " %-12s %s\n";
- push @m, sprintf($sprintf, 'DESCRIPTION', $self->{description})
- if $self->{description};
+ push @m, sprintf($sprintf, 'DESCRIPTION', $self->description)
+ if $self->description;
my $sprintf2 = " %-12s %s (%s)\n";
my($userid);
- if ($userid = $self->{'CPAN_USERID'} || $self->{'userid'}){
+ if ($userid = $self->cpan_userid || $self->userid){
my $author;
if ($author = CPAN::Shell->expand('Author',$userid)) {
my $email = "";
@@ -4076,10 +5162,10 @@ sub as_string {
);
}
}
- push @m, sprintf($sprintf, 'CPAN_VERSION', $self->{CPAN_VERSION})
- if $self->{CPAN_VERSION};
- push @m, sprintf($sprintf, 'CPAN_FILE', $self->{CPAN_FILE})
- if $self->{CPAN_FILE};
+ push @m, sprintf($sprintf, 'CPAN_VERSION', $self->cpan_version)
+ if $self->cpan_version;
+ push @m, sprintf($sprintf, 'CPAN_FILE', $self->cpan_file)
+ if $self->cpan_file;
my $sprintf3 = " %-12s %1s%1s%1s%1s (%s,%s,%s,%s)\n";
my(%statd,%stats,%statl,%stati);
@statd{qw,? i c a b R M S,} = qw,unknown idea
@@ -4096,24 +5182,68 @@ sub as_string {
push @m, sprintf(
$sprintf3,
'DSLI_STATUS',
- $self->{statd},
- $self->{stats},
- $self->{statl},
- $self->{stati},
- $statd{$self->{statd}},
- $stats{$self->{stats}},
- $statl{$self->{statl}},
- $stati{$self->{stati}}
- ) if $self->{statd};
+ $self->{RO}{statd},
+ $self->{RO}{stats},
+ $self->{RO}{statl},
+ $self->{RO}{stati},
+ $statd{$self->{RO}{statd}},
+ $stats{$self->{RO}{stats}},
+ $statl{$self->{RO}{statl}},
+ $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)
+ ) {
+ CPAN->debug("mff[$mff]") if $CPAN::DEBUG;
+ my $lfre = $self->id; # local file RE
+ $lfre =~ s/::/./g;
+ $lfre .= "\\.pm\$";
+ my($lfl); # local file file
+ local $/ = "\n";
+ my(@mflines) = <$mfh>;
+ for (@mflines) {
+ s/^\s+//;
+ s/\s.*//s;
+ }
+ while (length($lfre)>5 and !$lfl) {
+ ($lfl) = grep /$lfre/, @mflines;
+ CPAN->debug("lfl[$lfl]lfre[$lfre]") if $CPAN::DEBUG;
+ $lfre =~ s/.+?\.//;
+ }
+ $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 CONTAINS/) {
+ for $item (qw/MANPAGE/) {
push @m, sprintf($sprintf, $item, $self->{$item})
if exists $self->{$item};
}
+ for $item (qw/CONTAINS/) {
+ push @m, sprintf($sprintf, $item, join(" ",@{$self->{$item}}))
+ if exists $self->{$item} && @{$self->{$item}};
+ }
push @m, sprintf($sprintf, 'INST_FILE',
$local_file || "(not installed)");
push @m, sprintf($sprintf, 'INST_VERSION',
@@ -4124,7 +5254,7 @@ sub as_string {
sub manpage_headline {
my($self,$local_file) = @_;
my(@local_file) = $local_file;
- $local_file =~ s/\.pm\z/.pod/;
+ $local_file =~ s/\.pm(?!\n)\Z/.pod/;
push @local_file, $local_file;
my(@result,$locf);
for $locf (@local_file) {
@@ -4149,44 +5279,49 @@ sub manpage_headline {
}
#-> sub CPAN::Module::cpan_file ;
-sub cpan_file {
+# Note: also inherited by CPAN::Bundle
+sub cpan_file {
my $self = shift;
- CPAN->debug($self->id) if $CPAN::DEBUG;
- unless (defined $self->{'CPAN_FILE'}) {
+ CPAN->debug(sprintf "id[%s]", $self->id) if $CPAN::DEBUG;
+ unless (defined $self->{RO}{CPAN_FILE}) {
CPAN::Index->reload;
}
- if (exists $self->{'CPAN_FILE'} && defined $self->{'CPAN_FILE'}){
- return $self->{'CPAN_FILE'};
- } elsif (exists $self->{'userid'} && defined $self->{'userid'}) {
- my $fullname = $CPAN::META->instance(CPAN::Author,
- $self->{'userid'})->fullname;
- my $email = $CPAN::META->instance(CPAN::Author,
- $self->{'userid'})->email;
- unless (defined $fullname && defined $email) {
- return "Contact Author $self->{userid} (Try ``a $self->{userid}'')";
- }
- return "Contact Author $fullname <$email>";
+ if (exists $self->{RO}{CPAN_FILE} && defined $self->{RO}{CPAN_FILE}){
+ return $self->{RO}{CPAN_FILE};
} else {
- return "N/A";
+ my $userid = $self->userid;
+ if ( $userid ) {
+ if ($CPAN::META->exists("CPAN::Author",$userid)) {
+ my $author = $CPAN::META->instance("CPAN::Author",
+ $userid);
+ my $fullname = $author->fullname;
+ my $email = $author->email;
+ unless (defined $fullname && defined $email) {
+ return sprintf("Contact Author %s",
+ $userid,
+ );
+ }
+ return "Contact Author $fullname <$email>";
+ } else {
+ return "UserID $userid";
+ }
+ } else {
+ return "N/A";
+ }
}
}
-*name = \&cpan_file;
-
#-> sub CPAN::Module::cpan_version ;
sub cpan_version {
my $self = shift;
- $self->{'CPAN_VERSION'} = 'undef'
- unless defined $self->{'CPAN_VERSION'}; # I believe this is
- # always a bug in the
- # index and should be
- # reported as such,
- # but usually I find
- # out such an error
- # and do not want to
- # provoke too many
- # bugreports
- $self->{'CPAN_VERSION'};
+
+ $self->{RO}{CPAN_VERSION} = 'undef'
+ unless defined $self->{RO}{CPAN_VERSION};
+ # I believe this is always a bug in the index and should be reported
+ # as such, but usually I find out such an error and do not want to
+ # provoke too many bugreports
+
+ $self->{RO}{CPAN_VERSION};
}
#-> sub CPAN::Module::force ;
@@ -4198,7 +5333,9 @@ sub force {
#-> sub CPAN::Module::rematein ;
sub rematein {
my($self,$meth) = @_;
- $self->debug($self->id) if $CPAN::DEBUG;
+ $CPAN::Frontend->myprint(sprintf("Running %s for module %s\n",
+ $meth,
+ $self->id));
my $cpan_file = $self->cpan_file;
if ($cpan_file eq "N/A" || $cpan_file =~ /^Contact Author/){
$CPAN::Frontend->mywarn(sprintf qq{
@@ -4206,7 +5343,7 @@ sub rematein {
Either the module has not yet been uploaded to CPAN, or it is
temporary unavailable. Please contact the author to find out
- more about the status. Try ``i %s''.
+ more about the status. Try 'i %s'.
},
$self->id,
$self->id,
@@ -4215,8 +5352,9 @@ sub rematein {
}
my $pack = $CPAN::META->instance('CPAN::Distribution',$cpan_file);
$pack->called_for($self->id);
- $pack->force if exists $self->{'force_update'};
+ $pack->force($meth) if exists $self->{'force_update'};
$pack->$meth();
+ $pack->unforce if $pack->can("unforce") && exists $self->{'force_update'};
delete $self->{'force_update'};
}
@@ -4229,9 +5367,16 @@ sub cvs_import { shift->rematein('cvs_import') }
#-> sub CPAN::Module::get ;
sub get { shift->rematein('get',@_); }
#-> sub CPAN::Module::make ;
-sub make { shift->rematein('make') }
+sub make {
+ my $self = shift;
+ $self->rematein('make');
+}
#-> sub CPAN::Module::test ;
-sub test { shift->rematein('test') }
+sub test {
+ my $self = shift;
+ $self->{badtestcnt} ||= 0;
+ $self->rematein('test',@_);
+}
#-> sub CPAN::Module::uptodate ;
sub uptodate {
my($self) = @_;
@@ -4245,9 +5390,11 @@ sub uptodate {
local($^W)=0;
if ($inst_file
&&
- $have >= $latest
+ ! CPAN::Version->vgt($latest, $have)
) {
- return 1;
+ CPAN->debug("returning uptodate. inst_file[$inst_file] ".
+ "latest[$latest] have[$have]") if $CPAN::DEBUG;
+ return 1;
}
return;
}
@@ -4304,14 +5451,49 @@ sub inst_version {
my($self) = @_;
my $parsefile = $self->inst_file or return;
local($^W) = 0 if $] < 5.00303 && $ExtUtils::MakeMaker::VERSION < 5.38;
- # warn "HERE";
- my $have = MM->parse_version($parsefile) || "undef";
+ my $have;
+
+ # there was a bug in 5.6.0 that let lots of unini warnings out of
+ # parse_version. Fixed shortly after 5.6.0 by PMQS. We can remove
+ # the following workaround after 5.6.1 is out.
+ local($SIG{__WARN__}) = sub { my $w = shift;
+ return if $w =~ /uninitialized/i;
+ warn $w;
+ };
+
+ $have = MM->parse_version($parsefile) || "undef";
+ $have =~ s/^ //; # since the %vd hack these two lines here are needed
+ $have =~ s/ $//; # trailing whitespace happens all the time
+
+ # My thoughts about why %vd processing should happen here
+
+ # Alt1 maintain it as string with leading v:
+ # read index files do nothing
+ # compare it use utility for compare
+ # print it do nothing
+
+ # Alt2 maintain it as what is is
+ # read index files convert
+ # compare it use utility because there's still a ">" vs "gt" issue
+ # print it use CPAN::Version for print
+
+ # Seems cleaner to hold it in memory as a string starting with a "v"
+
+ # If the author of this module made a mistake and wrote a quoted
+ # "v1.13" instead of v1.13, we simply leave it at that with the
+ # effect that *we* will treat it like a v-tring while the rest of
+ # perl won't. Seems sensible when we consider that any action we
+ # could take now would just add complexity.
+
+ $have = CPAN::Version->readable($have);
+
$have =~ s/\s*//g; # stringify to float around floating point issues
- $have;
+ $have; # no stringify needed, \s* above matches always
}
package CPAN::Tarzip;
+# CPAN::Tarzip::gzip
sub gzip {
my($class,$read,$write) = @_;
if ($CPAN::META->has_inst("Compress::Zlib")) {
@@ -4326,10 +5508,12 @@ sub gzip {
$fhw->close;
return 1;
} else {
- system("$CPAN::Config->{'gzip'} -c $read > $write")==0;
+ system("$CPAN::Config->{gzip} -c $read > $write")==0;
}
}
+
+# CPAN::Tarzip::gunzip
sub gunzip {
my($class,$read,$write) = @_;
if ($CPAN::META->has_inst("Compress::Zlib")) {
@@ -4346,26 +5530,43 @@ sub gunzip {
$fhw->close;
return 1;
} else {
- system("$CPAN::Config->{'gzip'} -dc $read > $write")==0;
+ system("$CPAN::Config->{gzip} -dc $read > $write")==0;
}
}
+
+# CPAN::Tarzip::gtest
sub gtest {
my($class,$read) = @_;
- if ($CPAN::META->has_inst("Compress::Zlib")) {
- my($buffer);
+ # After I had reread the documentation in zlib.h, I discovered that
+ # uncompressed files do not lead to an gzerror (anymore?).
+ if ( $CPAN::META->has_inst("Compress::Zlib") ) {
+ my($buffer,$len);
+ $len = 0;
my $gz = Compress::Zlib::gzopen($read, "rb")
- or $CPAN::Frontend->mydie("Cannot open $read: $!\n");
- 1 while $gz->gzread($buffer) > 0 ;
- $CPAN::Frontend->mydie("Error reading from $read: $!\n")
- if $gz->gzerror != Compress::Zlib::Z_STREAM_END();
- $gz->gzclose() ;
- return 1;
+ or $CPAN::Frontend->mydie(sprintf("Cannot gzopen %s: %s\n",
+ $read,
+ $Compress::Zlib::gzerrno));
+ while ($gz->gzread($buffer) > 0 ){
+ $len += length($buffer);
+ $buffer = "";
+ }
+ my $err = $gz->gzerror;
+ my $success = ! $err || $err == Compress::Zlib::Z_STREAM_END();
+ if ($len == -s $read){
+ $success = 0;
+ CPAN->debug("hit an uncompressed file") if $CPAN::DEBUG;
+ }
+ $gz->gzclose();
+ CPAN->debug("err[$err]success[$success]") if $CPAN::DEBUG;
+ return $success;
} else {
- return system("$CPAN::Config->{'gzip'} -dt $read")==0;
+ return system("$CPAN::Config->{gzip} -dt $read")==0;
}
}
+
+# CPAN::Tarzip::TIEHANDLE
sub TIEHANDLE {
my($class,$file) = @_;
my $ret;
@@ -4375,14 +5576,16 @@ sub TIEHANDLE {
die "Could not gzopen $file";
$ret = bless {GZ => $gz}, $class;
} else {
- my $pipe = "$CPAN::Config->{'gzip'} --decompress --stdout $file |";
- my $fh = FileHandle->new($pipe) or die "Could pipe[$pipe]: $!";
+ my $pipe = "$CPAN::Config->{gzip} --decompress --stdout $file |";
+ my $fh = FileHandle->new($pipe) or die "Could not pipe[$pipe]: $!";
binmode $fh;
$ret = bless {FH => $fh}, $class;
}
$ret;
}
+
+# CPAN::Tarzip::READLINE
sub READLINE {
my($self) = @_;
if (exists $self->{GZ}) {
@@ -4397,6 +5600,8 @@ sub READLINE {
}
}
+
+# CPAN::Tarzip::READ
sub READ {
my($self,$ref,$length,$offset) = @_;
die "read with offset not implemented" if defined $offset;
@@ -4410,69 +5615,231 @@ sub READ {
}
}
+
+# CPAN::Tarzip::DESTROY
sub DESTROY {
- my($self) = @_;
- if (exists $self->{GZ}) {
- my $gz = $self->{GZ};
- $gz->gzclose();
- } else {
- my $fh = $self->{FH};
- $fh->close if defined $fh;
- }
- undef $self;
+ my($self) = @_;
+ if (exists $self->{GZ}) {
+ my $gz = $self->{GZ};
+ $gz->gzclose() if defined $gz; # hard to say if it is allowed
+ # to be undef ever. AK, 2000-09
+ } else {
+ my $fh = $self->{FH};
+ $fh->close if defined $fh;
+ }
+ undef $self;
}
+
+# CPAN::Tarzip::untar
sub untar {
my($class,$file) = @_;
- # had to disable, because version 0.07 seems to be buggy
- if (MM->maybe_command($CPAN::Config->{'gzip'})
- &&
- MM->maybe_command($CPAN::Config->{'tar'})) {
- my $system = "$CPAN::Config->{'gzip'} --decompress --stdout " .
- "< $file | $CPAN::Config->{tar} xvf -";
+ my($prefer) = 0;
+
+ if (0) { # makes changing order easier
+ } elsif ($BUGHUNTING){
+ $prefer=2;
+ } elsif (MM->maybe_command($CPAN::Config->{gzip})
+ &&
+ MM->maybe_command($CPAN::Config->{'tar'})) {
+ # should be default until Archive::Tar is fixed
+ $prefer = 1;
+ } elsif (
+ $CPAN::META->has_inst("Archive::Tar")
+ &&
+ $CPAN::META->has_inst("Compress::Zlib") ) {
+ $prefer = 2;
+ } else {
+ $CPAN::Frontend->mydie(qq{
+CPAN.pm needs either both external programs tar and gzip installed or
+both the modules Archive::Tar and Compress::Zlib. Neither prerequisite
+is available. Can\'t continue.
+});
+ }
+ if ($prefer==1) { # 1 => external gzip+tar
+ my($system);
+ my $is_compressed = $class->gtest($file);
+ if ($is_compressed) {
+ $system = "$CPAN::Config->{gzip} --decompress --stdout " .
+ "< $file | $CPAN::Config->{tar} xvf -";
+ } else {
+ $system = "$CPAN::Config->{tar} xvf $file";
+ }
if (system($system) != 0) {
- # people find the most curious tar binaries that cannot handle
- # pipes
- my $system = "$CPAN::Config->{'gzip'} --decompress $file";
- if (system($system)==0) {
- $CPAN::Frontend->myprint(qq{Uncompressed $file successfully\n});
- } else {
- $CPAN::Frontend->mydie(
- qq{Couldn\'t uncompress $file\n}
- );
- }
- $file =~ s/\.gz\z//;
- $system = "$CPAN::Config->{tar} xvf $file";
- $CPAN::Frontend->myprint(qq{Using Tar:$system:\n});
- if (system($system)==0) {
- $CPAN::Frontend->myprint(qq{Untarred $file successfully\n});
- } else {
- $CPAN::Frontend->mydie(qq{Couldn\'t untar $file\n});
- }
- return 1;
+ # people find the most curious tar binaries that cannot handle
+ # pipes
+ if ($is_compressed) {
+ (my $ungzf = $file) =~ s/\.gz(?!\n)\Z//;
+ if (CPAN::Tarzip->gunzip($file, $ungzf)) {
+ $CPAN::Frontend->myprint(qq{Uncompressed $file successfully\n});
+ } else {
+ $CPAN::Frontend->mydie(qq{Couldn\'t uncompress $file\n});
+ }
+ $file = $ungzf;
+ }
+ $system = "$CPAN::Config->{tar} xvf $file";
+ $CPAN::Frontend->myprint(qq{Using Tar:$system:\n});
+ if (system($system)==0) {
+ $CPAN::Frontend->myprint(qq{Untarred $file successfully\n});
+ } else {
+ $CPAN::Frontend->mydie(qq{Couldn\'t untar $file\n});
+ }
+ return 1;
} else {
- return 1;
+ return 1;
}
- } elsif ($CPAN::META->has_inst("Archive::Tar")
- &&
- $CPAN::META->has_inst("Compress::Zlib") ) {
+ } elsif ($prefer==2) { # 2 => modules
my $tar = Archive::Tar->new($file,1);
- $tar->extract($tar->list_files); # I'm pretty sure we have nothing
- # that isn't compressed
+ my $af; # archive file
+ my @af;
+ if ($BUGHUNTING) {
+ # RCS 1.337 had this code, it turned out unacceptable slow but
+ # it revealed a bug in Archive::Tar. Code is only here to hunt
+ # the bug again. It should never be enabled in published code.
+ # GDGraph3d-0.53 was an interesting case according to Larry
+ # Virden.
+ warn(">>>Bughunting code enabled<<< " x 20);
+ for $af ($tar->list_files) {
+ if ($af =~ m!^(/|\.\./)!) {
+ $CPAN::Frontend->mydie("ALERT: Archive contains ".
+ "illegal member [$af]");
+ }
+ $CPAN::Frontend->myprint("$af\n");
+ $tar->extract($af); # slow but effective for finding the bug
+ return if $CPAN::Signal;
+ }
+ } else {
+ for $af ($tar->list_files) {
+ if ($af =~ m!^(/|\.\./)!) {
+ $CPAN::Frontend->mydie("ALERT: Archive contains ".
+ "illegal member [$af]");
+ }
+ $CPAN::Frontend->myprint("$af\n");
+ push @af, $af;
+ return if $CPAN::Signal;
+ }
+ $tar->extract(@af);
+ }
ExtUtils::MM_MacOS::convert_files([$tar->list_files], 1)
if ($^O eq 'MacOS');
return 1;
- } else {
- $CPAN::Frontend->mydie(qq{
-CPAN.pm needs either both external programs tar and gzip installed or
-both the modules Archive::Tar and Compress::Zlib. Neither prerequisite
-is available. Can\'t continue.
-});
}
}
+sub unzip {
+ my($class,$file) = @_;
+ if ($CPAN::META->has_inst("Archive::Zip")) {
+ # blueprint of the code from Archive::Zip::Tree::extractTree();
+ my $zip = Archive::Zip->new();
+ my $status;
+ $status = $zip->read($file);
+ die "Read of file[$file] failed\n" if $status != Archive::Zip::AZ_OK();
+ $CPAN::META->debug("Successfully read file[$file]") if $CPAN::DEBUG;
+ my @members = $zip->members();
+ for my $member ( @members ) {
+ my $af = $member->fileName();
+ if ($af =~ m!^(/|\.\./)!) {
+ $CPAN::Frontend->mydie("ALERT: Archive contains ".
+ "illegal member [$af]");
+ }
+ my $status = $member->extractToFileNamed( $af );
+ $CPAN::META->debug("af[$af]status[$status]") if $CPAN::DEBUG;
+ die "Extracting of file[$af] from zipfile[$file] failed\n" if
+ $status != Archive::Zip::AZ_OK();
+ return if $CPAN::Signal;
+ }
+ return 1;
+ } else {
+ my $unzip = $CPAN::Config->{unzip} or
+ $CPAN::Frontend->mydie("Cannot unzip, no unzip program available");
+ my @system = ($unzip, $file);
+ return system(@system) == 0;
+ }
+}
+
+
+package CPAN::Version;
+# CPAN::Version::vcmp courtesy Jost Krieger
+sub vcmp {
+ my($self,$l,$r) = @_;
+ local($^W) = 0;
+ CPAN->debug("l[$l] r[$r]") if $CPAN::DEBUG;
+
+ return 0 if $l eq $r; # short circuit for quicker success
+
+ if ($l=~/^v/ <=> $r=~/^v/) {
+ for ($l,$r) {
+ next if /^v/;
+ $_ = $self->float2vv($_);
+ }
+ }
+
+ return
+ ($l ne "undef") <=> ($r ne "undef") ||
+ ($] >= 5.006 &&
+ $l =~ /^v/ &&
+ $r =~ /^v/ &&
+ $self->vstring($l) cmp $self->vstring($r)) ||
+ $l <=> $r ||
+ $l cmp $r;
+}
+
+sub vgt {
+ my($self,$l,$r) = @_;
+ $self->vcmp($l,$r) > 0;
+}
+
+sub vstring {
+ my($self,$n) = @_;
+ $n =~ s/^v// or die "CPAN::Version::vstring() called with invalid arg [$n]";
+ pack "U*", split /\./, $n;
+}
+
+# vv => visible vstring
+sub float2vv {
+ my($self,$n) = @_;
+ my($rev) = int($n);
+ $rev ||= 0;
+ my($mantissa) = $n =~ /\.(\d{1,12})/; # limit to 12 digits to limit
+ # architecture influence
+ $mantissa ||= 0;
+ $mantissa .= "0" while length($mantissa)%3;
+ my $ret = "v" . $rev;
+ while ($mantissa) {
+ $mantissa =~ s/(\d{1,3})// or
+ die "Panic: length>0 but not a digit? mantissa[$mantissa]";
+ $ret .= ".".int($1);
+ }
+ # warn "n[$n]ret[$ret]";
+ $ret;
+}
+
+sub readable {
+ my($self,$n) = @_;
+ $n =~ /^([\w\-\+\.]+)/;
+
+ return $1 if defined $1 && length($1)>0;
+ # if the first user reaches version v43, he will be treated as "+".
+ # We'll have to decide about a new rule here then, depending on what
+ # will be the prevailing versioning behavior then.
+
+ if ($] < 5.006) { # or whenever v-strings were introduced
+ # we get them wrong anyway, whatever we do, because 5.005 will
+ # have already interpreted 0.2.4 to be "0.24". So even if he
+ # indexer sends us something like "v0.2.4" we compare wrongly.
+
+ # And if they say v1.2, then the old perl takes it as "v12"
+
+ $CPAN::Frontend->mywarn("Suspicious version string seen [$n]");
+ return $n;
+ }
+ my $better = sprintf "v%vd", $n;
+ CPAN->debug("n[$n] better[$better]") if $CPAN::DEBUG;
+ return $better;
+}
+
package CPAN;
1;
@@ -4518,11 +5885,11 @@ the make processes and deletes excess space according to a simple FIFO
mechanism.
For extended searching capabilities there's a plugin for CPAN available,
-L<CPAN::WAIT>. C<CPAN::WAIT> is a full-text search engine that indexes
-all documents available in CPAN authors directories. If C<CPAN::WAIT>
-is installed on your system, the interactive shell of <CPAN.pm> will
-enable the C<wq>, C<wr>, C<wd>, C<wl>, and C<wh> commands which send
-queries to the WAIT server that has been configured for your
+L<C<CPAN::WAIT>|CPAN::WAIT>. C<CPAN::WAIT> is a full-text search engine
+that indexes all documents available in CPAN authors directories. If
+C<CPAN::WAIT> is installed on your system, the interactive shell of
+CPAN.pm will enable the C<wq>, C<wr>, C<wd>, C<wl>, and C<wh> commands
+which send queries to the WAIT server that has been configured for your
installation.
All other methods provided are accessible in a programmer style and in an
@@ -4541,6 +5908,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
@@ -4584,10 +5955,10 @@ also is run unconditionally. But for
CPAN checks if an install is actually needed for it and prints
I<module up to date> in the case that the distribution file containing
-the module doesnE<39>t need to be updated.
+the module doesn't need to be updated.
CPAN also keeps track of what it has done within the current session
-and doesnE<39>t try to build a package a second time regardless if it
+and doesn't try to build a package a second time regardless if it
succeeded or not. The C<force> command takes as a first argument the
method to invoke (currently: C<make>, C<test>, or C<install>) and executes the
command from scratch.
@@ -4615,6 +5986,13 @@ displays the README file of the associated distribution. C<Look> gets
and untars (if not yet done) the distribution file, changes to the
appropriate directory and opens a subshell process in that directory.
+=item ls author
+
+C<ls> lists all distribution files in and below an author's CPAN
+directory. Only those files that contain modules are listed and if
+there is more than one for any given module, only the most recent one
+is listed.
+
=item Signals
CPAN.pm installs signal handlers for SIGINT and SIGTERM. While you are
@@ -4659,7 +6037,7 @@ installation. You start on one architecture with the help of a Bundle
file produced earlier. CPAN installs the whole Bundle for you, but
when you try to repeat the job on the second architecture, CPAN
responds with a C<"Foo up to date"> message for all modules. So you
-invoke CPAN's recompile on the second architecture and youE<39>re done.
+invoke CPAN's recompile on the second architecture and you're done.
Another popular use for C<recompile> is to act as a rescue in case your
perl breaks binary compatibility. If one of the modules that CPAN uses
@@ -4704,7 +6082,7 @@ so you would have to say
The first example will be driven by an object of the class
CPAN::Module, the second by an object of class CPAN::Distribution.
-=head2 ProgrammerE<39>s interface
+=head2 Programmer's interface
If you do not enter the shell, the available shell commands are both
available as methods (C<CPAN::Shell-E<gt>install(...)>) and as
@@ -4727,6 +6105,12 @@ list of CPAN::Module objects according to the C<@things> arguments
given. In scalar context it only returns the first element of the
list.
+=item expandany(@things)
+
+Like expand, but returns objects of the appropriate type, i.e.
+CPAN::Bundle objects for bundles, CPAN::Module objects for modules and
+CPAN::Distribution objects fro distributions.
+
=item Programming Examples
This enables the programmer to do operations that combine
@@ -4749,18 +6133,21 @@ functionalities that are available in the shell.
print "No VERSION in ", $mod->id, "\n";
}
+ # find out which distribution on CPAN contains a module:
+ print CPAN::Shell->expand("Module","Apache::Constants")->cpan_file
+
Or if you want to write a cronjob to watch The CPAN, you could list
-all modules that need updating:
+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:
+process, maybe something like this suits you better:
# list all modules on my disk that have newer versions on CPAN
for $mod (CPAN::Shell->expand("Module","/./")){
@@ -4786,7 +6173,299 @@ tricks:
=back
-=head2 Methods in the four Classes
+=head2 Methods in the other Classes
+
+The programming interface for the classes CPAN::Module,
+CPAN::Distribution, CPAN::Bundle, and CPAN::Author is still considered
+beta and partially even alpha. In the following paragraphs only those
+methods are documented that have proven useful over a longer time and
+thus are unlikely to change.
+
+=over
+
+=item CPAN::Author::as_glimpse()
+
+Returns a one-line description of the author
+
+=item CPAN::Author::as_string()
+
+Returns a multi-line description of the author
+
+=item CPAN::Author::email()
+
+Returns the author's email address
+
+=item CPAN::Author::fullname()
+
+Returns the author's name
+
+=item CPAN::Author::name()
+
+An alias for fullname
+
+=item CPAN::Bundle::as_glimpse()
+
+Returns a one-line description of the bundle
+
+=item CPAN::Bundle::as_string()
+
+Returns a multi-line description of the bundle
+
+=item CPAN::Bundle::clean()
+
+Recursively runs the C<clean> method on all items contained in the bundle.
+
+=item CPAN::Bundle::contains()
+
+Returns a list of objects' IDs contained in a bundle. The associated
+objects may be bundles, modules or distributions.
+
+=item CPAN::Bundle::force($method,@args)
+
+Forces CPAN to perform a task that normally would have failed. Force
+takes as arguments a method name to be called and any number of
+additional arguments that should be passed to the called method. The
+internals of the object get the needed changes so that CPAN.pm does
+not refuse to take the action. The C<force> is passed recursively to
+all contained objects.
+
+=item CPAN::Bundle::get()
+
+Recursively runs the C<get> method on all items contained in the bundle
+
+=item CPAN::Bundle::inst_file()
+
+Returns the highest installed version of the bundle in either @INC or
+C<$CPAN::Config->{cpan_home}>. Note that this is different from
+CPAN::Module::inst_file.
+
+=item CPAN::Bundle::inst_version()
+
+Like CPAN::Bundle::inst_file, but returns the $VERSION
+
+=item CPAN::Bundle::uptodate()
+
+Returns 1 if the bundle itself and all its members are uptodate.
+
+=item CPAN::Bundle::install()
+
+Recursively runs the C<install> method on all items contained in the bundle
+
+=item CPAN::Bundle::make()
+
+Recursively runs the C<make> method on all items contained in the bundle
+
+=item CPAN::Bundle::readme()
+
+Recursively runs the C<readme> method on all items contained in the bundle
+
+=item CPAN::Bundle::test()
+
+Recursively runs the C<test> method on all items contained in the bundle
+
+=item CPAN::Distribution::as_glimpse()
+
+Returns a one-line description of the distribution
+
+=item CPAN::Distribution::as_string()
+
+Returns a multi-line description of the distribution
+
+=item CPAN::Distribution::clean()
+
+Changes to the directory where the distribution has been unpacked and
+runs C<make clean> there.
+
+=item CPAN::Distribution::containsmods()
+
+Returns a list of IDs of modules contained in a distribution file.
+Only works for distributions listed in the 02packages.details.txt.gz
+file. This typically means that only the most recent version of a
+distribution is covered.
+
+=item CPAN::Distribution::cvs_import()
+
+Changes to the directory where the distribution has been unpacked and
+runs something like
+
+ cvs -d $cvs_root import -m $cvs_log $cvs_dir $userid v$version
+
+there.
+
+=item CPAN::Distribution::dir()
+
+Returns the directory into which this distribution has been unpacked.
+
+=item CPAN::Distribution::force($method,@args)
+
+Forces CPAN to perform a task that normally would have failed. Force
+takes as arguments a method name to be called and any number of
+additional arguments that should be passed to the called method. The
+internals of the object get the needed changes so that CPAN.pm does
+not refuse to take the action.
+
+=item CPAN::Distribution::get()
+
+Downloads the distribution from CPAN and unpacks it. Does nothing if
+the distribution has already been downloaded and unpacked within the
+current session.
+
+=item CPAN::Distribution::install()
+
+Changes to the directory where the distribution has been unpacked and
+runs the external command C<make install> there. If C<make> has not
+yet been run, it will be run first. A C<make test> will be issued in
+any case and if this fails, the install will be cancelled. The
+cancellation can be avoided by letting C<force> run the C<install> for
+you.
+
+=item CPAN::Distribution::isa_perl()
+
+Returns 1 if this distribution file seems to be a perl distribution.
+Normally this is derived from the file name only, but the index from
+CPAN can contain a hint to achieve a return value of true for other
+filenames too.
+
+=item CPAN::Distribution::look()
+
+Changes to the directory where the distribution has been unpacked and
+opens a subshell there. Exiting the subshell returns.
+
+=item CPAN::Distribution::make()
+
+First runs the C<get> method to make sure the distribution is
+downloaded and unpacked. Changes to the directory where the
+distribution has been unpacked and runs the external commands C<perl
+Makefile.PL> and C<make> there.
+
+=item CPAN::Distribution::prereq_pm()
+
+Returns the hash reference that has been announced by a distribution
+as the PREREQ_PM hash in the Makefile.PL. Note: works only after an
+attempt has been made to C<make> the distribution. Returns undef
+otherwise.
+
+=item CPAN::Distribution::readme()
+
+Downloads the README file associated with a distribution and runs it
+through the pager specified in C<$CPAN::Config->{pager}>.
+
+=item CPAN::Distribution::test()
+
+Changes to the directory where the distribution has been unpacked and
+runs C<make test> there.
+
+=item CPAN::Distribution::uptodate()
+
+Returns 1 if all the modules contained in the distribution are
+uptodate. Relies on containsmods.
+
+=item CPAN::Index::force_reload()
+
+Forces a reload of all indices.
+
+=item CPAN::Index::reload()
+
+Reloads all indices if they have been read more than
+C<$CPAN::Config->{index_expire}> days.
+
+=item CPAN::InfoObj::dump()
+
+CPAN::Author, CPAN::Bundle, CPAN::Module, and CPAN::Distribution
+inherit this method. It prints the data structure associated with an
+object. Useful for debugging. Note: the data structure is considered
+internal and thus subject to change without notice.
+
+=item CPAN::Module::as_glimpse()
+
+Returns a one-line description of the module
+
+=item CPAN::Module::as_string()
+
+Returns a multi-line description of the module
+
+=item CPAN::Module::clean()
+
+Runs a clean on the distribution associated with this module.
+
+=item CPAN::Module::cpan_file()
+
+Returns the filename on CPAN that is associated with the module.
+
+=item CPAN::Module::cpan_version()
+
+Returns the latest version of this module available on CPAN.
+
+=item CPAN::Module::cvs_import()
+
+Runs a cvs_import on the distribution associated with this module.
+
+=item CPAN::Module::description()
+
+Returns a 44 chracter description of this module. Only available for
+modules listed in The Module List (CPAN/modules/00modlist.long.html
+or 00modlist.long.txt.gz)
+
+=item CPAN::Module::force($method,@args)
+
+Forces CPAN to perform a task that normally would have failed. Force
+takes as arguments a method name to be called and any number of
+additional arguments that should be passed to the called method. The
+internals of the object get the needed changes so that CPAN.pm does
+not refuse to take the action.
+
+=item CPAN::Module::get()
+
+Runs a get on the distribution associated with this module.
+
+=item CPAN::Module::inst_file()
+
+Returns the filename of the module found in @INC. The first file found
+is reported just like perl itself stops searching @INC when it finds a
+module.
+
+=item CPAN::Module::inst_version()
+
+Returns the version number of the module in readable format.
+
+=item CPAN::Module::install()
+
+Runs an C<install> on the distribution associated with this module.
+
+=item CPAN::Module::look()
+
+Changes to the directory where the distribution assoicated with this
+module has been unpacked and opens a subshell there. Exiting the
+subshell returns.
+
+=item CPAN::Module::make()
+
+Runs a C<make> on the distribution associated with this module.
+
+=item CPAN::Module::manpage_headline()
+
+If module is installed, peeks into the module's manpage, reads the
+headline and returns it. Moreover, if the module has been downloaded
+within this session, does the equivalent on the downloaded module even
+if it is not installed.
+
+=item CPAN::Module::readme()
+
+Runs a C<readme> on the distribution associated with this module.
+
+=item CPAN::Module::test()
+
+Runs a C<test> on the distribution associated with this module.
+
+=item CPAN::Module::uptodate()
+
+Returns 1 if the module is installed and up-to-date.
+
+=item CPAN::Module::userid()
+
+Returns the author's ID of the module.
+
+=back
=head2 Cache Manager
@@ -4880,17 +6559,18 @@ enthusiasm).
=head2 Debugging
-The debugging of this module is pretty difficult, because we have
+The debugging of this module is a bit complex, because we have
interferences of the software producing the indices on CPAN, of the
mirroring process on CPAN, of packaging, of configuration, of
synchronicity, and of bugs within CPAN.pm.
-In interactive mode you can try "o debug" which will list options for
-debugging the various parts of the package. The output may not be very
-useful for you as it's just a by-product of my own testing, but if you
-have an idea which part of the package may have a bug, it's sometimes
-worth to give it a try and send me more specific output. You should
-know that "o debug" has built-in completion support.
+For code debugging in interactive mode you can try "o debug" which
+will list options for debugging the various parts of the code. You
+should know that "o debug" has built-in completion support.
+
+For data debugging there is the C<dump> command which takes the same
+arguments as make/test/install and outputs the object's Data::Dumper
+dump.
=head2 Floppy, Zip, Offline Mode
@@ -4918,7 +6598,10 @@ defined:
build_cache size of cache for directories to build modules
build_dir locally accessible directory to build modules
index_expire after this many days refetch index files
+ cache_metadata use serializer to cache metadata
cpan_home local directory reserved for this package
+ dontload_hash anonymous hash: modules in the keys will not be
+ loaded by the CPAN::has_inst() routine
gzip location of external program gzip
inactivity_timeout breaks interactive Makefile.PLs after this
many seconds inactivity. Set to 0 to never break.
@@ -4933,8 +6616,12 @@ defined:
prerequisites_policy
what to do if you are missing module prerequisites
('follow' automatically, 'ask' me, or 'ignore')
+ proxy_user username for accessing an authenticating proxy
+ proxy_pass password for accessing an authenticating proxy
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)
@@ -4973,7 +6660,8 @@ works like the corresponding perl commands.
=head2 Note on urllist parameter's format
urllist parameters are URLs according to RFC 1738. We do a little
-guessing if your URL is not compliant, but if you have problems with file URLs, please try the correct format. Either:
+guessing if your URL is not compliant, but if you have problems with
+file URLs, please try the correct format. Either:
file://localhost/whatever/ftp/pub/CPAN/
@@ -5021,8 +6709,8 @@ oneliners.
=head1 POPULATE AN INSTALLATION WITH LOTS OF MODULES
-To populate a freshly installed perl with my favorite modules is pretty
-easiest by maintaining a private bundle definition file. To get a useful
+Populating a freshly installed perl with my favorite modules is pretty
+easy if you maintain a private bundle definition file. To get a useful
blueprint of a bundle definition file, the command autobundle can be used
on the CPAN shell command line. This command writes a bundle definition
file for all modules that are installed for the currently running perl
@@ -5034,7 +6722,7 @@ Bundle/my_bundle.pm. With a clever bundle file you can then simply say
then answer a few questions and then go out for a coffee.
-Maintaining a bundle definition file means to keep track of two
+Maintaining a bundle definition file means keeping track of two
things: dependencies and interactivity. CPAN.pm sometimes fails on
calculating dependencies because not all modules define all MakeMaker
attributes correctly, so a bundle definition file should specify
@@ -5043,12 +6731,18 @@ annoying that many distributions need some interactive configuring. So
what I try to accomplish in my private bundle file is to have the
packages that need to be configured early in the file and the gentle
ones later, so I can go out after a few minutes and leave CPAN.pm
-unattained.
+untended.
=head1 WORKING WITH CPAN.pm BEHIND FIREWALLS
Thanks to Graham Barr for contributing the following paragraphs about
-the interaction between perl, and various firewall configurations.
+the interaction between perl, and various firewall configurations. For
+further informations on firewalls, it is recommended to consult the
+documentation that comes with the ncftp program. If you are unable to
+go through the firewall with a simple Perl setup, it is very likely
+that you can configure ncftp so that it works for your firewall.
+
+=head2 Three basic types of firewalls
Firewalls can be categorized into three basic types.
@@ -5091,7 +6785,7 @@ There are two that I can think off.
=item SOCKS
If you are using a SOCKS firewall you will need to compile perl and link
-it with the SOCKS library, this is what is normally called a ``socksified''
+it with the SOCKS library, this is what is normally called a 'socksified'
perl. With this executable you will be able to connect to servers outside
the firewall as if it is not there.
@@ -5099,18 +6793,179 @@ the firewall as if it is not there.
This is the firewall implemented in the Linux kernel, it allows you to
hide a complete network behind one IP address. With this firewall no
-special compiling is need as you can access hosts directly.
+special compiling is needed as you can access hosts directly.
=back
=back
+=head2 Configuring lynx or ncftp for going through a firewall
+
+If you can go through your firewall with e.g. lynx, presumably with a
+command such as
+
+ /usr/local/bin/lynx -pscott:tiger
+
+then you would configure CPAN.pm with the command
+
+ o conf lynx "/usr/local/bin/lynx -pscott:tiger"
+
+That's all. Similarly for ncftp or ftp, you would configure something
+like
+
+ o conf ncftp "/usr/bin/ncftp -f /home/scott/ncftplogin.cfg"
+
+Your milage may vary...
+
+=head1 FAQ
+
+=over
+
+=item 1)
+
+I installed a new version of module X but CPAN keeps saying,
+I have the old version installed
+
+Most probably you B<do> have the old version installed. This can
+happen if a module installs itself into a different directory in the
+@INC path than it was previously installed. This is not really a
+CPAN.pm problem, you would have the same problem when installing the
+module manually. The easiest way to prevent this behaviour is to add
+the argument C<UNINST=1> to the C<make install> call, and that is why
+many people add this argument permanently by configuring
+
+ o conf make_install_arg UNINST=1
+
+=item 2)
+
+So why is UNINST=1 not the default?
+
+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)
+
+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
+
+ o conf make_arg "| tee -ai /root/.cpan/logs/make.out"
+ o conf make_install_arg "| tee -ai /root/.cpan/logs/make_install.out"
+
+so that STDOUT is captured in a file for later inspection.
+
+
+=item 5)
+
+I am not root, how can I install a module in a personal directory?
+
+You will most probably like something like this:
+
+ o conf makepl_arg "LIB=~/myperl/lib \
+ INSTALLMAN1DIR=~/myperl/man/man1 \
+ INSTALLMAN3DIR=~/myperl/man/man3"
+ install Sybase::Sybperl
+
+You can make this setting permanent like all C<o conf> settings with
+C<o conf commit>.
+
+You will have to add ~/myperl/man to the MANPATH environment variable
+and also tell your perl programs to look into ~/myperl/lib, e.g. by
+including
+
+ use lib "$ENV{HOME}/myperl/lib";
+
+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 6)
+
+How to get a package, unwrap it, and make a change before building it?
+
+ look Sybase::Sybperl
+
+=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?
+
+The reason for this is that CPAN does not know the dependencies of all
+modules when it starts out. To decide about the additional items to
+install, it just uses data found in the generated Makefile. An
+undetected missing piece breaks the process. But it may well be that
+your Bundle installs some prerequisite later than some depending item
+and thus your second try is able to resolve everything. Please note,
+CPAN.pm does not know the dependency tree in advance and cannot sort
+the queue of things to install in a topologically correct order. It
+resolves perfectly well IFF all modules declare the prerequisites
+correctly with the PREREQ_PM attribute to MakeMaker. For bundles which
+fail and you need to install often, it is recommended sort the Bundle
+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 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.
+
+Some versions of readline are picky about capitalization in the
+/etc/inputrc file and specifically RedHat 6.2 comes with a
+/etc/inputrc that contains the word C<on> in lowercase. Change the
+occurrences of C<on> to C<On> and the bug should disappear.
+
+=item 10)
+
+Some authors have strange characters in their names.
+
+Internally CPAN.pm uses the UTF-8 charset. If your terminal is
+expecting ISO-8859-1 charset, a converter can be activated by setting
+term_is_latin to a true value in your config file. One way of doing so
+would be
+
+ cpan> ! $CPAN::Config->{term_is_latin}=1
+
+Extended support for converters will be made available as soon as perl
+becomes stable with regard to charset issues.
+
+=back
+
=head1 BUGS
We should give coverage for B<all> of the CPAN and not just the PAUSE
part, right? In this discussion CPAN and PAUSE have become equal --
-but they are not. PAUSE is authors/ and modules/. CPAN is PAUSE plus
-the clpa/, doc/, misc/, ports/, src/, scripts/.
+but they are not. PAUSE is authors/, modules/ and scripts/. CPAN is
+PAUSE plus the clpa/, doc/, misc/, ports/, and src/.
Future development should be directed towards a better integration of
the other parts.
@@ -5124,6 +6979,11 @@ traditional method of building a Perl module package from a shell.
Andreas Koenig E<lt>andreas.koenig@anima.deE<gt>
+=head1 TRANSLATIONS
+
+Kawai,Takanori provides a Japanese translation of this manpage at
+http://member.nifty.ne.jp/hippo2000/perltips/CPAN.htm
+
=head1 SEE ALSO
perl(1), CPAN::Nox(3)
diff --git a/contrib/perl5/lib/CPAN/FirstTime.pm b/contrib/perl5/lib/CPAN/FirstTime.pm
index 0e795da..0429db1 100644
--- a/contrib/perl5/lib/CPAN/FirstTime.pm
+++ b/contrib/perl5/lib/CPAN/FirstTime.pm
@@ -1,3 +1,4 @@
+# -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-
package CPAN::Mirrored::By;
sub new {
@@ -16,7 +17,7 @@ use FileHandle ();
use File::Basename ();
use File::Path ();
use vars qw($VERSION);
-$VERSION = substr q$Revision: 1.38 $, 10;
+$VERSION = substr q$Revision: 1.53 $, 10;
=head1 NAME
@@ -149,7 +150,7 @@ next question.
print qq{
How big should the disk cache be for keeping the build directories
-with all the intermediate files?
+with all the intermediate files\?
};
@@ -175,6 +176,47 @@ disable the cache scanning with 'never'.
$CPAN::Config->{scan_cache} = $ans;
#
+ # cache_metadata
+ #
+ print qq{
+
+To considerably speed up the initial CPAN shell startup, it is
+possible to use Storable to create a cache of metadata. If Storable
+is not available, the normal index mechanism will be used.
+
+};
+
+ defined($default = $CPAN::Config->{cache_metadata}) or $default = 1;
+ do {
+ $ans = prompt("Cache metadata (yes/no)?", ($default ? 'yes' : 'no'));
+ } while ($ans !~ /^\s*[yn]/i);
+ $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, names
+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?
#
@@ -188,7 +230,7 @@ policy to one of the three values.
};
- $default = $CPAN::Config->{prerequisites_policy} || 'follow';
+ $default = $CPAN::Config->{prerequisites_policy} || 'ask';
do {
$ans =
prompt("Policy on building prerequisites (follow, ask or ignore)?",
@@ -202,10 +244,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.
};
@@ -214,7 +257,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;
@@ -272,9 +315,9 @@ those.
print qq{
Every Makefile.PL is run by perl in a separate process. Likewise we
-run \'make\' and \'make install\' in processes. If you have any parameters
-\(e.g. PREFIX, INSTALLPRIVLIB, UNINST or the like\) you want to pass to
-the calls, please specify them here.
+run \'make\' and \'make install\' in processes. If you have any
+parameters \(e.g. PREFIX, LIB, UNINST or the like\) you want to pass
+to the calls, please specify them here.
If you don\'t understand this question, just press ENTER.
@@ -282,13 +325,29 @@ If you don\'t understand this question, just press ENTER.
$default = $CPAN::Config->{makepl_arg} || "";
$CPAN::Config->{makepl_arg} =
- prompt("Parameters for the 'perl Makefile.PL' command?",$default);
+ prompt("Parameters for the 'perl Makefile.PL' command?
+Typical frequently used settings:
+
+ POLLUTE=1 increasing backwards compatibility
+ LIB=~/perl non-root users (please see manual for more hints)
+
+Your choice: ",$default);
$default = $CPAN::Config->{make_arg} || "";
- $CPAN::Config->{make_arg} = prompt("Parameters for the 'make' command?",$default);
+ $CPAN::Config->{make_arg} = prompt("Parameters for the 'make' command?
+Typical frequently used setting:
+
+ -j3 dual processor system
+
+Your choice: ",$default);
$default = $CPAN::Config->{make_install_arg} || $CPAN::Config->{make_arg} || "";
$CPAN::Config->{make_install_arg} =
- prompt("Parameters for the 'make install' command?",$default);
+ prompt("Parameters for the 'make install' command?
+Typical frequently used setting:
+
+ UNINST=1 to always uninstall potentially conflicting files
+
+Your choice: ",$default);
#
# Alarm period
@@ -325,6 +384,44 @@ the \$CPAN::Config takes precedence.
$CPAN::Config->{$_} = prompt("Your $_?",$default);
}
+ if ($CPAN::Config->{ftp_proxy} ||
+ $CPAN::Config->{http_proxy}) {
+ $default = $CPAN::Config->{proxy_user} || $CPAN::LWP::UserAgent::USER;
+ print qq{
+
+If your proxy is an authenticating proxy, you can store your username
+permanently. If you do not want that, just press RETURN. You will then
+be asked for your username in every future session.
+
+};
+ if ($CPAN::Config->{proxy_user} = prompt("Your proxy user id?",$default)) {
+ print qq{
+
+Your password for the authenticating proxy can also be stored
+permanently on disk. If this violates your security policy, just press
+RETURN. You will then be asked for the password in every future
+session.
+
+};
+
+ if ($CPAN::META->has_inst("Term::ReadKey")) {
+ Term::ReadKey::ReadMode("noecho");
+ } else {
+ print qq{
+
+Warning: Term::ReadKey seems not to be available, your password will
+be echoed to the terminal!
+
+};
+ }
+ $CPAN::Config->{proxy_pass} = prompt("Your proxy password?");
+ if ($CPAN::META->has_inst("Term::ReadKey")) {
+ Term::ReadKey::ReadMode("restore");
+ }
+ $CPAN::Frontend->myprint("\n\n");
+ }
+ }
+
#
# MIRRORED.BY
#
@@ -361,8 +458,27 @@ sub conf_sites {
File::Copy::copy($m,$mby) or die "Could not update $mby: $!";
}
my $loopcount = 0;
- while () {
- if ( ! -f $mby ){
+ local $^T = time;
+ my $overwrite_local = 0;
+ if ($mby && -f $mby && -M _ <= 60 && -s _ > 0) {
+ my $mtime = localtime((stat _)[9]);
+ my $prompt = qq{Found $mby as of $mtime
+
+I\'d use that as a database of CPAN sites. If that is OK for you,
+please answer 'y', but if you want me to get a new database now,
+please answer 'n' to the following question.
+
+Shall I use the local database in $mby?};
+ my $ans = prompt($prompt,"y");
+ $overwrite_local = 1 unless $ans =~ /^y/i;
+ }
+ while ($mby) {
+ if ($overwrite_local) {
+ print qq{Trying to overwrite $mby
+};
+ $mby = CPAN::FTP->localize($m,$mby,3);
+ $overwrite_local = 0;
+ } elsif ( ! -f $mby ){
print qq{You have no $mby
I\'m trying to fetch one
};
@@ -383,6 +499,7 @@ sub conf_sites {
}
}
read_mirrored_by($mby);
+ bring_your_own();
}
sub find_exe {
@@ -424,7 +541,7 @@ sub picklist {
}
sub read_mirrored_by {
- my($local) = @_;
+ my $local = shift or return;
my(%all,$url,$expected_size,$default,$ans,$host,$dst,$country,$continent,@location);
my $fh = FileHandle->new;
$fh->open($local) or die "Couldn't open $local: $!";
@@ -503,7 +620,8 @@ http: -- that host a CPAN mirror.
}
}
push (@urls, map ("$_ (previous pick)", @previous_urls));
- my $prompt = "Select as many URLs as you like";
+ my $prompt = "Select as many URLs as you like,
+put them on one line, separated by blanks";
if (@previous_urls) {
$default = join (' ', ((scalar @urls) - (scalar @previous_urls) + 1) ..
(scalar @urls));
@@ -512,25 +630,37 @@ http: -- that host a CPAN mirror.
@urls = picklist (\@urls, $prompt, $default);
foreach (@urls) { s/ \(.*\)//; }
- %seen = map (($_ => 1), @urls);
+ push @{$CPAN::Config->{urllist}}, @urls;
+}
+sub bring_your_own {
+ my %seen = map (($_ => 1), @{$CPAN::Config->{urllist}});
+ my($ans,@urls);
do {
- $ans = prompt ("Enter another URL or RETURN to quit:", "");
+ my $prompt = "Enter another URL or RETURN to quit:";
+ unless (%seen) {
+ $prompt = qq{CPAN.pm needs at least one URL where it can fetch CPAN files from.
+
+Please enter your CPAN site:};
+ }
+ $ans = prompt ($prompt, "");
if ($ans) {
- $ans =~ s|/?$|/|; # has to end with one slash
+ $ans =~ s|/?\z|/|; # has to end with one slash
$ans = "file:$ans" unless $ans =~ /:/; # without a scheme is a file:
if ($ans =~ /^\w+:\/./) {
- push @urls, $ans
- unless $seen{$ans};
- }
- else {
- print qq{"$ans" doesn\'t look like an URL at first sight.
-I\'ll ignore it for now. You can add it to $INC{'CPAN/MyConfig.pm'}
-later if you\'re sure it\'s right.\n};
+ push @urls, $ans unless $seen{$ans}++;
+ } else {
+ printf(qq{"%s" doesn\'t look like an URL at first sight.
+I\'ll ignore it for now.
+You can add it to your %s
+later if you\'re sure it\'s right.\n},
+ $ans,
+ $INC{'CPAN/MyConfig.pm'} || $INC{'CPAN/Config.pm'} || "configuration file",
+ );
}
}
- } while $ans;
+ } while $ans || !%seen;
push @{$CPAN::Config->{urllist}}, @urls;
# xxx delete or comment these out when you're happy that it works
diff --git a/contrib/perl5/lib/Carp/Heavy.pm b/contrib/perl5/lib/Carp/Heavy.pm
index 5e3de49..4d12bd7 100644
--- a/contrib/perl5/lib/Carp/Heavy.pm
+++ b/contrib/perl5/lib/Carp/Heavy.pm
@@ -42,7 +42,7 @@ sub longmess_heavy {
#
# if the $error error string is newline terminated then it
# is copied into $mess. Otherwise, $mess gets set (at the end of
- # the 'else {' section below) to one of two things. The first time
+ # the 'else' section below) to one of two things. The first time
# through, it is set to the "$error at $file line $line" message.
# $error is then set to 'called' which triggers subsequent loop
# iterations to append $sub to $mess before appending the "$error
@@ -121,10 +121,7 @@ sub longmess_heavy {
# $line" makes sense as "called at $file line $line".
$error = "called";
}
- # this kludge circumvents die's incorrect handling of NUL
- my $msg = \($mess || $error);
- $$msg =~ tr/\0//d;
- $$msg;
+ $mess || $error;
}
@@ -227,17 +224,14 @@ CALLER:
}
else {
# OK! We've got a candidate package. Time to construct the
- # relevant error message and return it. die() doesn't like
- # to be given NUL characters (which $msg may contain) so we
- # remove them first.
+ # relevant error message and return it.
my $msg;
$msg = "$error at $file line $line";
if (defined &Thread::tid) {
my $tid = Thread->self->tid;
- $mess .= " thread $tid" if $tid;
+ $msg .= " thread $tid" if $tid;
}
$msg .= "\n";
- $msg =~ tr/\0//d;
return $msg;
}
}
diff --git a/contrib/perl5/lib/Class/Struct.pm b/contrib/perl5/lib/Class/Struct.pm
index 63eddac..185a8ff 100644
--- a/contrib/perl5/lib/Class/Struct.pm
+++ b/contrib/perl5/lib/Class/Struct.pm
@@ -14,7 +14,7 @@ require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(struct);
-$VERSION = '0.58';
+$VERSION = '0.59';
## Tested on 5.002 and 5.003 without class membership tests:
my $CHECK_CLASS_MEMBERSHIP = ($] >= 5.003_95);
@@ -51,6 +51,20 @@ sub printem {
sub DESTROY { }
}
+sub import {
+ my $self = shift;
+
+ if ( @_ == 0 ) {
+ $self->export_to_level( 1, $self, @EXPORT );
+ } elsif ( @_ == 1 ) {
+ # This is admittedly a little bit silly:
+ # do we ever export anything else than 'struct'...?
+ $self->export_to_level( 1, $self, @_ );
+ } else {
+ &struct;
+ }
+}
+
sub struct {
# Determine parameter list structure, one of:
@@ -76,6 +90,7 @@ sub struct {
$class = (caller())[0];
@decls = @_;
}
+
_usage_error() if @decls % 2 == 1;
# Ensure we are not, and will not be, a subclass.
@@ -168,8 +183,7 @@ sub struct {
$cnt = 0;
foreach $name (@methods){
if ( do { no strict 'refs'; defined &{$class . "::$name"} } ) {
- warnings::warn "function '$name' already defined, overrides struct accessor method"
- if warnings::enabled();
+ warnings::warnif("function '$name' already defined, overrides struct accessor method");
}
else {
$pre = $pst = $cmt = $sel = '';
@@ -243,6 +257,9 @@ Class::Struct - declare struct-like datatypes as Perl classes
# declare struct, based on array, implicit class name:
struct( ELEMENT_NAME => ELEMENT_TYPE, ... );
+ # Declare struct at compile time
+ use Class::Struct CLASS_NAME => [ ELEMENT_NAME => ELEMENT_TYPE, ... ];
+ use Class::Struct CLASS_NAME => { ELEMENT_NAME => ELEMENT_TYPE, ... };
package Myobj;
use Class::Struct;
@@ -263,14 +280,13 @@ Class::Struct - declare struct-like datatypes as Perl classes
# hash type accessor:
$hash_ref = $obj->h; # reference to whole hash
$hash_element_value = $obj->h('x'); # hash element value
- $obj->h('x', 'new value'); # assign to hash element
+ $obj->h('x', 'new value'); # assign to hash element
# class type accessor:
$element_value = $obj->c; # object reference
$obj->c->method(...); # call method of object
$obj->c(new My_Other_Class); # assign a new object
-
=head1 DESCRIPTION
C<Class::Struct> exports a single function, C<struct>.
@@ -288,7 +304,6 @@ same name in the package. (See Example 2.)
Each element's type can be scalar, array, hash, or class.
-
=head2 The C<struct()> function
The C<struct> function has three forms of parameter-list.
@@ -327,6 +342,15 @@ element name will be defined as an accessor method unless a
method by that name is explicitly defined; in the latter case, a
warning is issued if the warning flag (B<-w>) is set.
+=head2 Class Creation at Compile Time
+
+C<Class::Struct> can create your class at compile time. The main reason
+for doing this is obvious, so your class acts like every other class in
+Perl. Creating your class at compile time will make the order of events
+similar to using any other class ( or Perl module ).
+
+There is no significant speed gain between compile time and run time
+class creation, there is just a new, more standard order of events.
=head2 Element Types and Accessor Methods
@@ -411,7 +435,6 @@ contents of that hash are passed to the element's own constructor.
See Example 3 below for an example of initialization.
-
=head1 EXAMPLES
=over
@@ -445,7 +468,6 @@ type C<timeval>.
$t->ru_stime->tv_secs(5);
$t->ru_stime->tv_usecs(0);
-
=item Example 2
An accessor function can be redefined in order to provide
@@ -493,7 +515,6 @@ Note that the initializer for a nested struct is specified
as an anonymous hash of initializers, which is passed on to the nested
struct's constructor.
-
use Class::Struct;
struct Breed =>
@@ -525,6 +546,9 @@ struct's constructor.
=head1 Author and Modification History
+Modified by Casey Tweten, 2000-11-08, v0.59.
+
+ Added the ability for compile time class creation.
Modified by Damian Conway, 1999-03-05, v0.58.
@@ -542,7 +566,6 @@ Modified by Damian Conway, 1999-03-05, v0.58.
Previously these were returned as a reference to a reference
to the element.
-
Renamed to C<Class::Struct> and modified by Jim Miner, 1997-04-02.
members() function removed.
@@ -554,7 +577,6 @@ Renamed to C<Class::Struct> and modified by Jim Miner, 1997-04-02.
Class name to struct() made optional.
Diagnostic checks added.
-
Originally C<Class::Template> by Dean Roehrich.
# Template.pm --- struct/member template builder
diff --git a/contrib/perl5/lib/English.pm b/contrib/perl5/lib/English.pm
index f6e3ec0..f38c313 100644
--- a/contrib/perl5/lib/English.pm
+++ b/contrib/perl5/lib/English.pm
@@ -98,6 +98,8 @@ sub import {
*OSNAME
*LAST_REGEXP_CODE_RESULT
*EXCEPTIONS_BEING_CAUGHT
+ @LAST_MATCH_START
+ @LAST_MATCH_END
);
# The ground of all being. @ARG is deprecated (5.005 makes @_ lexical)
@@ -110,6 +112,8 @@ sub import {
*PREMATCH = *` ;
*POSTMATCH = *' ;
*LAST_PAREN_MATCH = *+ ;
+ *LAST_MATCH_START = *-{ARRAY} ;
+ *LAST_MATCH_END = *+{ARRAY} ;
# Input.
diff --git a/contrib/perl5/lib/ExtUtils/Command.pm b/contrib/perl5/lib/ExtUtils/Command.pm
index bccc76c..aec4013 100644
--- a/contrib/perl5/lib/ExtUtils/Command.pm
+++ b/contrib/perl5/lib/ExtUtils/Command.pm
@@ -177,7 +177,7 @@ Creates directory, including any parent directories.
sub mkpath
{
- File::Path::mkpath([expand_wildcards()],1,0777);
+ File::Path::mkpath([expand_wildcards()],0,0777);
}
=item test_f file
diff --git a/contrib/perl5/lib/ExtUtils/Embed.pm b/contrib/perl5/lib/ExtUtils/Embed.pm
index b649b6b..98c24ac 100644
--- a/contrib/perl5/lib/ExtUtils/Embed.pm
+++ b/contrib/perl5/lib/ExtUtils/Embed.pm
@@ -6,6 +6,7 @@ require Exporter;
require FileHandle;
use Config;
use Getopt::Std;
+use File::Spec;
#Only when we need them
#require ExtUtils::MakeMaker;
@@ -86,33 +87,8 @@ sub xsinit {
sub xsi_header {
return <<EOF;
-#if defined(__cplusplus) && !defined(PERL_OBJECT)
-#define is_cplusplus
-#endif
-
-#ifdef is_cplusplus
-extern "C" {
-#endif
-
#include <EXTERN.h>
#include <perl.h>
-#ifdef PERL_OBJECT
-#define NO_XSLOCKS
-#include <XSUB.h>
-#include "win32iop.h"
-#include <fcntl.h>
-#include <perlhost.h>
-#endif
-#ifdef is_cplusplus
-}
-# ifndef EXTERN_C
-# define EXTERN_C extern "C"
-# endif
-#else
-# ifndef EXTERN_C
-# define EXTERN_C extern
-# endif
-#endif
EOF
}
@@ -190,10 +166,14 @@ sub ldopts {
}
}
$std = 1 unless scalar @link_args;
- @path = $path ? split(/:/, $path) : @INC;
+ my $sep = $Config{path_sep} || ':';
+ @path = $path ? split(/\Q$sep/, $path) : @INC;
push(@potential_libs, @link_args) if scalar @link_args;
- push(@potential_libs, $Config{libs}) if defined $std;
+ # makemaker includes std libs on windows by default
+ if ($^O ne 'MSWin32' and defined($std)) {
+ push(@potential_libs, $Config{perllibs});
+ }
push(@mods, static_ext()) if $std;
@@ -223,12 +203,18 @@ sub ldopts {
}
#print STDERR "\@potential_libs = @potential_libs\n";
- my $libperl = (grep(/^-l\w*perl\w*$/, @link_args))[0] || "-lperl";
+ my $libperl;
+ if ($^O eq 'MSWin32') {
+ $libperl = $Config{libperl};
+ }
+ else {
+ $libperl = (grep(/^-l\w*perl\w*$/, @link_args))[0] || "-lperl";
+ }
+ my $lpath = File::Spec->catdir($Config{archlibexp}, 'CORE');
+ $lpath = qq["$lpath"] if $^O eq 'MSWin32';
my($extralibs, $bsloadlibs, $ldloadlibs, $ld_run_path) =
- $MM->ext(join ' ',
- $MM->catdir("-L$Config{archlibexp}", "CORE"), " $libperl",
- @potential_libs);
+ $MM->ext(join ' ', "-L$lpath", $libperl, @potential_libs);
my $ld_or_bs = $bsloadlibs || $ldloadlibs;
print STDERR "bs: $bsloadlibs ** ld: $ldloadlibs" if $Verbose;
@@ -248,7 +234,9 @@ sub ccdlflags {
}
sub perl_inc {
- my_return(" -I$Config{archlibexp}/CORE ");
+ my $dir = File::Spec->catdir($Config{archlibexp}, 'CORE');
+ $dir = qq["$dir"] if $^O eq 'MSWin32';
+ my_return(" -I$dir ");
}
sub ccopts {
@@ -277,6 +265,7 @@ ExtUtils::Embed - Utilities for embedding Perl in C/C++ applications
perl -MExtUtils::Embed -e xsinit
+ perl -MExtUtils::Embed -e ccopts
perl -MExtUtils::Embed -e ldopts
=head1 DESCRIPTION
@@ -484,7 +473,7 @@ B<xsinit()> uses the xsi_* functions to generate most of it's code.
=head1 EXAMPLES
For examples on how to use B<ExtUtils::Embed> for building C/C++ applications
-with embedded perl, see the eg/ directory and L<perlembed>.
+with embedded perl, see L<perlembed>.
=head1 SEE ALSO
diff --git a/contrib/perl5/lib/ExtUtils/MM_Cygwin.pm b/contrib/perl5/lib/ExtUtils/MM_Cygwin.pm
index a5ba410..439c67c 100644
--- a/contrib/perl5/lib/ExtUtils/MM_Cygwin.pm
+++ b/contrib/perl5/lib/ExtUtils/MM_Cygwin.pm
@@ -71,6 +71,8 @@ q[-e 'next if -e $$m{$$_} && -M $$m{$$_} < -M $$_ && -M $$m{$$_} < -M "],
push(@m,"\n");
if (%{$self->{MAN1PODS}} || %{$self->{MAN3PODS}}) {
+ grep { $self->{MAN1PODS}{$_} =~ s/::/./g } keys %{$self->{MAN1PODS}};
+ grep { $self->{MAN3PODS}{$_} =~ s/::/./g } keys %{$self->{MAN3PODS}};
push @m, "\t$self->{NOECHO}\$(POD2MAN) \\\n\t";
push @m, join " \\\n\t", %{$self->{MAN1PODS}}, %{$self->{MAN3PODS}};
}
diff --git a/contrib/perl5/lib/ExtUtils/MM_OS2.pm b/contrib/perl5/lib/ExtUtils/MM_OS2.pm
index 430235a..cd6a1e4 100644
--- a/contrib/perl5/lib/ExtUtils/MM_OS2.pm
+++ b/contrib/perl5/lib/ExtUtils/MM_OS2.pm
@@ -93,6 +93,22 @@ sub perl_archive
return "\$(PERL_INC)/libperl\$(LIB_EXT)";
}
+=item perl_archive_after
+
+This is an internal method that returns path to a library which
+should be put on the linker command line I<after> the external libraries
+to be linked to dynamic extensions. This may be needed if the linker
+is one-pass, and Perl includes some overrides for C RTL functions,
+such as malloc().
+
+=cut
+
+sub perl_archive_after
+{
+ return "\$(PERL_INC)/libperl_override\$(LIB_EXT)" unless $OS2::is_aout;
+ return "";
+}
+
sub export_list
{
my ($self) = @_;
diff --git a/contrib/perl5/lib/ExtUtils/MM_VMS.pm b/contrib/perl5/lib/ExtUtils/MM_VMS.pm
index 57a8146..7b75958 100644
--- a/contrib/perl5/lib/ExtUtils/MM_VMS.pm
+++ b/contrib/perl5/lib/ExtUtils/MM_VMS.pm
@@ -151,11 +151,12 @@ sub AUTOLOAD {
# This isn't really an override. It's just here because ExtUtils::MM_VMS
-# appears in @MM::ISA before ExtUtils::Liblist, so if there isn't an ext()
+# appears in @MM::ISA before ExtUtils::Liblist::Kid, so if there isn't an ext()
# in MM_VMS, then AUTOLOAD is called, and bad things happen. So, we just
-# mimic inheritance here and hand off to ExtUtils::Liblist.
+# mimic inheritance here and hand off to ExtUtils::Liblist::Kid.
sub ext {
- ExtUtils::Liblist::ext(@_);
+ require ExtUtils::Liblist;
+ ExtUtils::Liblist::Kid::ext(@_);
}
=back
@@ -231,7 +232,9 @@ invoke Perl images.
sub find_perl {
my($self, $ver, $names, $dirs, $trace) = @_;
my($name,$dir,$vmsfile,@sdirs,@snames,@cand);
+ my($rslt);
my($inabs) = 0;
+ local *TCF;
# Check in relative directories first, so we pick up the current
# version of Perl if we're running MakeMaker as part of the main build.
@sdirs = sort { my($absa) = $self->file_name_is_absolute($a);
@@ -277,15 +280,28 @@ sub find_perl {
foreach $name (@cand) {
print "Checking $name\n" if ($trace >= 2);
# If it looks like a potential command, try it without the MCR
- if ($name =~ /^[\w\-\$]+$/ &&
- `$name -e "require $ver; print ""VER_OK\\n"""` =~ /VER_OK/) {
+ if ($name =~ /^[\w\-\$]+$/) {
+ open(TCF,">temp_mmvms.com") || die('unable to open temp file');
+ print TCF "\$ set message/nofacil/nosever/noident/notext\n";
+ print TCF "\$ $name -e \"require $ver; print \"\"VER_OK\\n\"\"\"\n";
+ close TCF;
+ $rslt = `\@temp_mmvms.com` ;
+ unlink('temp_mmvms.com');
+ if ($rslt =~ /VER_OK/) {
print "Using PERL=$name\n" if $trace;
return $name;
}
+ }
next unless $vmsfile = $self->maybe_command($name);
$vmsfile =~ s/;[\d\-]*$//; # Clip off version number; we can use a newer version as well
print "Executing $vmsfile\n" if ($trace >= 2);
- if (`MCR $vmsfile -e "require $ver; print ""VER_OK\\n"""` =~ /VER_OK/) {
+ open(TCF,">temp_mmvms.com") || die('unable to open temp file');
+ print TCF "\$ set message/nofacil/nosever/noident/notext\n";
+ print TCF "\$ mcr $vmsfile -e \"require $ver; print \"\"VER_OK\\n\"\"\" \n";
+ close TCF;
+ $rslt = `\@temp_mmvms.com`;
+ unlink('temp_mmvms.com');
+ if ($rslt =~ /VER_OK/) {
print "Using PERL=MCR $vmsfile\n" if $trace;
return "MCR $vmsfile";
}
@@ -611,7 +627,7 @@ INST_ARCHAUTODIR = $self->{INST_ARCHAUTODIR}
if ($self->has_link_code()) {
push @m,'
INST_STATIC = $(INST_ARCHAUTODIR)$(BASEEXT)$(LIB_EXT)
-INST_DYNAMIC = $(INST_ARCHAUTODIR)$(BASEEXT).$(DLEXT)
+INST_DYNAMIC = $(INST_ARCHAUTODIR)$(DLBASE).$(DLEXT)
INST_BOOT = $(INST_ARCHAUTODIR)$(BASEEXT).bs
';
} else {
@@ -811,7 +827,7 @@ pm_to_blib.ts : $(TO_INST_PM)
}
push(@m,"\t\$(NOECHO) \$(PERL) -e \"print '$line'\" >>.MM_tmp\n") if $line;
- push(@m,q[ $(PERL) "-I$(PERL_LIB)" "-MExtUtils::Install" -e "pm_to_blib({split(' ',<STDIN>)},'].$autodir.q[')" <.MM_tmp]);
+ push(@m,q[ $(PERL) "-I$(PERL_LIB)" "-MExtUtils::Install" -e "pm_to_blib({split(' ',<STDIN>)},'].$autodir.q[','$(PM_FILTER)')" <.MM_tmp]);
push(@m,qq[
\$(NOECHO) Delete/NoLog/NoConfirm .MM_tmp;
\$(NOECHO) \$(TOUCH) pm_to_blib.ts
@@ -866,6 +882,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?
@@ -1018,7 +1039,7 @@ sub dist {
# Sanitize these for use in $(DISTVNAME) filespec
$attribs{VERSION} =~ s/[^\w\$]/_/g;
- $attribs{NAME} =~ s/[^\w\$]/_/g;
+ $attribs{NAME} =~ s/[^\w\$]/-/g;
return ExtUtils::MM_Unix::dist($self,%attribs);
}
@@ -1194,8 +1215,8 @@ $(BASEEXT).opt : Makefile.PL
s/.*[:>\/\]]//; # Trim off dir spec
$upcase ? uc($_) : $_;
} split ' ', $self->eliminate_macros($self->{OBJECT});
- my($tmp,@lines,$elt) = '';
- my $tmp = shift @omods;
+ my($tmp,@lines,$elt) = '';
+ $tmp = shift @omods;
foreach $elt (@omods) {
$tmp .= ",$elt";
if (length($tmp) > 80) { push @lines, $tmp; $tmp = ''; }
@@ -1652,6 +1673,9 @@ dist : $(DIST_DEFAULT)
zipdist : $(DISTVNAME).zip
$(NOECHO) $(NOOP)
+tardist : $(DISTVNAME).tar$(SUFFIX)
+ $(NOECHO) $(NOOP)
+
$(DISTVNAME).zip : distdir
$(PREOP)
$(ZIP) "$(ZIPFLAGS)" $(MMS$TARGET) [.$(DISTVNAME)...]*.*;
@@ -1661,7 +1685,7 @@ $(DISTVNAME).zip : distdir
$(DISTVNAME).tar$(SUFFIX) : distdir
$(PREOP)
$(TO_UNIX)
- $(TAR) "$(TARFLAGS)" $(DISTVNAME).tar [.$(DISTVNAME)]
+ $(TAR) "$(TARFLAGS)" $(DISTVNAME).tar [.$(DISTVNAME)...]
$(RM_RF) $(DISTVNAME)
$(COMPRESS) $(DISTVNAME).tar
$(POSTOP)
@@ -1872,6 +1896,7 @@ $(OBJECT) : $(PERL_INC)iperlsys.h
# We do NOT just update config.h because that is not sufficient.
# An out of date config.h is not fatal but complains loudly!
$(PERL_INC)config.h : $(PERL_SRC)config.sh
+ $(NOOP)
$(PERL_ARCHLIB)Config.pm : $(PERL_SRC)config.sh
$(NOECHO) Write Sys$Error "$(PERL_ARCHLIB)Config.pm may be out of date with config.h or genconfig.pl"
diff --git a/contrib/perl5/lib/ExtUtils/MM_Win32.pm b/contrib/perl5/lib/ExtUtils/MM_Win32.pm
index e08c679..5361ece 100644
--- a/contrib/perl5/lib/ExtUtils/MM_Win32.pm
+++ b/contrib/perl5/lib/ExtUtils/MM_Win32.pm
@@ -596,7 +596,7 @@ pm_to_blib: $(TO_INST_PM)
($NMAKE ? 'qw[ <<pmfiles.dat ],'
: $DMAKE ? 'qw[ $(mktmp,pmfiles.dat $(PM_TO_BLIB:s,\\,\\\\,)\n) ],'
: '{ qw[$(PM_TO_BLIB)] },'
- ).q{'}.$autodir.q{')"
+ ).q{'}.$autodir.q{','$(PM_FILTER)')"
}. ($NMAKE ? q{
$(PM_TO_BLIB)
<<
@@ -684,7 +684,7 @@ MOD_INSTALL = $(PERL) -I$(INST_LIB) -I$(PERL_LIB) -MExtUtils::Install \
-e "install({ @ARGV },'$(VERBINST)',0,'$(UNINST)');"
DOC_INSTALL = $(PERL) -e "$$\=\"\n\n\";" \
--e "print '=head2 ', scalar(localtime), ': C<', shift, '>', ' L<', shift, '>';" \
+-e "print '=head2 ', scalar(localtime), ': C<', shift, '>', ' L<', $$arg=shift, '|', $$arg, '>';" \
-e "print '=over 4';" \
-e "while (defined($$key = shift) and defined($$val = shift)) { print '=item *';print 'C<', \"$$key: $$val\", '>'; }" \
-e "print '=back';"
diff --git a/contrib/perl5/lib/ExtUtils/Manifest.pm b/contrib/perl5/lib/ExtUtils/Manifest.pm
index 8bb3fc8..50a4263 100644
--- a/contrib/perl5/lib/ExtUtils/Manifest.pm
+++ b/contrib/perl5/lib/ExtUtils/Manifest.pm
@@ -8,13 +8,14 @@ use Carp;
use strict;
use vars qw($VERSION @ISA @EXPORT_OK
- $Is_VMS $Debug $Verbose $Quiet $MANIFEST $found);
+ $Is_MacOS $Is_VMS $Debug $Verbose $Quiet $MANIFEST $found);
$VERSION = substr(q$Revision: 1.33 $, 10);
@ISA=('Exporter');
@EXPORT_OK = ('mkmanifest', 'manicheck', 'fullcheck', 'filecheck',
'skipcheck', 'maniread', 'manicopy');
+$Is_MacOS = $^O eq 'MacOS';
$Is_VMS = $^O eq 'VMS';
if ($Is_VMS) { require File::Basename }
@@ -49,6 +50,7 @@ sub mkmanifest {
}
my $text = $all{$file};
($file,$text) = split(/\s+/,$text,2) if $Is_VMS && $text;
+ $file = _unmacify($file);
my $tabs = (5 - (length($file)+1)/8);
$tabs = 1 if $tabs < 1;
$tabs = 0 unless $text;
@@ -60,10 +62,11 @@ sub mkmanifest {
sub manifind {
local $found = {};
find(sub {return if -d $_;
- (my $name = $File::Find::name) =~ s|./||;
+ (my $name = $File::Find::name) =~ s|^\./||;
+ $name =~ s/^:([^:]+)$/$1/ if $Is_MacOS;
warn "Debug: diskfile $name\n" if $Debug;
- $name =~ s#(.*)\.$#\L$1# if $Is_VMS;
- $found->{$name} = "";}, ".");
+ $name =~ s#(.*)\.$#\L$1# if $Is_VMS;
+ $found->{$name} = "";}, $Is_MacOS ? ":" : ".");
$found;
}
@@ -115,7 +118,8 @@ sub _manicheck {
}
warn "Debug: manicheck checking from disk $file\n" if $Debug;
unless ( exists $read->{$file} ) {
- warn "Not in $MANIFEST: $file\n" unless $Quiet;
+ my $canon = "\t" . _unmacify($file) if $Is_MacOS;
+ warn "Not in $MANIFEST: $file$canon\n" unless $Quiet;
push @missentry, $file;
}
}
@@ -135,7 +139,13 @@ sub maniread {
while (<M>){
chomp;
next if /^#/;
- if ($Is_VMS) {
+ if ($Is_MacOS) {
+ my($item,$text) = /^(\S+)\s*(.*)/;
+ $item = _macify($item);
+ $item =~ s/\\([0-3][0-7][0-7])/sprintf("%c", oct($1))/ge;
+ $read->{$item}=$text;
+ }
+ elsif ($Is_VMS) {
my($file)= /^(\S+)/;
next unless $file;
my($base,$dir) = File::Basename::fileparse($file);
@@ -166,7 +176,7 @@ sub _maniskip {
chomp;
next if /^#/;
next if /^\s*$/;
- push @skip, $_;
+ push @skip, _macify($_);
}
close M;
my $opts = $Is_VMS ? 'oi ' : 'o ';
@@ -187,15 +197,24 @@ sub manicopy {
require File::Basename;
my(%dirs,$file);
$target = VMS::Filespec::unixify($target) if $Is_VMS;
- File::Path::mkpath([ $target ],1,$Is_VMS ? undef : 0755);
+ File::Path::mkpath([ $target ],! $Quiet,$Is_VMS ? undef : 0755);
foreach $file (keys %$read){
- $file = VMS::Filespec::unixify($file) if $Is_VMS;
- if ($file =~ m!/!) { # Ilya, that hurts, I fear, or maybe not?
- my $dir = File::Basename::dirname($file);
- $dir = VMS::Filespec::unixify($dir) if $Is_VMS;
- File::Path::mkpath(["$target/$dir"],1,$Is_VMS ? undef : 0755);
+ if ($Is_MacOS) {
+ if ($file =~ m!:!) {
+ my $dir = _maccat($target, $file);
+ $dir =~ s/[^:]+$//;
+ File::Path::mkpath($dir,1,0755);
+ }
+ cp_if_diff($file, _maccat($target, $file), $how);
+ } else {
+ $file = VMS::Filespec::unixify($file) if $Is_VMS;
+ if ($file =~ m!/!) { # Ilya, that hurts, I fear, or maybe not?
+ my $dir = File::Basename::dirname($file);
+ $dir = VMS::Filespec::unixify($dir) if $Is_VMS;
+ File::Path::mkpath(["$target/$dir"],! $Quiet,$Is_VMS ? undef : 0755);
+ }
+ cp_if_diff($file, "$target/$file", $how);
}
- cp_if_diff($file, "$target/$file", $how);
}
}
@@ -204,8 +223,8 @@ sub cp_if_diff {
-f $from or carp "$0: $from not found";
my($diff) = 0;
local(*F,*T);
- open(F,$from) or croak "Can't read $from: $!\n";
- if (open(T,$to)) {
+ open(F,"< $from\0") or croak "Can't read $from: $!\n";
+ if (open(T,"< $to\0")) {
while (<F>) { $diff++,last if $_ ne <T>; }
$diff++ unless eof(T);
close T;
@@ -233,12 +252,12 @@ sub cp {
copy($srcFile,$dstFile);
utime $access, $mod + ($Is_VMS ? 1 : 0), $dstFile;
# chmod a+rX-w,go-w
- chmod( 0444 | ( $perm & 0111 ? 0111 : 0 ), $dstFile );
+ chmod( 0444 | ( $perm & 0111 ? 0111 : 0 ), $dstFile ) unless ($^O eq 'MacOS');
}
sub ln {
my ($srcFile, $dstFile) = @_;
- return &cp if $Is_VMS;
+ return &cp if $Is_VMS or ($^O eq 'MSWin32' and Win32::IsWin95());
link($srcFile, $dstFile);
local($_) = $dstFile; # chmod a+r,go-w+X (except "X" only applies to u=x)
my $mode= 0444 | (stat)[2] & 0700;
@@ -258,6 +277,42 @@ sub best {
}
}
+sub _macify {
+ my($file) = @_;
+
+ return $file unless $Is_MacOS;
+
+ $file =~ s|^\./||;
+ if ($file =~ m|/|) {
+ $file =~ s|/+|:|g;
+ $file = ":$file";
+ }
+
+ $file;
+}
+
+sub _maccat {
+ my($f1, $f2) = @_;
+
+ return "$f1/$f2" unless $Is_MacOS;
+
+ $f1 .= ":$f2";
+ $f1 =~ s/([^:]:):/$1/g;
+ return $f1;
+}
+
+sub _unmacify {
+ my($file) = @_;
+
+ return $file unless $Is_MacOS;
+
+ $file =~ s|^:||;
+ $file =~ s|([/ \n])|sprintf("\\%03o", unpack("c", $1))|ge;
+ $file =~ y|:|/|;
+
+ $file;
+}
+
1;
__END__
diff --git a/contrib/perl5/lib/ExtUtils/Mksymlists.pm b/contrib/perl5/lib/ExtUtils/Mksymlists.pm
index c8f41c7..c06b393 100644
--- a/contrib/perl5/lib/ExtUtils/Mksymlists.pm
+++ b/contrib/perl5/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/contrib/perl5/lib/ExtUtils/typemap b/contrib/perl5/lib/ExtUtils/typemap
index a34cd4f..c309128 100644
--- a/contrib/perl5/lib/ExtUtils/typemap
+++ b/contrib/perl5/lib/ExtUtils/typemap
@@ -1,4 +1,3 @@
-# $Header: /home/rmb1/misc/CVS/perl5.005_61/lib/ExtUtils/typemap,v 1.3 1999/09/13 09:46:43 rmb1 Exp $
# basic C types
int T_IV
unsigned T_UV
@@ -30,6 +29,7 @@ CV * T_CVREF
IV T_IV
UV T_UV
+NV T_NV
I32 T_IV
I16 T_IV
I8 T_IV
@@ -226,13 +226,13 @@ T_U_CHAR
T_FLOAT
sv_setnv($arg, (double)$var);
T_NV
- sv_setnv($arg, (double)$var);
+ sv_setnv($arg, (NV)$var);
T_DOUBLE
sv_setnv($arg, (double)$var);
T_PV
sv_setpv((SV*)$arg, $var);
T_PTR
- sv_setiv($arg, (IV)$var);
+ sv_setiv($arg, PTR2IV($var));
T_PTRREF
sv_setref_pv($arg, Nullch, (void*)$var);
T_REF_IV_REF
diff --git a/contrib/perl5/lib/ExtUtils/xsubpp b/contrib/perl5/lib/ExtUtils/xsubpp
index 5a71e89..bb8f3aa 100755
--- a/contrib/perl5/lib/ExtUtils/xsubpp
+++ b/contrib/perl5/lib/ExtUtils/xsubpp
@@ -109,7 +109,7 @@ sub Q ;
# Global Constants
-$XSUBPP_version = "1.9507";
+$XSUBPP_version = "1.9508";
my ($Is_VMS, $SymSet);
if ($^O eq 'VMS') {
@@ -288,7 +288,7 @@ $END = "!End!\n\n"; # "impossible" keyword (multiple newline)
# Match an XS keyword
$BLOCK_re= '\s*(' . join('|', qw(
REQUIRE BOOT CASE PREINIT INPUT INIT CODE PPCODE OUTPUT
- CLEANUP ALIAS PROTOTYPES PROTOTYPE VERSIONCHECK INCLUDE
+ CLEANUP ALIAS ATTRS PROTOTYPES PROTOTYPE VERSIONCHECK INCLUDE
SCOPE INTERFACE INTERFACE_MACRO C_ARGS POSTCALL
)) . "|$END)\\s*:";
@@ -418,7 +418,7 @@ sub INPUT_handler {
$var_init =~ s/"/\\"/g;
s/\s+/ /g;
- my ($var_type, $var_addr, $var_name) = /^(.*?[^& ]) *(\&?) *\b(\w+)$/s
+ my ($var_type, $var_addr, $var_name) = /^(.*?[^&\s])\s*(\&?)\s*\b(\w+)$/s
or blurt("Error: invalid argument declaration '$line'"), next;
# Check for duplicate definitions
@@ -444,12 +444,9 @@ sub INPUT_handler {
$proto_arg[$var_num] = ProtoString($var_type)
if $var_num ;
- if ($var_addr) {
- $var_addr{$var_name} = 1;
- $func_args =~ s/\b($var_name)\b/&$1/;
- }
+ $func_args =~ s/\b($var_name)\b/&$1/ if $var_addr;
if ($var_init =~ /^[=;]\s*NO_INIT\s*;?\s*$/
- or $in_out{$var_name} and $in_out{$var_name} eq 'OUTLIST'
+ or $in_out{$var_name} and $in_out{$var_name} =~ /^OUT/
and $var_init !~ /\S/) {
if ($name_printed) {
print ";\n";
@@ -494,6 +491,8 @@ sub OUTPUT_handler {
} else {
&generate_output($var_types{$outarg}, $var_num, $outarg, $DoSetMagic);
}
+ delete $in_out{$outarg} # No need to auto-OUTPUT
+ if exists $in_out{$outarg} and $in_out{$outarg} =~ /OUT$/;
}
}
@@ -573,6 +572,15 @@ sub GetAliases
if $line ;
}
+sub ATTRS_handler ()
+{
+ for (; !/^$BLOCK_re/o; $_ = shift(@line)) {
+ next unless /\S/;
+ TrimWhitespace($_) ;
+ push @Attributes, $_;
+ }
+}
+
sub ALIAS_handler ()
{
for (; !/^$BLOCK_re/o; $_ = shift(@line)) {
@@ -847,7 +855,25 @@ EOM
print("#line 1 \"$filename\"\n")
if $WantLineNumbers;
+firstmodule:
while (<$FH>) {
+ if (/^=/) {
+ my $podstartline = $.;
+ do {
+ if (/^=cut\s*$/) {
+ print("/* Skipped embedded POD. */\n");
+ printf("#line %d \"$filename\"\n", $. + 1)
+ if $WantLineNumbers;
+ next firstmodule
+ }
+
+ } while (<$FH>);
+ # At this point $. is at end of file so die won't state the start
+ # of the problem, and as we haven't yet read any lines &death won't
+ # show the correct line in the message either.
+ die ("Error: Unterminated pod in $filename, line $podstartline\n")
+ unless $lastline;
+ }
last if ($Module, $Package, $Prefix) =
/^MODULE\s*=\s*([\w:]+)(?:\s+PACKAGE\s*=\s*([\w:]+))?(?:\s+PREFIX\s*=\s*(\S+))?\s*$/;
@@ -886,6 +912,16 @@ sub fetch_para {
}
for(;;) {
+ # Skip embedded PODs
+ while ($lastline =~ /^=/) {
+ while ($lastline = <$FH>) {
+ last if ($lastline =~ /^=cut\s*$/);
+ }
+ death ("Error: Unterminated pod") unless $lastline;
+ $lastline = <$FH>;
+ chomp $lastline;
+ $lastline =~ s/^\s+$//;
+ }
if ($lastline !~ /^\s*#/ ||
# CPP directives:
# ANSI: if ifdef ifndef elif else endif define undef
@@ -966,7 +1002,6 @@ while (fetch_para()) {
# initialize info arrays
undef(%args_match);
undef(%var_types);
- undef(%var_addr);
undef(%defaults);
undef($class);
undef($static);
@@ -978,7 +1013,7 @@ while (fetch_para()) {
undef(@arg_with_types) ;
undef($processing_arg_with_types) ;
undef(%arg_types) ;
- undef(@in_out) ;
+ undef(@outlist) ;
undef(%in_out) ;
undef($proto_in_this_xsub) ;
undef($scope_in_this_xsub) ;
@@ -1039,12 +1074,12 @@ while (fetch_para()) {
last;
}
$XSStack[$XSS_work_idx]{functions}{$Full_func_name} ++ ;
- %XsubAliases = %XsubAliasValues = %Interfaces = ();
+ %XsubAliases = %XsubAliasValues = %Interfaces = @Attributes = ();
$DoSetMagic = 1;
$orig_args =~ s/\\\s*/ /g; # process line continuations
- my %out_vars;
+ my %only_outlist;
if ($process_argtypes and $orig_args =~ /\S/) {
my $args = "$orig_args ,";
if ($args =~ /^( (??{ $C_arg }) , )* $ /x) {
@@ -1059,10 +1094,10 @@ while (fetch_para()) {
next unless length $pre;
my $out_type;
my $inout_var;
- if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST)\s+//) {
+ if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\s+//) {
my $type = $1;
$out_type = $type if $type ne 'IN';
- $arg =~ s/^(IN|IN_OUTLIST|OUTLIST)\s+//;
+ $arg =~ s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\s+//;
}
if (/\W/) { # Has a type
push @arg_with_types, $arg;
@@ -1070,8 +1105,8 @@ while (fetch_para()) {
$arg_types{$name} = $arg;
$_ = "$name$default";
}
- $out_vars{$_} = 1 if $out_type eq 'OUTLIST';
- push @in_out, $name if $out_type;
+ $only_outlist{$_} = 1 if $out_type eq "OUTLIST";
+ push @outlist, $name if $out_type =~ /OUTLIST$/;
$in_out{$name} = $out_type if $out_type;
}
} else {
@@ -1081,11 +1116,11 @@ while (fetch_para()) {
} else {
@args = split(/\s*,\s*/, $orig_args);
for (@args) {
- if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST)\s+//) {
+ if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST|IN_OUT|OUT)\s+//) {
my $out_type = $1;
next if $out_type eq 'IN';
- $out_vars{$_} = 1 if $out_type eq 'OUTLIST';
- push @in_out, $name;
+ $only_outlist{$_} = 1 if $out_type eq "OUTLIST";
+ push @outlist, $name if $out_type =~ /OUTLIST$/;
$in_out{$_} = $out_type;
}
}
@@ -1109,7 +1144,7 @@ while (fetch_para()) {
last;
}
}
- if ($out_vars{$args[$i]}) {
+ if ($only_outlist{$args[$i]}) {
push @args_num, undef;
} else {
push @args_num, ++$num_args;
@@ -1210,7 +1245,7 @@ EOF
$gotRETVAL = 0;
INPUT_handler() ;
- process_keyword("INPUT|PREINIT|INTERFACE_MACRO|C_ARGS|ALIAS|PROTOTYPE|SCOPE") ;
+ process_keyword("INPUT|PREINIT|INTERFACE_MACRO|C_ARGS|ALIAS|ATTRS|PROTOTYPE|SCOPE") ;
print Q<<"EOF" if $ScopeThisXSUB;
# ENTER;
@@ -1252,7 +1287,7 @@ EOF
}
print $deferred;
- process_keyword("INIT|ALIAS|PROTOTYPE|INTERFACE_MACRO|INTERFACE|C_ARGS") ;
+ process_keyword("INIT|ALIAS|ATTRS|PROTOTYPE|INTERFACE_MACRO|INTERFACE|C_ARGS") ;
if (check_keyword("PPCODE")) {
print_section();
@@ -1296,7 +1331,10 @@ EOF
# $wantRETVAL set if 'RETVAL =' autogenerated
($wantRETVAL, $ret_type) = (0, 'void') if $RETVAL_no_return;
undef %outargs ;
- process_keyword("POSTCALL|OUTPUT|ALIAS|PROTOTYPE");
+ process_keyword("POSTCALL|OUTPUT|ALIAS|ATTRS|PROTOTYPE");
+
+ &generate_output($var_types{$_}, $args_match{$_}, $_, $DoSetMagic)
+ for grep $in_out{$_} =~ /OUT$/, keys %in_out;
# all OUTPUT done, so now push the return value on the stack
if ($gotRETVAL && $RETVAL_code) {
@@ -1334,14 +1372,14 @@ EOF
$xsreturn = 1 if $ret_type ne "void";
my $num = $xsreturn;
- my $c = @in_out;
+ my $c = @outlist;
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;
+ generate_output($var_types{$_}, $num++, $_, 0, 1) for @outlist;
# do cleanup
- process_keyword("CLEANUP|ALIAS|PROTOTYPE") ;
+ process_keyword("CLEANUP|ALIAS|ATTRS|PROTOTYPE") ;
print Q<<"EOF" if $ScopeThisXSUB;
# ]]
@@ -1431,6 +1469,12 @@ EOF
EOF
}
}
+ elsif (@Attributes) {
+ push(@InitFileCode, Q<<"EOF");
+# cv = newXS(\"$pname\", XS_$Full_func_name, file);
+# apply_attrs_string("$Package", cv, "@Attributes", 0);
+EOF
+ }
elsif ($interface) {
while ( ($name, $value) = each %Interfaces) {
$name = "$Package\::$name" unless $name =~ /::/;
diff --git a/contrib/perl5/lib/File/Basename.pm b/contrib/perl5/lib/File/Basename.pm
index 4581e7e..94aac2d 100644
--- a/contrib/perl5/lib/File/Basename.pm
+++ b/contrib/perl5/lib/File/Basename.pm
@@ -176,7 +176,7 @@ sub fileparse {
$dirpath ||= ''; # should always be defined
}
}
- if ($fstype =~ /^MS(DOS|Win32)/i) {
+ if ($fstype =~ /^MS(DOS|Win32)|epoc/i) {
($dirpath,$basename) = ($fullname =~ /^((?:.*[:\\\/])?)(.*)/s);
$dirpath .= '.\\' unless $dirpath =~ /[\\\/]\z/;
}
@@ -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;
}
@@ -236,7 +240,13 @@ sub dirname {
if ($_[0] =~ m#/#) { $fstype = '' }
else { return $dirname || $ENV{DEFAULT} }
}
- if ($fstype =~ /MacOS/i) { return $dirname }
+ if ($fstype =~ /MacOS/i) {
+ if( !length($basename) && $dirname !~ /^[^:]+:\z/) {
+ $dirname =~ s/([^:]):\z/$1/s;
+ ($basename,$dirname) = fileparse $dirname;
+ }
+ $dirname .= ":" unless $dirname =~ /:\z/;
+ }
elsif ($fstype =~ /MSDOS/i) {
$dirname =~ s/([^:])[\\\/]*\z/$1/;
unless( length($basename) ) {
@@ -256,7 +266,7 @@ sub dirname {
chop $dirname;
$dirname =~ s#[^:/]+\z## unless length($basename);
}
- else {
+ else {
$dirname =~ s:(.)/*\z:$1:s;
unless( length($basename) ) {
local($File::Basename::Fileparse_fstype) = $fstype;
diff --git a/contrib/perl5/lib/File/Copy.pm b/contrib/perl5/lib/File/Copy.pm
index e6cf786..24d1ffd 100644
--- a/contrib/perl5/lib/File/Copy.pm
+++ b/contrib/perl5/lib/File/Copy.pm
@@ -37,7 +37,7 @@ sub _catname { # Will be replaced by File::Spec when it arrives
import File::Basename 'basename';
}
if ($^O eq 'VMS') { $to = VMS::Filespec::vmspath($to) . basename($from); }
- elsif ($^O eq 'MacOS') { $to .= ':' . basename($from); }
+ elsif ($^O eq 'MacOS') { $to =~ s/^([^:]+)$/:$1/; $to .= ':' . basename($from); }
elsif ($to =~ m|\\|) { $to .= '\\' . basename($from); }
else { $to .= '/' . basename($from); }
}
@@ -69,6 +69,7 @@ sub copy {
&& !($from_a_handle && $^O eq 'os2' ) # OS/2 cannot handle handles
&& !($from_a_handle && $^O eq 'mpeix') # and neither can MPE/iX.
&& !($from_a_handle && $^O eq 'MSWin32')
+ && !($from_a_handle && $^O eq 'MacOS')
)
{
return syscopy($from, $to);
@@ -83,7 +84,7 @@ sub copy {
if ($from_a_handle) {
*FROM = *$from{FILEHANDLE};
} else {
- $from = "./$from" if $from =~ /^\s/s;
+ $from = _protect($from) if $from =~ /^\s/s;
open(FROM, "< $from\0") or goto fail_open1;
binmode FROM or die "($!,$^E)";
$closefrom = 1;
@@ -92,7 +93,7 @@ sub copy {
if ($to_a_handle) {
*TO = *$to{FILEHANDLE};
} else {
- $to = "./$to" if $to =~ /^\s/s;
+ $to = _protect($to) if $to =~ /^\s/s;
open(TO,"> $to\0") or goto fail_open2;
binmode TO or die "($!,$^E)";
$closeto = 1;
@@ -180,6 +181,13 @@ sub move {
*cp = \&copy;
*mv = \&move;
+
+if ($^O eq 'MacOS') {
+ *_protect = sub { MacPerl::MakeFSSpec($_[0]) };
+} else {
+ *_protect = sub { "./$_[0]" };
+}
+
# &syscopy is an XSUB under OS/2
unless (defined &syscopy) {
if ($^O eq 'VMS') {
@@ -196,6 +204,23 @@ unless (defined &syscopy) {
return 0 unless @_ == 2;
return Win32::CopyFile(@_, 1);
};
+ } elsif ($^O eq 'MacOS') {
+ require Mac::MoreFiles;
+ *syscopy = sub {
+ my($from, $to) = @_;
+ my($dir, $toname);
+
+ return 0 unless -e $from;
+
+ if ($to =~ /(.*:)([^:]+):?$/) {
+ ($dir, $toname) = ($1, $2);
+ } else {
+ ($dir, $toname) = (":", $to);
+ }
+
+ unlink($to);
+ Mac::MoreFiles::FSpFileCopy($from, $dir, $toname, 1);
+ };
} else {
$Syscopy_is_copy = 1;
*syscopy = \&copy;
@@ -221,7 +246,7 @@ File::Copy - Copy files or filehandles
use POSIX;
use File::Copy cp;
- $n=FileHandle->new("/dev/null","r");
+ $n = FileHandle->new("/a/file","r");
cp($n,"x");'
=head1 DESCRIPTION
diff --git a/contrib/perl5/lib/File/Find.pm b/contrib/perl5/lib/File/Find.pm
index ac73f1b..3a621c0 100644
--- a/contrib/perl5/lib/File/Find.pm
+++ b/contrib/perl5/lib/File/Find.pm
@@ -42,6 +42,22 @@ Reports the name of a directory only AFTER all its entries
have been reported. Entry point finddepth() is a shortcut for
specifying C<{ bydepth => 1 }> in the first argument of find().
+=item C<preprocess>
+
+The value should be a code reference. This code reference is used to
+preprocess a directory; it is called after readdir() but before the loop that
+calls the wanted() function. It is called with a list of strings and is
+expected to return a list of strings. The code can be used to sort the
+strings alphabetically, numerically, or to filter out directory entries based
+on their name alone.
+
+=item C<postprocess>
+
+The value should be a code reference. It is invoked just before leaving the
+current directory. It is called in void context with no arguments. The name
+of the current directory is in $File::Find::dir. This hook is handy for
+summarizing a directory, such as calculating its disk usage.
+
=item C<follow>
Causes symbolic links to be followed. Since directory trees with symbolic
@@ -55,7 +71,7 @@ If either I<follow> or I<follow_fast> is in effect:
=item *
-It is guarantueed that an I<lstat> has been called before the user's
+It is guaranteed that an I<lstat> has been called before the user's
I<wanted()> function is called. This enables fast file checks involving S< _>.
=item *
@@ -67,11 +83,10 @@ pathname of the file with all symbolic links resolved
=item C<follow_fast>
-This is similar to I<follow> except that it may report some files
-more than once. It does detect cycles however.
-Since only symbolic links have to be hashed, this is
-much cheaper both in space and time.
-If processing a file more than once (by the user's I<wanted()> function)
+This is similar to I<follow> except that it may report some files more
+than once. It does detect cycles, however. Since only symbolic links
+have to be hashed, this is much cheaper both in space and time. If
+processing a file more than once (by the user's I<wanted()> function)
is worse than just taking time, the option I<follow> should be used.
=item C<follow_skip>
@@ -97,14 +112,14 @@ C<$_> will be the same as C<$File::Find::name>.
If find is used in taint-mode (-T command line switch or if EUID != UID
or if EGID != GID) then internally directory names have to be untainted
before they can be cd'ed to. Therefore they are checked against a regular
-expression I<untaint_pattern>. Note, that all names passed to the
+expression I<untaint_pattern>. Note that all names passed to the
user's I<wanted()> function are still tainted.
=item C<untaint_pattern>
See above. This should be set using the C<qr> quoting operator.
The default is set to C<qr|^([-+@\w./]+)$|>.
-Note that the paranthesis which are vital.
+Note that the parantheses are vital.
=item C<untaint_skip>
@@ -116,15 +131,15 @@ are skipped. The default is to 'die' in such a case.
The wanted() function does whatever verifications you want.
C<$File::Find::dir> contains the current directory name, and C<$_> the
current filename within that directory. C<$File::Find::name> contains
-the complete pathname to the file. You are chdir()'d to C<$File::Find::dir> when
-the function is called, unless C<no_chdir> was specified.
-When <follow> or <follow_fast> are in effect there is also a
-C<$File::Find::fullname>.
-The function may set C<$File::Find::prune> to prune the tree
-unless C<bydepth> was specified.
-Unless C<follow> or C<follow_fast> is specified, for compatibility
-reasons (find.pl, find2perl) there are in addition the following globals
-available: C<$File::Find::topdir>, C<$File::Find::topdev>, C<$File::Find::topino>,
+the complete pathname to the file. You are chdir()'d to
+C<$File::Find::dir> when the function is called, unless C<no_chdir>
+was specified. When <follow> or <follow_fast> are in effect, there is
+also a C<$File::Find::fullname>. The function may set
+C<$File::Find::prune> to prune the tree unless C<bydepth> was
+specified. Unless C<follow> or C<follow_fast> is specified, for
+compatibility reasons (find.pl, find2perl) there are in addition the
+following globals available: C<$File::Find::topdir>,
+C<$File::Find::topdev>, C<$File::Find::topino>,
C<$File::Find::topmode> and C<$File::Find::topnlink>.
This library is useful for the C<find2perl> tool, which when fed,
@@ -161,7 +176,7 @@ module.
=head1 CAVEAT
-Be aware that the option to follow symblic links can be dangerous.
+Be aware that the option to follow symbolic links can be dangerous.
Depending on the structure of the directory tree (including symbolic
links to directories) you might traverse a given (physical) directory
more than once (only if C<follow_fast> is in effect).
@@ -183,7 +198,8 @@ require File::Basename;
my %SLnkSeen;
my ($wanted_callback, $avoid_nlink, $bydepth, $no_chdir, $follow,
- $follow_skip, $full_check, $untaint, $untaint_skip, $untaint_pat);
+ $follow_skip, $full_check, $untaint, $untaint_skip, $untaint_pat,
+ $pre_process, $post_process);
sub contract_name {
my ($cdir,$fn) = @_;
@@ -282,6 +298,8 @@ sub _find_opt {
my $cwd_untainted = $cwd;
$wanted_callback = $wanted->{wanted};
$bydepth = $wanted->{bydepth};
+ $pre_process = $wanted->{preprocess};
+ $post_process = $wanted->{postprocess};
$no_chdir = $wanted->{no_chdir};
$full_check = $wanted->{follow};
$follow = $full_check || $wanted->{follow_fast};
@@ -373,7 +391,7 @@ sub _find_opt {
$name = $abs_dir . $_;
- &$wanted_callback;
+ { &$wanted_callback }; # protect against wild "next"
}
@@ -429,7 +447,7 @@ sub _find_dir($$$) {
$_= ($no_chdir ? $dir_name : $dir_rel );
# prune may happen here
$prune= 0;
- &$wanted_callback;
+ { &$wanted_callback }; # protect against wild "next"
next if $prune;
}
@@ -464,6 +482,8 @@ sub _find_dir($$$) {
}
@filenames = readdir DIR;
closedir(DIR);
+ @filenames = &$pre_process(@filenames) if $pre_process;
+ push @Stack,[$CdLvl,$dir_name,"",-2] if $post_process;
if ($nlink == 2 && !$avoid_nlink) {
# This dir has no subdirectories.
@@ -472,7 +492,7 @@ sub _find_dir($$$) {
$name = $dir_pref . $FN;
$_ = ($no_chdir ? $name : $FN);
- &$wanted_callback;
+ { &$wanted_callback }; # protect against wild "next"
}
}
@@ -496,13 +516,13 @@ sub _find_dir($$$) {
else {
$name = $dir_pref . $FN;
$_= ($no_chdir ? $name : $FN);
- &$wanted_callback;
+ { &$wanted_callback }; # protect against wild "next"
}
}
else {
$name = $dir_pref . $FN;
$_= ($no_chdir ? $name : $FN);
- &$wanted_callback;
+ { &$wanted_callback }; # protect against wild "next"
}
}
}
@@ -518,7 +538,11 @@ sub _find_dir($$$) {
}
$dir_name = ($p_dir eq '/' ? "/$dir_rel" : "$p_dir/$dir_rel");
$dir_pref = "$dir_name/";
- if ( $nlink < 0 ) { # must be finddepth, report dirname now
+ if ( $nlink == -2 ) {
+ $name = $dir = $p_dir;
+ $_ = ".";
+ &$post_process; # End-of-directory processing
+ } elsif ( $nlink < 0 ) { # must be finddepth, report dirname now
$name = $dir_name;
if ( substr($name,-2) eq '/.' ) {
$name =~ s|/\.$||;
@@ -528,7 +552,7 @@ sub _find_dir($$$) {
if ( substr($_,-2) eq '/.' ) {
s|/\.$||;
}
- &$wanted_callback;
+ { &$wanted_callback }; # protect against wild "next"
} else {
push @Stack,[$CdLvl,$p_dir,$dir_rel,-1] if $bydepth;
last;
@@ -584,13 +608,25 @@ sub _find_dir_symlnk($$$) {
while (defined $SE) {
unless ($bydepth) {
+ # change to parent directory
+ unless ($no_chdir) {
+ my $udir = $pdir_loc;
+ if ($untaint) {
+ $udir = $1 if $pdir_loc =~ m|$untaint_pat|;
+ }
+ unless (chdir $udir) {
+ warn "Can't cd to $udir: $!\n";
+ next;
+ }
+ }
$dir= $p_dir;
$name= $dir_name;
$_= ($no_chdir ? $dir_name : $dir_rel );
$fullname= $dir_loc;
# prune may happen here
$prune= 0;
- &$wanted_callback;
+ lstat($_); # make sure file tests with '_' work
+ { &$wanted_callback }; # protect against wild "next"
next if $prune;
}
@@ -640,7 +676,7 @@ sub _find_dir_symlnk($$$) {
$fullname = $new_loc;
$name = $dir_pref . $FN;
$_ = ($no_chdir ? $name : $FN);
- &$wanted_callback;
+ { &$wanted_callback }; # protect against wild "next"
}
}
@@ -673,7 +709,8 @@ sub _find_dir_symlnk($$$) {
s|/\.$||;
}
- &$wanted_callback;
+ lstat($_); # make sure file tests with '_' work
+ { &$wanted_callback }; # protect against wild "next"
} else {
push @Stack,[$dir_loc, $pdir_loc, $p_dir, $dir_rel,-1] if $bydepth;
last;
@@ -721,7 +758,8 @@ if ($^O eq 'VMS') {
}
$File::Find::dont_use_nlink = 1
- if $^O eq 'os2' || $^O eq 'dos' || $^O eq 'amigaos' || $^O eq 'MSWin32';
+ if $^O eq 'os2' || $^O eq 'dos' || $^O eq 'amigaos' || $^O eq 'MSWin32' ||
+ $^O eq 'cygwin' || $^O eq 'epoc';
# Set dont_use_nlink in your hint file if your system's stat doesn't
# report the number of links in a directory as an indication
diff --git a/contrib/perl5/lib/File/Path.pm b/contrib/perl5/lib/File/Path.pm
index 46f360a..0eb6128 100644
--- a/contrib/perl5/lib/File/Path.pm
+++ b/contrib/perl5/lib/File/Path.pm
@@ -97,38 +97,42 @@ use File::Basename ();
use Exporter ();
use strict;
-our $VERSION = "1.0403";
+our $VERSION = "1.0404";
our @ISA = qw( Exporter );
our @EXPORT = qw( mkpath rmtree );
my $Is_VMS = $^O eq 'VMS';
+my $Is_MacOS = $^O eq 'MacOS';
# 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' || $^O eq 'epoc');
sub mkpath {
my($paths, $verbose, $mode) = @_;
# $paths -- either a path string or ref to list of paths
# $verbose -- optional print "mkdir $path" for each directory created
# $mode -- optional permissions, defaults to 0777
- local($")="/";
+ local($")=$Is_MacOS ? ":" : "/";
$mode = 0777 unless defined($mode);
$paths = [$paths] unless ref $paths;
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 = $!;
@@ -157,7 +161,12 @@ sub rmtree {
my($root);
foreach $root (@{$roots}) {
- $root =~ s#/\z##;
+ if ($Is_MacOS) {
+ $root = ":$root" if $root !~ /:/;
+ $root =~ s#([^:])\z#$1:#;
+ } else {
+ $root =~ s#/\z##;
+ }
(undef, undef, my $rp) = lstat $root or next;
$rp &= 07777; # don't forget setuid, setgid, sticky bits
if ( -d _ ) {
@@ -182,7 +191,11 @@ sub rmtree {
# is faster if done in reverse ASCIIbetical order
@files = reverse @files if $Is_VMS;
($root = VMS::Filespec::unixify($root)) =~ s#\.dir\z## if $Is_VMS;
- @files = map("$root/$_", grep $_!~/^\.{1,2}\z/s,@files);
+ if ($Is_MacOS) {
+ @files = map("$root$_", @files);
+ } else {
+ @files = map("$root/$_", grep $_!~/^\.{1,2}\z/s,@files);
+ }
$count += rmtree(\@files,$verbose,$safe);
if ($safe &&
($Is_VMS ? !&VMS::Filespec::candelete($root) : !-w $root)) {
diff --git a/contrib/perl5/lib/File/Spec.pm b/contrib/perl5/lib/File/Spec.pm
index 40f5345..3f79d74 100644
--- a/contrib/perl5/lib/File/Spec.pm
+++ b/contrib/perl5/lib/File/Spec.pm
@@ -3,12 +3,13 @@ package File::Spec;
use strict;
use vars qw(@ISA $VERSION);
-$VERSION = '0.8';
+$VERSION = 0.82 ;
my %module = (MacOS => 'Mac',
MSWin32 => 'Win32',
os2 => 'OS2',
- VMS => 'VMS');
+ VMS => 'VMS',
+ epoc => 'Epoc');
my $module = $module{$^O} || 'Unix';
require "File/Spec/$module.pm";
diff --git a/contrib/perl5/lib/File/Spec/Functions.pm b/contrib/perl5/lib/File/Spec/Functions.pm
index 140738f..0036ac1 100644
--- a/contrib/perl5/lib/File/Spec/Functions.pm
+++ b/contrib/perl5/lib/File/Spec/Functions.pm
@@ -3,7 +3,9 @@ package File::Spec::Functions;
use File::Spec;
use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
+
+$VERSION = '1.1';
require Exporter;
diff --git a/contrib/perl5/lib/File/Spec/Mac.pm b/contrib/perl5/lib/File/Spec/Mac.pm
index 959e33d..9ef55ec 100644
--- a/contrib/perl5/lib/File/Spec/Mac.pm
+++ b/contrib/perl5/lib/File/Spec/Mac.pm
@@ -1,8 +1,11 @@
package File::Spec::Mac;
use strict;
-use vars qw(@ISA);
+use vars qw(@ISA $VERSION);
require File::Spec::Unix;
+
+$VERSION = '1.2';
+
@ISA = qw(File::Spec::Unix);
=head1 NAME
@@ -79,9 +82,9 @@ sub catdir {
shift;
my @args = @_;
my $result = shift @args;
- $result =~ s/:\z//;
+ $result =~ s/:\Z(?!\n)//;
foreach (@args) {
- s/:\z//;
+ s/:\Z(?!\n)//;
s/^://s;
$result .= ":$_";
}
@@ -150,7 +153,7 @@ sub rootdir {
require Mac::Files;
my $system = Mac::Files::FindFolder(&Mac::Files::kOnSystemDisk,
&Mac::Files::kSystemFolderType);
- $system =~ s/:.*\z/:/s;
+ $system =~ s/:.*\Z(?!\n)/:/s;
return $system;
}
@@ -189,12 +192,16 @@ folder named "HD" in the current working directory on a drive named "HD"),
relative wins. Use ":" in the appropriate place in the path if you want to
distinguish unambiguously.
+As a special case, the file name '' is always considered to be absolute.
+
=cut
sub file_name_is_absolute {
my ($self,$file) = @_;
if ($file =~ /:/) {
return ($file !~ m/^:/s);
+ } elsif ( $file eq '' ) {
+ return 1 ;
} else {
return (! -e ":$file");
}
@@ -228,7 +235,7 @@ sub splitpath {
my ($volume,$directory,$file) = ('','','');
if ( $nofile ) {
- ( $volume, $directory ) = $path =~ m@((?:[^:]+(?::|\z))?)(.*)@s;
+ ( $volume, $directory ) = $path =~ m@((?:[^:]+(?::|\Z(?!\n)))?)(.*)@s;
}
else {
$path =~
@@ -242,8 +249,8 @@ sub splitpath {
}
# Make sure non-empty volumes and directories end in ':'
- $volume .= ':' if $volume =~ m@[^:]\z@ ;
- $directory .= ':' if $directory =~ m@[^:]\z@ ;
+ $volume .= ':' if $volume =~ m@[^:]\Z(?!\n)@ ;
+ $directory .= ':' if $directory =~ m@[^:]\Z(?!\n)@ ;
return ($volume,$directory,$file);
}
@@ -259,7 +266,7 @@ sub splitdir {
# check to be sure that there will not be any before handling the
# simple case.
#
- if ( $directories !~ m@:\z@ ) {
+ if ( $directories !~ m@:\Z(?!\n)@ ) {
return split( m@:@, $directories );
}
else {
@@ -286,11 +293,11 @@ sub catpath {
my $segment ;
for $segment ( @_ ) {
- if ( $result =~ m@[^/]\z@ && $segment =~ m@^[^/]@s ) {
+ if ( $result =~ m@[^/]\Z(?!\n)@ && $segment =~ m@^[^/]@s ) {
$result .= "/$segment" ;
}
- elsif ( $result =~ m@/\z@ && $segment =~ m@^/@s ) {
- $result =~ s@/+\z@/@;
+ elsif ( $result =~ m@/\Z(?!\n)@ && $segment =~ m@^/@s ) {
+ $result =~ s@/+\Z(?!\n)@/@;
$segment =~ s@^/+@@s;
$result .= "$segment" ;
}
@@ -304,6 +311,12 @@ sub catpath {
=item abs2rel
+See L<File::Spec::Unix/abs2rel> for general documentation.
+
+Unlike C<File::Spec::Unix->abs2rel()>, this function will make
+checks against the local filesystem if necessary. See
+L</file_name_is_absolute> for details.
+
=cut
sub abs2rel {
@@ -341,31 +354,15 @@ sub abs2rel {
=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.
+See L<File::Spec::Unix/rel2abs> for general documentation.
-No checks against the filesystem are made.
+Unlike C<File::Spec::Unix->rel2abs()>, this function will make
+checks against the local filesystem if necessary. See
+L</file_name_is_absolute> for details.
=cut
-sub rel2abs($;$;) {
+sub rel2abs {
my ($self,$path,$base ) = @_;
if ( ! $self->file_name_is_absolute( $path ) ) {
diff --git a/contrib/perl5/lib/File/Spec/OS2.pm b/contrib/perl5/lib/File/Spec/OS2.pm
index 33370f0..20bf8c9 100644
--- a/contrib/perl5/lib/File/Spec/OS2.pm
+++ b/contrib/perl5/lib/File/Spec/OS2.pm
@@ -1,8 +1,11 @@
package File::Spec::OS2;
use strict;
-use vars qw(@ISA);
+use vars qw(@ISA $VERSION);
require File::Spec::Unix;
+
+$VERSION = '1.1';
+
@ISA = qw(File::Spec::Unix);
sub devnull {
diff --git a/contrib/perl5/lib/File/Spec/Unix.pm b/contrib/perl5/lib/File/Spec/Unix.pm
index 2305b75..a81c533 100644
--- a/contrib/perl5/lib/File/Spec/Unix.pm
+++ b/contrib/perl5/lib/File/Spec/Unix.pm
@@ -1,6 +1,9 @@
package File::Spec::Unix;
use strict;
+use vars qw($VERSION);
+
+$VERSION = '1.2';
use Cwd;
@@ -35,7 +38,7 @@ sub canonpath {
$path =~ s|(/\.)+/|/|g; # xx/././xx -> xx/xx
$path =~ s|^(\./)+||s unless $path eq "./"; # ./xx -> xx
$path =~ s|^/(\.\./)+|/|s; # /../../xx -> xx
- $path =~ s|/\z|| unless $path eq "/"; # xx/ -> xx
+ $path =~ s|/\Z(?!\n)|| unless $path eq "/"; # xx/ -> xx
return $path;
}
@@ -146,7 +149,7 @@ directory. (Does not strip symlinks, only '.', '..', and equivalents.)
sub no_upwards {
my $self = shift;
- return grep(!/^\.{1,2}\z/s, @_);
+ return grep(!/^\.{1,2}\Z(?!\n)/s, @_);
}
=item case_tolerant
@@ -162,7 +165,12 @@ sub case_tolerant {
=item file_name_is_absolute
-Takes as argument a path and returns true, if it is an absolute path.
+Takes as argument a path and returns true if it is an absolute path.
+
+This does not consult the local filesystem on Unix, Win32, or OS/2. It
+does sometimes on MacOS (see L<File::Spec::MacOS/file_name_is_absolute>).
+It does consult the working environment for VMS (see
+L<File::Spec::VMS/file_name_is_absolute>).
=cut
@@ -223,7 +231,7 @@ sub splitpath {
$directory = $path;
}
else {
- $path =~ m|^ ( (?: .* / (?: \.\.?\z )? )? ) ([^/]*) |xs;
+ $path =~ m|^ ( (?: .* / (?: \.\.?\Z(?!\n) )? )? ) ([^/]*) |xs;
$directory = $1;
$file = $2;
}
@@ -263,7 +271,7 @@ sub splitdir {
# check to be sure that there will not be any before handling the
# simple case.
#
- if ( $directories !~ m|/\z| ) {
+ if ( $directories !~ m|/\Z(?!\n)| ) {
return split( m|/|, $directories );
}
else {
@@ -308,8 +316,8 @@ sub catpath {
Takes a destination path and an optional base path returns a relative path
from the base path to the destination path:
- $rel_path = File::Spec->abs2rel( $destination ) ;
- $rel_path = File::Spec->abs2rel( $destination, $base ) ;
+ $rel_path = File::Spec->abs2rel( $path ) ;
+ $rel_path = File::Spec->abs2rel( $path, $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
@@ -325,9 +333,13 @@ directories.
If $path is relative, it is converted to absolute form using L</rel2abs()>.
This means that it is taken to be relative to L<cwd()>.
-Based on code written by Shigio Yamaguchi.
+No checks against the filesystem are made on most systems. On MacOS,
+the filesystem may be consulted (see
+L<File::Spec::MacOS/file_name_is_absolute>). On VMS, there is
+interaction with the working environment, as logicals and
+macros are expanded.
-No checks against the filesystem are made.
+Based on code written by Shigio Yamaguchi.
=cut
@@ -385,15 +397,15 @@ sub abs2rel {
Converts a relative path to an absolute path.
- $abs_path = File::Spec->rel2abs( $destination ) ;
- $abs_path = File::Spec->rel2abs( $destination, $base ) ;
+ $abs_path = File::Spec->rel2abs( $path ) ;
+ $abs_path = File::Spec->rel2abs( $path, $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.
+are on the $base volume, and ignores the $path 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
@@ -401,13 +413,17 @@ 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 on most systems. On MacOS,
+the filesystem may be consulted (see
+L<File::Spec::MacOS/file_name_is_absolute>). On VMS, there is
+interaction with the working environment, as logicals and
+macros are expanded.
-No checks against the filesystem are made.
+Based on code written by Shigio Yamaguchi.
=cut
-sub rel2abs($;$;) {
+sub rel2abs {
my ($self,$path,$base ) = @_;
# Clean up $path
diff --git a/contrib/perl5/lib/File/Spec/VMS.pm b/contrib/perl5/lib/File/Spec/VMS.pm
index a2ac8ca..60b0ec8 100644
--- a/contrib/perl5/lib/File/Spec/VMS.pm
+++ b/contrib/perl5/lib/File/Spec/VMS.pm
@@ -1,8 +1,11 @@
package File::Spec::VMS;
use strict;
-use vars qw(@ISA);
+use vars qw(@ISA $VERSION);
require File::Spec::Unix;
+
+$VERSION = '1.1';
+
@ISA = qw(File::Spec::Unix);
use Cwd;
@@ -37,6 +40,11 @@ sub eliminate_macros {
my($self,$path) = @_;
return '' unless $path;
$self = {} unless ref $self;
+
+ if ($path =~ /\s/) {
+ return join ' ', map { $self->eliminate_macros($_) } split /\s+/, $path;
+ }
+
my($npath) = unixify($path);
my($complex) = 0;
my($head,$macro,$tail);
@@ -56,7 +64,7 @@ sub eliminate_macros {
$complex = 1;
}
}
- else { ($macro = unixify($self->{$macro})) =~ s#/\z##; }
+ else { ($macro = unixify($self->{$macro})) =~ s#/\Z(?!\n)##; }
$npath = "$head$macro$tail";
}
}
@@ -86,8 +94,14 @@ sub fixpath {
$self = bless {} unless ref $self;
my($fixedpath,$prefix,$name);
- if ($path =~ m#^\$\([^\)]+\)\z#s || $path =~ m#[/:>\]]#) {
- if ($force_path or $path =~ /(?:DIR\)|\])\z/) {
+ if ($path =~ /\s/) {
+ return join ' ',
+ map { $self->fixpath($_,$force_path) }
+ split /\s+/, $path;
+ }
+
+ if ($path =~ m#^\$\([^\)]+\)\Z(?!\n)#s || $path =~ m#[/:>\]]#) {
+ if ($force_path or $path =~ /(?:DIR\)|\])\Z(?!\n)/) {
$fixedpath = vmspath($self->eliminate_macros($path));
}
else {
@@ -97,7 +111,7 @@ sub fixpath {
elsif ((($prefix,$name) = ($path =~ m#^\$\(([^\)]+)\)(.+)#s)) && $self->{$prefix}) {
my($vmspre) = $self->eliminate_macros("\$($prefix)");
# is it a dir or just a name?
- $vmspre = ($vmspre =~ m|/| or $prefix =~ /DIR\z/) ? vmspath($vmspre) : '';
+ $vmspre = ($vmspre =~ m|/| or $prefix =~ /DIR\Z(?!\n)/) ? vmspath($vmspre) : '';
$fixedpath = ($vmspre ? $vmspre : $self->{$prefix}) . $name;
$fixedpath = vmspath($fixedpath) if $force_path;
}
@@ -136,7 +150,7 @@ sub canonpath {
my($self,$path) = @_;
if ($path =~ m|/|) { # Fake Unix
- my $pathify = $path =~ m|/\z|;
+ my $pathify = $path =~ m|/\Z(?!\n)|;
$path = $self->SUPER::canonpath($path);
if ($pathify) { return vmspath($path); }
else { return vmsify($path); }
@@ -169,8 +183,8 @@ sub catdir {
if (@dirs) {
my $path = (@dirs == 1 ? $dirs[0] : $self->catdir(@dirs));
my ($spath,$sdir) = ($path,$dir);
- $spath =~ s/\.dir\z//; $sdir =~ s/\.dir\z//;
- $sdir = $self->eliminate_macros($sdir) unless $sdir =~ /^[\w\-]+\z/s;
+ $spath =~ s/\.dir\Z(?!\n)//; $sdir =~ s/\.dir\Z(?!\n)//;
+ $sdir = $self->eliminate_macros($sdir) unless $sdir =~ /^[\w\-]+\Z(?!\n)/s;
$rslt = $self->fixpath($self->eliminate_macros($spath)."/$sdir",1);
# Special case for VMS absolute directory specs: these will have had device
@@ -181,7 +195,7 @@ sub catdir {
}
else {
if (not defined $dir or not length $dir) { $rslt = ''; }
- elsif ($dir =~ /^\$\([^\)]+\)\z/s) { $rslt = $dir; }
+ elsif ($dir =~ /^\$\([^\)]+\)\Z(?!\n)/s) { $rslt = $dir; }
else { $rslt = vmspath($dir); }
}
return $self->canonpath($rslt);
@@ -202,8 +216,8 @@ sub catfile {
if (@files) {
my $path = (@files == 1 ? $files[0] : $self->catdir(@files));
my $spath = $path;
- $spath =~ s/\.dir\z//;
- if ($spath =~ /^[^\)\]\/:>]+\)\z/s && basename($file) eq $file) {
+ $spath =~ s/\.dir\Z(?!\n)//;
+ if ($spath =~ /^[^\)\]\/:>]+\)\Z(?!\n)/s && basename($file) eq $file) {
$rslt = "$spath$file";
}
else {
@@ -251,7 +265,7 @@ sub rootdir {
Returns a string representation of the first writable directory
from the following list or '' if none are writable:
- sys$scratch
+ sys$scratch:
$ENV{TMPDIR}
=cut
@@ -259,7 +273,7 @@ from the following list or '' if none are writable:
my $tmpdir;
sub tmpdir {
return $tmpdir if defined $tmpdir;
- foreach ('sys$scratch', $ENV{TMPDIR}) {
+ foreach ('sys$scratch:', $ENV{TMPDIR}) {
next unless defined && -d && -w _;
$tmpdir = $_;
last;
@@ -310,7 +324,7 @@ Checks for VMS directory spec as well as Unix separators.
sub file_name_is_absolute {
my ($self,$file) = @_;
# If it's a logical name, expand it.
- $file = $ENV{$file} while $file =~ /^[\w\$\-]+\z/s && $ENV{$file};
+ $file = $ENV{$file} while $file =~ /^[\w\$\-]+\Z(?!\n)/s && $ENV{$file};
return scalar($file =~ m!^/!s ||
$file =~ m![<\[][^.\-\]>]! ||
$file =~ /:[^<\[]/);
@@ -341,7 +355,7 @@ sub splitdir {
$dirspec =~ s/\]\[//g; $dirspec =~ s/\-\-/-.-/g;
$dirspec = "[$dirspec]" unless $dirspec =~ /[\[<]/; # make legal
my(@dirs) = split('\.', vmspath($dirspec));
- $dirs[0] =~ s/^[\[<]//s; $dirs[-1] =~ s/[\]>]\z//s;
+ $dirs[0] =~ s/^[\[<]//s; $dirs[-1] =~ s/[\]>]\Z(?!\n)//s;
@dirs;
}
@@ -355,7 +369,7 @@ Construct a complete filespec using VMS syntax
sub catpath {
my($self,$dev,$dir,$file) = @_;
if ($dev =~ m|^/+([^/]+)|) { $dev = "$1:"; }
- else { $dev .= ':' unless $dev eq '' or $dev =~ /:\z/; }
+ else { $dev .= ':' unless $dev eq '' or $dev =~ /:\Z(?!\n)/; }
if (length($dev) or length($dir)) {
$dir = "[$dir]" unless $dir =~ /[\[<\/]/;
$dir = vmspath($dir);
@@ -400,17 +414,16 @@ sub abs2rel {
}
# Split up paths
- my ( undef, $path_directories, $path_file ) =
- $self->splitpath( $path, 1 ) ;
+ my ( $path_directories, $path_file ) =
+ ($self->splitpath( $path, 1 ))[1,2] ;
$path_directories = $1
- if $path_directories =~ /^\[(.*)\]\z/s ;
+ if $path_directories =~ /^\[(.*)\]\Z(?!\n)/s ;
- my ( undef, $base_directories, undef ) =
- $self->splitpath( $base, 1 ) ;
+ my $base_directories = ($self->splitpath( $base, 1 ))[1] ;
$base_directories = $1
- if $base_directories =~ /^\[(.*)\]\z/s ;
+ if $base_directories =~ /^\[(.*)\]\Z(?!\n)/s ;
# Now, remove all leading components that are the same
my @pathchunks = $self->splitdir( $path_directories );
@@ -427,7 +440,7 @@ sub abs2rel {
# @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{\.\z}{} ;
+ $path_directories =~ s{\.\Z(?!\n)}{} ;
return $self->canonpath( $self->catpath( '', $path_directories, $path_file ) ) ;
}
@@ -438,7 +451,7 @@ Use VMS syntax when converting filespecs.
=cut
-sub rel2abs($;$;) {
+sub rel2abs {
my $self = shift ;
return vmspath(File::Spec::Unix::rel2abs( $self, @_ ))
if ( join( '', @_ ) =~ m{/} ) ;
@@ -458,17 +471,17 @@ sub rel2abs($;$;) {
}
# Split up paths
- my ( undef, $path_directories, $path_file ) =
- $self->splitpath( $path ) ;
+ my ( $path_directories, $path_file ) =
+ ($self->splitpath( $path ))[1,2] ;
- my ( $base_volume, $base_directories, undef ) =
+ my ( $base_volume, $base_directories ) =
$self->splitpath( $base ) ;
$path_directories = '' if $path_directories eq '[]' ||
$path_directories eq '<>';
my $sep = '' ;
$sep = '.'
- if ( $base_directories =~ m{[^.\]>]\z} &&
+ if ( $base_directories =~ m{[^.\]>]\Z(?!\n)} &&
$path_directories =~ m{^[^.\[<]}s
) ;
$base_directories = "$base_directories$sep$path_directories";
diff --git a/contrib/perl5/lib/File/Spec/Win32.pm b/contrib/perl5/lib/File/Spec/Win32.pm
index aa95fbd..3c01985 100644
--- a/contrib/perl5/lib/File/Spec/Win32.pm
+++ b/contrib/perl5/lib/File/Spec/Win32.pm
@@ -2,8 +2,11 @@ package File::Spec::Win32;
use strict;
use Cwd;
-use vars qw(@ISA);
+use vars qw(@ISA $VERSION);
require File::Spec::Unix;
+
+$VERSION = '1.2';
+
@ISA = qw(File::Spec::Unix);
=head1 NAME
@@ -40,6 +43,7 @@ from the following list:
$ENV{TMPDIR}
$ENV{TEMP}
$ENV{TMP}
+ C:/temp
/tmp
/
@@ -49,7 +53,7 @@ my $tmpdir;
sub tmpdir {
return $tmpdir if defined $tmpdir;
my $self = shift;
- foreach (@ENV{qw(TMPDIR TEMP TMP)}, qw(/tmp /)) {
+ foreach (@ENV{qw(TMPDIR TEMP TMP)}, qw(C:/temp /tmp /)) {
next unless defined && -d;
$tmpdir = $_;
last;
@@ -105,8 +109,8 @@ sub canonpath {
$path =~ s|([^\\])\\+|$1\\|g; # xx////xx -> xx/xx
$path =~ s|(\\\.)+\\|\\|g; # xx/././xx -> xx/xx
$path =~ s|^(\.\\)+||s unless $path eq ".\\"; # ./xx -> xx
- $path =~ s|\\\z||
- unless $path =~ m#^([A-Z]:)?\\\z#s; # xx/ -> xx
+ $path =~ s|\\\Z(?!\n)||
+ unless $path =~ m#^([A-Z]:)?\\\Z(?!\n)#s; # xx/ -> xx
return $path;
}
@@ -146,7 +150,7 @@ sub splitpath {
(?:\\\\|//)[^\\/]+[\\/][^\\/]+
)?
)
- ( (?:.*[\\\\/](?:\.\.?\z)?)? )
+ ( (?:.*[\\\\/](?:\.\.?\Z(?!\n))?)? )
(.*)
}xs;
$volume = $1;
@@ -187,7 +191,7 @@ sub splitdir {
# check to be sure that there will not be any before handling the
# simple case.
#
- if ( $directories !~ m|[\\/]\z| ) {
+ if ( $directories !~ m|[\\/]\Z(?!\n)| ) {
return split( m|[\\/]|, $directories );
}
else {
@@ -216,7 +220,7 @@ sub catpath {
# If it's UNC, make sure the glue separator is there, reusing
# whatever separator is first in the $volume
$volume .= $1
- if ( $volume =~ m@^([\\/])[\\/][^\\/]+[\\/][^\\/]+\z@s &&
+ if ( $volume =~ m@^([\\/])[\\/][^\\/]+[\\/][^\\/]+\Z(?!\n)@s &&
$directory =~ m@^[^\\/]@s
) ;
@@ -224,8 +228,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]:\z@s &&
- $volume =~ m@[^\\/]\z@ &&
+ if ( $volume !~ m@^[a-zA-Z]:\Z(?!\n)@s &&
+ $volume =~ m@[^\\/]\Z(?!\n)@ &&
$file =~ m@[^\\/]@
) {
$volume =~ m@([\\/])@ ;
@@ -239,34 +243,6 @@ sub catpath {
}
-=item abs2rel
-
-Takes a destination path and an optional base path returns a relative path
-from the base path to the destination path:
-
- $rel_path = File::Spec->abs2rel( $destination ) ;
- $rel_path = File::Spec->abs2rel( $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 $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
-directories.
-
-If $path is relative, it is converted to absolute form using L</rel2abs()>.
-This means that it is taken to be relative to L</cwd()>.
-
-Based on code written by Shigio Yamaguchi.
-
-No checks against the filesystem are made.
-
-=cut
-
sub abs2rel {
my($self,$path,$base) = @_;
@@ -293,8 +269,7 @@ sub abs2rel {
my ( $path_volume, $path_directories, $path_file ) =
$self->splitpath( $path, 1 ) ;
- my ( undef, $base_directories, undef ) =
- $self->splitpath( $base, 1 ) ;
+ my $base_directories = ($self->splitpath( $base, 1 ))[1] ;
# Now, remove all leading components that are the same
my @pathchunks = $self->splitdir( $path_directories );
@@ -337,33 +312,8 @@ sub abs2rel {
) ;
}
-=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()>.
-
-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($;$;) {
+sub rel2abs {
my ($self,$path,$base ) = @_;
if ( ! $self->file_name_is_absolute( $path ) ) {
@@ -378,10 +328,10 @@ sub rel2abs($;$;) {
$base = $self->canonpath( $base ) ;
}
- my ( undef, $path_directories, $path_file ) =
- $self->splitpath( $path, 1 ) ;
+ my ( $path_directories, $path_file ) =
+ ($self->splitpath( $path, 1 ))[1,2] ;
- my ( $base_volume, $base_directories, undef ) =
+ my ( $base_volume, $base_directories ) =
$self->splitpath( $base, 1 ) ;
$path = $self->catpath(
diff --git a/contrib/perl5/lib/FileHandle.pm b/contrib/perl5/lib/FileHandle.pm
index 34c3475..5eb3a89 100644
--- a/contrib/perl5/lib/FileHandle.pm
+++ b/contrib/perl5/lib/FileHandle.pm
@@ -238,12 +238,12 @@ See L<perlfunc/printf>.
=item $fh->getline
This works like <$fh> described in L<perlop/"I/O Operators">
-except that it's more readable and can be safely called in an
-array context but still returns just one line.
+except that it's more readable and can be safely called in a
+list context but still returns just one line.
=item $fh->getlines
-This works like <$fh> when called in an array context to
+This works like <$fh> when called in a list context to
read all the remaining lines in a file, except that it's more readable.
It will also croak() if accidentally called in a scalar context.
diff --git a/contrib/perl5/lib/Getopt/Long.pm b/contrib/perl5/lib/Getopt/Long.pm
index f474c7c..472527d 100644
--- a/contrib/perl5/lib/Getopt/Long.pm
+++ b/contrib/perl5/lib/Getopt/Long.pm
@@ -2,17 +2,17 @@
package Getopt::Long;
-# RCS Status : $Id: GetoptLong.pl,v 2.24 2000-03-14 21:28:52+01 jv Exp $
+# RCS Status : $Id: GetoptLong.pl,v 2.26 2001-01-31 10:20:29+01 jv Exp $
# Author : Johan Vromans
# Created On : Tue Sep 11 15:00:12 1990
# Last Modified By: Johan Vromans
-# Last Modified On: Tue Mar 14 21:28:40 2000
-# Update Count : 721
+# Last Modified On: Sat Jan 6 17:12:27 2001
+# Update Count : 748
# Status : Released
################ Copyright ################
-# This program is Copyright 1990,2000 by Johan Vromans.
+# This program is Copyright 1990,2001 by Johan Vromans.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the Perl Artistic License or the
# GNU General Public License as published by the Free Software
@@ -30,19 +30,24 @@ package Getopt::Long;
################ Module Preamble ################
+use 5.004;
+
use strict;
-BEGIN {
- require 5.004;
- use Exporter ();
- use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
- $VERSION = "2.23";
+use vars qw($VERSION $VERSION_STRING);
+$VERSION = 2.25;
+$VERSION_STRING = "2.25";
+
+use Exporter;
+use AutoLoader qw(AUTOLOAD);
- @ISA = qw(Exporter);
+use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+@ISA = qw(Exporter);
+%EXPORT_TAGS = qw();
+BEGIN {
+ # Init immediately so their contents can be used in the 'use vars' below.
@EXPORT = qw(&GetOptions $REQUIRE_ORDER $PERMUTE $RETURN_IN_ORDER);
- %EXPORT_TAGS = qw();
@EXPORT_OK = qw();
- use AutoLoader qw(AUTOLOAD);
}
# User visible variables.
@@ -52,7 +57,7 @@ use vars qw($error $debug $major_version $minor_version);
use vars qw($autoabbrev $getopt_compat $ignorecase $bundling $order
$passthrough);
# Official invisible variables.
-use vars qw($genprefix $caller);
+use vars qw($genprefix $caller $gnu_compat);
# Public subroutines.
sub Configure (@);
@@ -89,6 +94,27 @@ sub ConfigDefaults () {
$error = 0; # error tally
$ignorecase = 1; # ignore case when matching options
$passthrough = 0; # leave unrecognized options alone
+ $gnu_compat = 0; # require --opt=val if value is optional
+}
+
+# Override import.
+sub import {
+ my $pkg = shift; # package
+ my @syms = (); # symbols to import
+ my @config = (); # configuration
+ my $dest = \@syms; # symbols first
+ for ( @_ ) {
+ if ( $_ eq ':config' ) {
+ $dest = \@config; # config next
+ next;
+ }
+ push (@$dest, $_); # push
+ }
+ # Hide one level and call super.
+ local $Exporter::ExportLevel = 1;
+ $pkg->SUPER::import(@syms);
+ # And configure.
+ Configure (@config) if @config;
}
################ Initialization ################
@@ -100,6 +126,87 @@ sub ConfigDefaults () {
ConfigDefaults();
+################ OO Interface ################
+
+package Getopt::Long::Parser;
+
+# NOTE: The object oriented routines use $error for thread locking.
+my $_lock = sub {
+ lock ($Getopt::Long::error) if $] >= 5.005
+};
+
+# Store a copy of the default configuration. Since ConfigDefaults has
+# just been called, what we get from Configure is the default.
+my $default_config = do {
+ &$_lock;
+ Getopt::Long::Configure ()
+};
+
+sub new {
+ my $that = shift;
+ my $class = ref($that) || $that;
+ my %atts = @_;
+
+ # Register the callers package.
+ my $self = { caller_pkg => (caller)[0] };
+
+ bless ($self, $class);
+
+ # Process config attributes.
+ if ( defined $atts{config} ) {
+ &$_lock;
+ my $save = Getopt::Long::Configure ($default_config, @{$atts{config}});
+ $self->{settings} = Getopt::Long::Configure ($save);
+ delete ($atts{config});
+ }
+ # Else use default config.
+ else {
+ $self->{settings} = $default_config;
+ }
+
+ if ( %atts ) { # Oops
+ Getopt::Long::Croak(__PACKAGE__.": unhandled attributes: ".
+ join(" ", sort(keys(%atts))));
+ }
+
+ $self;
+}
+
+sub configure {
+ my ($self) = shift;
+
+ &$_lock;
+
+ # Restore settings, merge new settings in.
+ my $save = Getopt::Long::Configure ($self->{settings}, @_);
+
+ # Restore orig config and save the new config.
+ $self->{settings} = Configure ($save);
+}
+
+sub getoptions {
+ my ($self) = shift;
+
+ &$_lock;
+
+ # Restore config settings.
+ my $save = Getopt::Long::Configure ($self->{settings});
+
+ # Call main routine.
+ my $ret = 0;
+ $Getopt::Long::caller = $self->{caller_pkg};
+ eval { $ret = Getopt::Long::GetOptions (@_); };
+
+ # Restore saved settings.
+ Getopt::Long::Configure ($save);
+
+ # Handle errors and return value.
+ die ($@) if $@;
+ return $ret;
+}
+
+package Getopt::Long;
+
################ Package return ################
1;
@@ -108,12 +215,12 @@ __END__
################ AutoLoading subroutines ################
-# RCS Status : $Id: GetoptLongAl.pl,v 2.27 2000-03-17 09:07:26+01 jv Exp $
+# RCS Status : $Id: GetoptLongAl.pl,v 2.30 2001-01-31 10:21:11+01 jv Exp $
# Author : Johan Vromans
# Created On : Fri Mar 27 11:50:30 1998
# Last Modified By: Johan Vromans
-# Last Modified On: Fri Mar 17 09:00:09 2000
-# Update Count : 55
+# Last Modified On: Tue Dec 26 18:01:16 2000
+# Update Count : 98
# Status : Released
sub GetOptions {
@@ -137,13 +244,14 @@ sub GetOptions {
print STDERR ("GetOpt::Long $Getopt::Long::VERSION ",
"called from package \"$pkg\".",
"\n ",
- 'GetOptionsAl $Revision: 2.27 $ ',
+ 'GetOptionsAl $Revision: 2.30 $ ',
"\n ",
"ARGV: (@ARGV)",
"\n ",
"autoabbrev=$autoabbrev,".
"bundling=$bundling,",
"getopt_compat=$getopt_compat,",
+ "gnu_compat=$gnu_compat,",
"order=$order,",
"\n ",
"ignorecase=$ignorecase,",
@@ -200,7 +308,7 @@ sub GetOptions {
next;
}
- # Match option spec. Allow '?' as an alias.
+ # Match option spec. Allow '?' as an alias only.
if ( $opt !~ /^((\w+[-\w]*)(\|(\?|\w[-\w]*)?)*)?([!~+]|[=:][infse][@%]?)?$/ ) {
$error .= "Error in option spec: \"$opt\"\n";
next;
@@ -208,14 +316,24 @@ sub GetOptions {
my ($o, $c, $a) = ($1, $5);
$c = '' unless defined $c;
+ # $linko keeps track of the primary name the user specified.
+ # This name will be used for the internal or external linkage.
+ # In other words, if the user specifies "FoO|BaR", it will
+ # match any case combinations of 'foo' and 'bar', but if a global
+ # variable needs to be set, it will be $opt_FoO in the exact case
+ # as specified.
+ my $linko;
+
if ( ! defined $o ) {
# empty -> '-' option
- $opctl{$o = ''} = $c;
+ $linko = $o = '';
+ $opctl{''} = $c;
+ $bopctl{''} = $c if $bundling;
}
else {
# Handle alias names
my @o = split (/\|/, $o);
- my $linko = $o = $o[0];
+ $linko = $o = $o[0];
# Force an alias if the option name is not locase.
$a = $o unless $o eq lc($o);
$o = lc ($o)
@@ -254,18 +372,18 @@ sub GetOptions {
$a = $_;
}
}
- $o = $linko;
}
# If no linkage is supplied in the @optionlist, copy it from
# the userlinkage if available.
if ( defined $userlinkage ) {
unless ( @optionlist > 0 && ref($optionlist[0]) ) {
- if ( exists $userlinkage->{$o} && ref($userlinkage->{$o}) ) {
- print STDERR ("=> found userlinkage for \"$o\": ",
- "$userlinkage->{$o}\n")
+ if ( exists $userlinkage->{$linko} &&
+ ref($userlinkage->{$linko}) ) {
+ print STDERR ("=> found userlinkage for \"$linko\": ",
+ "$userlinkage->{$linko}\n")
if $debug;
- unshift (@optionlist, $userlinkage->{$o});
+ unshift (@optionlist, $userlinkage->{$linko});
}
else {
# Do nothing. Being undefined will be handled later.
@@ -276,13 +394,13 @@ sub GetOptions {
# Copy the linkage. If omitted, link to global variable.
if ( @optionlist > 0 && ref($optionlist[0]) ) {
- print STDERR ("=> link \"$o\" to $optionlist[0]\n")
+ print STDERR ("=> link \"$linko\" to $optionlist[0]\n")
if $debug;
if ( ref($optionlist[0]) =~ /^(SCALAR|CODE)$/ ) {
- $linkage{$o} = shift (@optionlist);
+ $linkage{$linko} = shift (@optionlist);
}
elsif ( ref($optionlist[0]) =~ /^(ARRAY)$/ ) {
- $linkage{$o} = shift (@optionlist);
+ $linkage{$linko} = shift (@optionlist);
$opctl{$o} .= '@'
if $opctl{$o} ne '' and $opctl{$o} !~ /\@$/;
$bopctl{$o} .= '@'
@@ -290,7 +408,7 @@ sub GetOptions {
$bopctl{$o} ne '' and $bopctl{$o} !~ /\@$/;
}
elsif ( ref($optionlist[0]) =~ /^(HASH)$/ ) {
- $linkage{$o} = shift (@optionlist);
+ $linkage{$linko} = shift (@optionlist);
$opctl{$o} .= '%'
if $opctl{$o} ne '' and $opctl{$o} !~ /\%$/;
$bopctl{$o} .= '%'
@@ -304,22 +422,22 @@ sub GetOptions {
else {
# Link to global $opt_XXX variable.
# Make sure a valid perl identifier results.
- my $ov = $o;
+ my $ov = $linko;
$ov =~ s/\W/_/g;
if ( $c =~ /@/ ) {
- print STDERR ("=> link \"$o\" to \@$pkg","::opt_$ov\n")
+ print STDERR ("=> link \"$linko\" to \@$pkg","::opt_$ov\n")
if $debug;
- eval ("\$linkage{\$o} = \\\@".$pkg."::opt_$ov;");
+ eval ("\$linkage{\$linko} = \\\@".$pkg."::opt_$ov;");
}
elsif ( $c =~ /%/ ) {
- print STDERR ("=> link \"$o\" to \%$pkg","::opt_$ov\n")
+ print STDERR ("=> link \"$linko\" to \%$pkg","::opt_$ov\n")
if $debug;
- eval ("\$linkage{\$o} = \\\%".$pkg."::opt_$ov;");
+ eval ("\$linkage{\$linko} = \\\%".$pkg."::opt_$ov;");
}
else {
- print STDERR ("=> link \"$o\" to \$$pkg","::opt_$ov\n")
+ print STDERR ("=> link \"$linko\" to \$$pkg","::opt_$ov\n")
if $debug;
- eval ("\$linkage{\$o} = \\\$".$pkg."::opt_$ov;");
+ eval ("\$linkage{\$linko} = \\\$".$pkg."::opt_$ov;");
}
}
}
@@ -382,7 +500,11 @@ sub GetOptions {
next unless defined $opt;
if ( defined $arg ) {
- $opt = $aliases{$opt} if defined $aliases{$opt};
+ if ( defined $aliases{$opt} ) {
+ print STDERR ("=> alias \"$opt\" -> \"$aliases{$opt}\"\n")
+ if $debug;
+ $opt = $aliases{$opt};
+ }
if ( defined $linkage{$opt} ) {
print STDERR ("=> ref(\$L{$opt}) -> ",
@@ -543,7 +665,8 @@ sub FindOption ($$$$$$$) {
print STDERR ("=> find \"$opt\", prefix=\"$prefix\"\n") if $debug;
- return (0) unless $opt =~ /^$prefix(.*)$/s;
+ return 0 unless $opt =~ /^$prefix(.*)$/s;
+ return 0 if $opt eq "-" && !defined $opctl->{""};
$opt = $+;
my ($starter) = $1;
@@ -572,7 +695,7 @@ sub FindOption ($$$$$$$) {
if ( $bundling && $starter eq '-' ) {
# Unbundle single letter option.
- $rest = substr ($tryopt, 1);
+ $rest = length ($tryopt) > 0 ? substr ($tryopt, 1) : "";
$tryopt = substr ($tryopt, 0, 1);
$tryopt = lc ($tryopt) if $ignorecase > 1;
print STDERR ("=> $starter$tryopt unbundled from ",
@@ -646,7 +769,7 @@ sub FindOption ($$$$$$$) {
}
# Apparently valid.
$opt = $tryopt;
- print STDERR ("=> found \"$type\" for ", $opt, "\n") if $debug;
+ print STDERR ("=> found \"$type\" for \"", $opt, "\"\n") if $debug;
#### Determine argument status ####
@@ -675,7 +798,16 @@ sub FindOption ($$$$$$$) {
($mand, $type, $dsttype, $key) = $type =~ /^(.)(.)([@%]?)$/;
# Check if there is an option argument available.
- if ( defined $optarg ? ($optarg eq '')
+ if ( $gnu_compat ) {
+ return (1, $opt, $optarg, $dsttype, $incr, $key)
+ if defined $optarg;
+ return (1, $opt, $type eq "s" ? '' : 0, $dsttype, $incr, $key)
+ if $mand eq ':';
+ }
+
+ # Check if there is an option argument available.
+ if ( defined $optarg
+ ? ($optarg eq '')
: !(defined $rest || @ARGV > 0) ) {
# Complain if this option needs an argument.
if ( $mand eq "=" ) {
@@ -684,10 +816,7 @@ sub FindOption ($$$$$$$) {
$error++;
undef $opt;
}
- if ( $mand eq ":" ) {
- $arg = $type eq "s" ? '' : 0;
- }
- return (1, $opt,$arg,$dsttype,$incr,$key);
+ return (1, $opt, $type eq "s" ? '' : 0, $dsttype, $incr, $key);
}
# Get (possibly optional) argument.
@@ -795,12 +924,12 @@ sub Configure (@) {
my $prevconfig =
[ $error, $debug, $major_version, $minor_version,
$autoabbrev, $getopt_compat, $ignorecase, $bundling, $order,
- $passthrough, $genprefix ];
+ $gnu_compat, $passthrough, $genprefix ];
if ( ref($options[0]) eq 'ARRAY' ) {
( $error, $debug, $major_version, $minor_version,
$autoabbrev, $getopt_compat, $ignorecase, $bundling, $order,
- $passthrough, $genprefix ) = @{shift(@options)};
+ $gnu_compat, $passthrough, $genprefix ) = @{shift(@options)};
}
my $opt;
@@ -811,8 +940,13 @@ sub Configure (@) {
$action = 0;
$try = $+;
}
- if ( $try eq 'default' or $try eq 'defaults' ) {
- ConfigDefaults () if $action;
+ if ( ($try eq 'default' or $try eq 'defaults') && $action ) {
+ ConfigDefaults ();
+ }
+ elsif ( ($try eq 'posix_default' or $try eq 'posix_defaults') ) {
+ local $ENV{POSIXLY_CORRECT};
+ $ENV{POSIXLY_CORRECT} = 1 if $action;
+ ConfigDefaults ();
}
elsif ( $try eq 'auto_abbrev' or $try eq 'autoabbrev' ) {
$autoabbrev = $action;
@@ -820,6 +954,17 @@ sub Configure (@) {
elsif ( $try eq 'getopt_compat' ) {
$getopt_compat = $action;
}
+ elsif ( $try eq 'gnu_getopt' ) {
+ if ( $action ) {
+ $gnu_compat = 1;
+ $bundling = 1;
+ $getopt_compat = 0;
+ $permute = 1;
+ }
+ }
+ elsif ( $try eq 'gnu_compat' ) {
+ $gnu_compat = $action;
+ }
elsif ( $try eq 'ignorecase' or $try eq 'ignore_case' ) {
$ignorecase = $action;
}
@@ -841,14 +986,14 @@ sub Configure (@) {
elsif ( $try eq 'pass_through' or $try eq 'passthrough' ) {
$passthrough = $action;
}
- elsif ( $try =~ /^prefix=(.+)$/ ) {
+ elsif ( $try =~ /^prefix=(.+)$/ && $action ) {
$genprefix = $1;
# Turn into regexp. Needs to be parenthesized!
$genprefix = "(" . quotemeta($genprefix) . ")";
eval { '' =~ /$genprefix/; };
Croak ("Getopt::Long: invalid pattern \"$genprefix\"") if $@;
}
- elsif ( $try =~ /^prefix_pattern=(.+)$/ ) {
+ elsif ( $try =~ /^prefix_pattern=(.+)$/ && $action ) {
$genprefix = $1;
# Parenthesize if needed.
$genprefix = "(" . $genprefix . ")"
@@ -930,7 +1075,7 @@ could use the more descriptive C<--long>. To distinguish between a
bundle of single-character options and a long one, two dashes are used
to precede the option name. Early implementations of long options used
a plus C<+> instead. Also, option values could be specified either
-like
+like
--size=24
@@ -943,7 +1088,7 @@ The C<+> form is now obsolete and strongly deprecated.
=head1 Getting Started with Getopt::Long
Getopt::Long is the Perl5 successor of C<newgetopt.pl>. This was
-the firs Perl module that provided support for handling the new style
+the first Perl module that provided support for handling the new style
of command line options, hence the name Getopt::Long. This module
also supports single-character options and bundling. In this case, the
options are restricted to alphabetic characters only, and the
@@ -1166,11 +1311,11 @@ requires a least C<--hea> and C<--hei> for the head and height options.
=head2 Summary of Option Specifications
Each option specifier consists of two parts: the name specification
-and the argument specification.
+and the argument specification.
The name specification contains the name of the option, optionally
followed by a list of alternative names separated by vertical bar
-characters.
+characters.
length option name is "length"
length|size|l name is "length", aliases are "size" and "l"
@@ -1243,6 +1388,24 @@ considered an option on itself.
=head1 Advanced Possibilities
+=head2 Object oriented interface
+
+Getopt::Long can be used in an object oriented way as well:
+
+ use Getopt::Long;
+ $p = new Getopt::Long::Parser;
+ $p->configure(...configuration options...);
+ if ($p->getoptions(...options descriptions...)) ...
+
+Configuration options can be passed to the constructor:
+
+ $p = new Getopt::Long::Parser
+ config => [...configuration options...];
+
+For thread safety, each method call will acquire an exclusive lock to
+the Getopt::Long module. So don't call these methods from a callback
+routine!
+
=head2 Documentation and help texts
Getopt::Long encourages the use of Pod::Usage to produce help
@@ -1365,7 +1528,7 @@ options,
-vax
-would set C<a>, C<v> and C<x>, but
+would set C<a>, C<v> and C<x>, but
--vax
@@ -1398,13 +1561,18 @@ It goes without saying that bundling can be quite confusing.
=head2 The lonesome dash
-Some applications require the option C<-> (that's a lone dash). This
-can be achieved by adding an option specification with an empty name:
+Normally, a lone dash C<-> on the command line will not be considered
+an option. Option processing will terminate (unless "permute" is
+configured) and the dash will be left in C<@ARGV>.
+
+It is possible to get special treatment for a lone dash. This can be
+achieved by adding an option specification with an empty name, for
+example:
GetOptions ('' => \$stdio);
-A lone dash on the command line will now be legal, and set options
-variable C<$stdio>.
+A lone dash on the command line will now be a legal option, and using
+it will set variable C<$stdio>.
=head2 Argument call-back
@@ -1423,8 +1591,8 @@ When applied to the following command line:
arg1 --width=72 arg2 --width=60 arg3
-This will call
-C<process("arg1")> while C<$width> is C<80>,
+This will call
+C<process("arg1")> while C<$width> is C<80>,
C<process("arg2")> while C<$width> is C<72>, and
C<process("arg3")> while C<$width> is C<60>.
@@ -1436,10 +1604,15 @@ L<Configuring Getopt::Long>.
Getopt::Long can be configured by calling subroutine
Getopt::Long::Configure(). This subroutine takes a list of quoted
-strings, each specifying a configuration option to be set, e.g.
-C<ignore_case>, or reset, e.g. C<no_ignore_case>. Case does not
+strings, each specifying a configuration option to be enabled, e.g.
+C<ignore_case>, or disabled, e.g. C<no_ignore_case>. Case does not
matter. Multiple calls to Configure() are possible.
+Alternatively, as of version 2.24, the configuration options may be
+passed together with the C<use> statement:
+
+ use Getopt::Long qw(:config no_ignore_case bundling);
+
The following options are available:
=over 12
@@ -1449,34 +1622,53 @@ The following options are available:
This option causes all configuration options to be reset to their
default values.
+=item posix_default
+
+This option causes all configuration options to be reset to their
+default values as if the environment variable POSIXLY_CORRECT had
+been set.
+
=item auto_abbrev
Allow option names to be abbreviated to uniqueness.
-Default is set unless environment variable
-POSIXLY_CORRECT has been set, in which case C<auto_abbrev> is reset.
+Default is enabled unless environment variable
+POSIXLY_CORRECT has been set, in which case C<auto_abbrev> is disabled.
=item getopt_compat
Allow C<+> to start options.
-Default is set unless environment variable
-POSIXLY_CORRECT has been set, in which case C<getopt_compat> is reset.
+Default is enabled unless environment variable
+POSIXLY_CORRECT has been set, in which case C<getopt_compat> is disabled.
+
+=item gnu_compat
+
+C<gnu_compat> controls whether C<--opt=> is allowed, and what it should
+do. Without C<gnu_compat>, C<--opt=> gives an error. With C<gnu_compat>,
+C<--opt=> will give option C<opt> and empty value.
+This is the way GNU getopt_long() does it.
+
+=item gnu_getopt
+
+This is a short way of setting C<gnu_compat> C<bundling> C<permute>
+C<no_getopt_compat>. With C<gnu_getopt>, command line handling should be
+fully compatible with GNU getopt_long().
=item require_order
Whether command line arguments are allowed to be mixed with options.
-Default is set unless environment variable
-POSIXLY_CORRECT has been set, in which case C<require_order> is reset.
+Default is disabled unless environment variable
+POSIXLY_CORRECT has been set, in which case C<require_order> is enabled.
See also C<permute>, which is the opposite of C<require_order>.
=item permute
Whether command line arguments are allowed to be mixed with options.
-Default is set unless environment variable
-POSIXLY_CORRECT has been set, in which case C<permute> is reset.
+Default is enabled unless environment variable
+POSIXLY_CORRECT has been set, in which case C<permute> is disabled.
Note that C<permute> is the opposite of C<require_order>.
-If C<permute> is set, this means that
+If C<permute> is enabled, this means that
--foo arg1 --bar arg2 arg3
@@ -1493,7 +1685,7 @@ processed. The only exception is when C<--> is used:
will call the call-back routine for arg1 and arg2, and terminate
GetOptions() leaving C<"arg2"> in C<@ARGV>.
-If C<require_order> is set, options processing
+If C<require_order> is enabled, options processing
terminates when the first non-option is encountered.
--foo arg1 --bar arg2 arg3
@@ -1502,40 +1694,44 @@ is equivalent to
--foo -- arg1 --bar arg2 arg3
-=item bundling (default: reset)
+If C<pass_through> is also enabled, options processing will terminate
+at the first unrecognized option, or non-option, whichever comes
+first.
+
+=item bundling (default: disabled)
-Setting this option will allow single-character options to be bundled.
+Enabling this option will allow single-character options to be bundled.
To distinguish bundles from long option names, long options I<must> be
introduced with C<--> and single-character options (and bundles) with
C<->.
-Note: resetting C<bundling> also resets C<bundling_override>.
+Note: disabling C<bundling> also disables C<bundling_override>.
-=item bundling_override (default: reset)
+=item bundling_override (default: disabled)
-If C<bundling_override> is set, bundling is enabled as with
-C<bundling> but now long option names override option bundles.
+If C<bundling_override> is enabled, bundling is enabled as with
+C<bundling> but now long option names override option bundles.
-Note: resetting C<bundling_override> also resets C<bundling>.
+Note: disabling C<bundling_override> also disables C<bundling>.
B<Note:> Using option bundling can easily lead to unexpected results,
especially when mixing long options and bundles. Caveat emptor.
-=item ignore_case (default: set)
+=item ignore_case (default: enabled)
-If set, case is ignored when matching long option names. Single
+If enabled, case is ignored when matching long option names. Single
character options will be treated case-sensitive.
-Note: resetting C<ignore_case> also resets C<ignore_case_always>.
+Note: disabling C<ignore_case> also disables C<ignore_case_always>.
-=item ignore_case_always (default: reset)
+=item ignore_case_always (default: disabled)
When bundling is in effect, case is ignored on single-character
-options also.
+options also.
-Note: resetting C<ignore_case_always> also resets C<ignore_case>.
+Note: disabling C<ignore_case_always> also disables C<ignore_case>.
-=item pass_through (default: reset)
+=item pass_through (default: disabled)
Options that are unknown, ambiguous or supplied with an invalid option
value are passed through in C<@ARGV> instead of being flagged as
@@ -1543,7 +1739,9 @@ errors. This makes it possible to write wrapper scripts that process
only part of the user supplied command line arguments, and pass the
remaining options to some other program.
-This can be very confusing, especially when C<permute> is also set.
+If C<require_order> is enabled, options processing will terminate at
+the first unrecognized option, or non-option, whichever comes first.
+However, if C<permute> is enabled instead, results can become confusing.
=item prefix
@@ -1556,9 +1754,9 @@ A Perl pattern that identifies the strings that introduce options.
Default is C<(--|-|\+)> unless environment variable
POSIXLY_CORRECT has been set, in which case it is C<(--|-)>.
-=item debug (default: reset)
+=item debug (default: disabled)
-Enable copious debugging output.
+Enable debugging output.
=back
@@ -1569,11 +1767,10 @@ signalled using die() and will terminate the calling program unless
the call to Getopt::Long::GetOptions() was embedded in C<eval { ...
}>, or die() was trapped using C<$SIG{__DIE__}>.
-A return value of 1 (true) indicates success.
-
-A return status of 0 (false) indicates that the function detected one
-or more errors during option parsing. These errors are signalled using
-warn() and can be trapped with C<$SIG{__WARN__}>.
+GetOptions returns true to indicate success.
+It returns false when the function detected one or more errors during
+option parsing. These errors are signalled using warn() and can be
+trapped with C<$SIG{__WARN__}>.
Errors that can't happen are signalled using Carp::croak().
@@ -1629,21 +1826,44 @@ Now the command line may look like:
Note that to terminate options processing still requires a double dash
C<-->.
-GetOptions() will not interpret a leading C<"<>"> as option starters
-if the next argument is a reference. To force C<"<"> and C<">"> as
-option starters, use C<"><">. Confusing? Well, B<using a starter
+GetOptions() will not interpret a leading C<< "<>" >> as option starters
+if the next argument is a reference. To force C<< "<" >> and C<< ">" >> as
+option starters, use C<< "><" >>. Confusing? Well, B<using a starter
argument is strongly deprecated> anyway.
=head2 Configuration variables
Previous versions of Getopt::Long used variables for the purpose of
-configuring. Although manipulating these variables still work, it
-is strongly encouraged to use the new C<config> routine. Besides, it
-is much easier.
+configuring. Although manipulating these variables still work, it is
+strongly encouraged to use the C<Configure> routine that was introduced
+in version 2.17. Besides, it is much easier.
+
+=head1 Trouble Shooting
+
+=head2 Warning: Ignoring '!' modifier for short option
+
+This warning is issued when the '!' modifier is applied to a short
+(one-character) option and bundling is in effect. E.g.,
+
+ Getopt::Long::Configure("bundling");
+ GetOptions("foo|f!" => \$foo);
+
+Note that older Getopt::Long versions did not issue a warning, because
+the '!' modifier was applied to the first name only. This bug was
+fixed in 2.22.
+
+Solution: separate the long and short names and apply the '!' to the
+long names only, e.g.,
+
+ GetOptions("foo!" => \$foo, "f" => \$foo);
+
+=head2 GetOptions does not return a false result when an option is not supplied
+
+That's why they're called 'options'.
=head1 AUTHOR
-Johan Vromans E<lt>jvromans@squirrel.nlE<gt>
+Johan Vromans <jvromans@squirrel.nl>
=head1 COPYRIGHT AND DISCLAIMER
@@ -1660,12 +1880,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
If you do not have a copy of the GNU General Public License write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
MA 02139, USA.
=cut
# Local Variables:
-# mode: perl
# eval: (load-file "pod.el")
# End:
diff --git a/contrib/perl5/lib/IPC/Open3.pm b/contrib/perl5/lib/IPC/Open3.pm
index 99709ac..5c9c69a 100644
--- a/contrib/perl5/lib/IPC/Open3.pm
+++ b/contrib/perl5/lib/IPC/Open3.pm
@@ -44,12 +44,15 @@ by an autogenerated filehandle. If so, you must pass a valid lvalue
in the parameter slot so it can be overwritten in the caller, or
an exception will be raised.
+The filehandles may also be integers, in which case they are understood
+as file descriptors.
+
open3() returns the process ID of the child process. It doesn't return on
failure: it just raises an exception matching C</^open3:/>. However,
C<exec> failures in the child are not detected. You'll have to
trap SIGPIPE yourself.
-open2() does not wait for and reap the child process after it exits.
+open3() does not wait for and reap the child process after it exits.
Except for short programs where it's acceptable to let the operating system
take care of this, you need to do this yourself. This is normally as
simple as calling C<waitpid $pid, 0> when you're done with the process.
@@ -84,6 +87,7 @@ The order of arguments differs from that of open2().
# fixed for 5.001 by Ulrich Kunitz <kunitz@mai-koeln.com>
# ported to Win32 by Ron Schmidt, Merrill Lynch almost ended my career
# fixed for autovivving FHs, tchrist again
+# allow fd numbers to be used, by Frank Tobin
#
# $Id: open3.pl,v 1.1 1993/11/23 06:26:15 marc Exp $
#
@@ -136,6 +140,15 @@ sub xclose {
close $_[0] or croak "$Me: close($_[0]) failed: $!";
}
+sub fh_is_fd {
+ return $_[0] =~ /\A=?(\d+)\z/;
+}
+
+sub xfileno {
+ return $1 if $_[0] =~ /\A=?(\d+)\z/; # deal with fh just being an fd
+ return fileno $_[0];
+}
+
my $do_spawn = $^O eq 'os2' || $^O eq 'MSWin32';
sub _open3 {
@@ -164,9 +177,9 @@ sub _open3 {
$dup_err = ($dad_err =~ s/^[<>]&//);
# force unqualified filehandles into caller's package
- $dad_wtr = qualify $dad_wtr, $package;
- $dad_rdr = qualify $dad_rdr, $package;
- $dad_err = qualify $dad_err, $package;
+ $dad_wtr = qualify $dad_wtr, $package unless fh_is_fd($dad_wtr);
+ $dad_rdr = qualify $dad_rdr, $package unless fh_is_fd($dad_rdr);
+ $dad_err = qualify $dad_err, $package unless fh_is_fd($dad_err);
my $kid_rdr = gensym;
my $kid_wtr = gensym;
@@ -181,20 +194,20 @@ sub _open3 {
# If she wants to dup the kid's stderr onto her stdout I need to
# save a copy of her stdout before I put something else there.
if ($dad_rdr ne $dad_err && $dup_err
- && fileno($dad_err) == fileno(STDOUT)) {
+ && xfileno($dad_err) == fileno(STDOUT)) {
my $tmp = gensym;
xopen($tmp, ">&$dad_err");
$dad_err = $tmp;
}
if ($dup_wtr) {
- xopen \*STDIN, "<&$dad_wtr" if fileno(STDIN) != fileno($dad_wtr);
+ xopen \*STDIN, "<&$dad_wtr" if fileno(STDIN) != xfileno($dad_wtr);
} else {
xclose $dad_wtr;
xopen \*STDIN, "<&=" . fileno $kid_rdr;
}
if ($dup_rdr) {
- xopen \*STDOUT, ">&$dad_rdr" if fileno(STDOUT) != fileno($dad_rdr);
+ xopen \*STDOUT, ">&$dad_rdr" if fileno(STDOUT) != xfileno($dad_rdr);
} else {
xclose $dad_rdr;
xopen \*STDOUT, ">&=" . fileno $kid_wtr;
@@ -204,8 +217,8 @@ sub _open3 {
# I have to use a fileno here because in this one case
# I'm doing a dup but the filehandle might be a reference
# (from the special case above).
- xopen \*STDERR, ">&" . fileno $dad_err
- if fileno(STDERR) != fileno($dad_err);
+ xopen \*STDERR, ">&" . xfileno($dad_err)
+ if fileno(STDERR) != xfileno($dad_err);
} else {
xclose $dad_err;
xopen \*STDERR, ">&=" . fileno $kid_err;
diff --git a/contrib/perl5/lib/Math/BigFloat.pm b/contrib/perl5/lib/Math/BigFloat.pm
index d8d643c..1eefac2 100644
--- a/contrib/perl5/lib/Math/BigFloat.pm
+++ b/contrib/perl5/lib/Math/BigFloat.pm
@@ -4,6 +4,7 @@ use Math::BigInt;
use Exporter; # just for use to be happy
@ISA = (Exporter);
+$VERSION = '0.02';
use overload
'+' => sub {new Math::BigFloat &fadd},
@@ -12,9 +13,12 @@ use overload
'<=>' => sub {$_[2]? fcmp($_[1],${$_[0]}) : fcmp(${$_[0]},$_[1])},
'cmp' => sub {$_[2]? ($_[1] cmp ${$_[0]}) : (${$_[0]} cmp $_[1])},
'*' => sub {new Math::BigFloat &fmul},
-'/' => sub {new Math::BigFloat
+'/' => sub {new Math::BigFloat
$_[2]? scalar fdiv($_[1],${$_[0]}) :
scalar fdiv(${$_[0]},$_[1])},
+'%' => sub {new Math::BigFloat
+ $_[2]? scalar fmod($_[1],${$_[0]}) :
+ scalar fmod(${$_[0]},$_[1])},
'neg' => sub {new Math::BigFloat &fneg},
'abs' => sub {new Math::BigFloat &fabs},
@@ -43,12 +47,15 @@ sub stringify {
my $e = $1;
my $ln = length($n);
- if ($e > 0) {
- $n .= "0" x $e . '.';
- } elsif (abs($e) < $ln) {
- substr($n, $ln + $e, 0) = '.';
- } else {
- $n = '.' . ("0" x (abs($e) - $ln)) . $n;
+ if ( defined $e )
+ {
+ if ($e > 0) {
+ $n .= "0" x $e . '.';
+ } elsif (abs($e) < $ln) {
+ substr($n, $ln + $e, 0) = '.';
+ } else {
+ $n = '.' . ("0" x (abs($e) - $ln)) . $n;
+ }
}
$n = "-$n" if $minus;
@@ -85,6 +92,7 @@ sub fnorm { #(string) return fnum_str
# normalize number -- for internal use
sub norm { #(mantissa, exponent) return fnum_str
local($_, $exp) = @_;
+ $exp = 0 unless defined $exp;
if ($_ eq 'NaN') {
'NaN';
} else {
@@ -140,7 +148,7 @@ sub fadd { #(fnum_str, fnum_str) return fnum_str
# subtraction
sub fsub { #(fnum_str, fnum_str) return fnum_str
- fadd($_[$[],fneg($_[$[+1]));
+ fadd($_[$[],fneg($_[$[+1]));
}
# division
@@ -164,6 +172,27 @@ sub fdiv #(fnum_str, fnum_str[,scale]) return fnum_str
}
}
+# modular division
+# args are dividend, divisor
+sub fmod #(fnum_str, fnum_str) return fnum_str
+{
+ local($x,$y) = (fnorm($_[$[]),fnorm($_[$[+1]));
+ if ($x eq 'NaN' || $y eq 'NaN' || $y eq '+0E+0') {
+ 'NaN';
+ } else {
+ local($xm,$xe) = split('E',$x);
+ local($ym,$ye) = split('E',$y);
+ if ( $xe < $ye )
+ {
+ $ym .= ('0' x ($ye-$xe));
+ }
+ else
+ {
+ $xm .= ('0' x ($xe-$ye));
+ }
+ &norm(Math::BigInt::bmod($xm,$ym));
+ }
+}
# round int $q based on fraction $r/$base using $rnd_mode
sub round { #(int_str, int_str, int_str) return int_str
local($q,$r,$base) = @_;
@@ -174,12 +203,14 @@ sub round { #(int_str, int_str, int_str) return int_str
} else {
local($cmp) = Math::BigInt::bcmp(Math::BigInt::bmul($r,'+2'),$base);
if ( $cmp < 0 ||
- ($cmp == 0 &&
- ( $rnd_mode eq 'zero' ||
+ ($cmp == 0 && (
+ ($rnd_mode eq 'zero' ) ||
($rnd_mode eq '-inf' && (substr($q,$[,1) eq '+')) ||
($rnd_mode eq '+inf' && (substr($q,$[,1) eq '-')) ||
- ($rnd_mode eq 'even' && $q =~ /[24680]$/) ||
- ($rnd_mode eq 'odd' && $q =~ /[13579]$/) )) ) {
+ ($rnd_mode eq 'even' && $q =~ /[24680]$/ ) ||
+ ($rnd_mode eq 'odd' && $q =~ /[13579]$/ ) )
+ )
+ ) {
$q; # round down
} else {
Math::BigInt::badd($q, ((substr($q,$[,1) eq '-') ? '-1' : '+1'));
@@ -199,7 +230,7 @@ sub fround { #(fnum_str, scale) return fnum_str
$x;
} else {
&norm(&round(substr($xm,$[,$scale+1),
- "+0".substr($xm,$[+$scale+1,1),"+10"),
+ "+0".substr($xm,$[+$scale+1),"+1"."0" x length(substr($xm,$[+$scale+1))),
$xe+length($xm)-$scale-1);
}
}
@@ -223,15 +254,17 @@ sub ffround { #(fnum_str, scale) return fnum_str
# normalized "-0" to &round when rounding -0.006 (for
# example), purely so &round won't lose the sign.
&norm(&round(substr($xm,$[,1).'0',
- "+0".substr($xm,$[+1,1),"+10"), $scale);
+ "+0".substr($xm,$[+1),
+ "+1"."0" x length(substr($xm,$[+1))), $scale);
} else {
&norm(&round(substr($xm,$[,$xe),
- "+0".substr($xm,$[+$xe,1),"+10"), $scale);
+ "+0".substr($xm,$[+$xe),
+ "+1"."0" x length(substr($xm,$[+$xe))), $scale);
}
}
}
}
-
+
# compare 2 values returns one of undef, <0, =0, >0
# returns undef if either or both input value are not numbers
sub fcmp #(fnum_str, fnum_str) return cond_code
@@ -244,9 +277,17 @@ sub fcmp #(fnum_str, fnum_str) return cond_code
if ($xm eq '+0' || $ym eq '+0') {
return $xm <=> $ym;
}
- ord($y) <=> ord($x)
- || ($xe <=> $ye) * (substr($x,$[,1).'1')
- || Math::BigInt::cmp($xm,$ym);
+ if ( $xe < $ye ) # adjust the exponents to be equal
+ {
+ $ym .= '0' x ($ye - $xe);
+ $ye = $xe;
+ }
+ elsif ( $ye < $xe ) # same here
+ {
+ $xm .= '0' x ($xe - $ye);
+ $xe = $ye;
+ }
+ return Math::BigInt::cmp($xm,$ym);
}
}
@@ -286,6 +327,7 @@ Math::BigFloat - Arbitrary length float math package
$f->fsub(NSTR) return NSTR subtraction
$f->fmul(NSTR) return NSTR multiplication
$f->fdiv(NSTR[,SCALE]) returns NSTR division to SCALE places
+ $f->fmod(NSTR) returns NSTR modular remainder
$f->fneg() return NSTR negation
$f->fabs() return NSTR absolute value
$f->fcmp(NSTR) return CODE compare undef,<0,=0,>0
@@ -313,7 +355,7 @@ have embedded whitespace.
An input parameter was "Not a Number" or divide by zero or sqrt of
negative number.
-=item Division is computed to
+=item Division is computed to
C<max($Math::BigFloat::div_scale,length(dividend)+length(divisor))>
digits by default.
@@ -352,5 +394,5 @@ as follows:
=head1 AUTHOR
Mark Biggar
-
+Patches by John Peacock Apr 2001
=cut
diff --git a/contrib/perl5/lib/Math/BigInt.pm b/contrib/perl5/lib/Math/BigInt.pm
index a43969c..066577d 100644
--- a/contrib/perl5/lib/Math/BigInt.pm
+++ b/contrib/perl5/lib/Math/BigInt.pm
@@ -1,4 +1,5 @@
package Math::BigInt;
+$VERSION='0.01';
use overload
'+' => sub {new Math::BigInt &badd},
@@ -51,6 +52,11 @@ sub import {
$zero = 0;
+# overcome a floating point problem on certain osnames (posix-bc, os390)
+BEGIN {
+ my $x = 100000.0;
+ my $use_mult = int($x*1e-5)*1e5 == $x ? 1 : 0;
+}
# normalize string form of number. Strip leading zeros. Strip any
# white space and add a sign, if missing.
@@ -227,8 +233,14 @@ sub mul { #(*int_num_array, *int_num_array) return int_num_array
($car, $cty) = (0, $[);
for $y (@y) {
$prod = $x * $y + ($prod[$cty] || 0) + $car;
+ if ($use_mult) {
$prod[$cty++] =
$prod - ($car = int($prod * 1e-5)) * 1e5;
+ }
+ else {
+ $prod[$cty++] =
+ $prod - ($car = int($prod / 1e5)) * 1e5;
+ }
}
$prod[$cty] += $car if $car;
$x = shift @prod;
@@ -253,12 +265,22 @@ sub bdiv { #(dividend: num_str, divisor: num_str) return num_str
if (($dd = int(1e5/($y[$#y]+1))) != 1) {
for $x (@x) {
$x = $x * $dd + $car;
+ if ($use_mult) {
$x -= ($car = int($x * 1e-5)) * 1e5;
+ }
+ else {
+ $x -= ($car = int($x / 1e5)) * 1e5;
+ }
}
push(@x, $car); $car = 0;
for $y (@y) {
$y = $y * $dd + $car;
+ if ($use_mult) {
$y -= ($car = int($y * 1e-5)) * 1e5;
+ }
+ else {
+ $y -= ($car = int($y / 1e5)) * 1e5;
+ }
}
}
else {
@@ -275,7 +297,12 @@ sub bdiv { #(dividend: num_str, divisor: num_str) return num_str
($car, $bar) = (0,0);
for ($y = $[, $x = $#x-$#y+$[-1; $y <= $#y; ++$y,++$x) {
$prd = $q * $y[$y] + $car;
+ if ($use_mult) {
$prd -= ($car = int($prd * 1e-5)) * 1e5;
+ }
+ else {
+ $prd -= ($car = int($prd / 1e5)) * 1e5;
+ }
$x[$x] += 1e5 if ($bar = (($x[$x] -= $prd + $bar) < 0));
}
if ($x[$#x] < $car + $bar) {
diff --git a/contrib/perl5/lib/Math/Complex.pm b/contrib/perl5/lib/Math/Complex.pm
index 1a47f4a..9812513 100644
--- a/contrib/perl5/lib/Math/Complex.pm
+++ b/contrib/perl5/lib/Math/Complex.pm
@@ -5,17 +5,39 @@
# -- Daniel S. Lewart Since Sep 1997
#
-require Exporter;
package Math::Complex;
-use 5.005_64;
-use strict;
+our($VERSION, @ISA, @EXPORT, %EXPORT_TAGS, $Inf);
+
+$VERSION = 1.31;
+
+BEGIN {
+ unless ($^O eq 'unicosmk') {
+ my $e = $!;
+ # We do want an arithmetic overflow, Inf INF inf Infinity:.
+ undef $Inf unless eval <<'EOE' and $Inf =~ /^inf(?:inity)?$/i;
+ local $SIG{FPE} = sub {die};
+ my $t = CORE::exp 30;
+ $Inf = CORE::exp $t;
+EOE
+ if (!defined $Inf) { # Try a different method
+ undef $Inf unless eval <<'EOE' and $Inf =~ /^inf(?:inity)?$/i;
+ local $SIG{FPE} = sub {die};
+ my $t = 1;
+ $Inf = $t + "1e99999999999999999999999999999999";
+EOE
+ }
+ $! = $e; # Clear ERANGE.
+ }
+ $Inf = "Inf" if !defined $Inf || !($Inf > 0); # Desperation.
+}
-our($VERSION, @ISA, @EXPORT, %EXPORT_TAGS);
+use strict;
-my ( $i, $ip2, %logn );
+my $i;
+my %LOGN;
-$VERSION = sprintf("%s", q$Id: Complex.pm,v 1.26 1998/11/01 00:00:00 dsl Exp $ =~ /(\d+\.\d+)/);
+require Exporter;
@ISA = qw(Exporter);
@@ -49,6 +71,7 @@ use overload
'*' => \&multiply,
'/' => \&divide,
'**' => \&power,
+ '==' => \&numeq,
'<=>' => \&spaceship,
'neg' => \&negate,
'~' => \&conjugate,
@@ -66,7 +89,6 @@ use overload
# Package "privates"
#
-my $package = 'Math::Complex'; # Package name
my %DISPLAY_FORMAT = ('style' => 'cartesian',
'polar_pretty_print' => 1);
my $eps = 1e-14; # Epsilon
@@ -228,6 +250,13 @@ sub i () {
}
#
+# ip2
+#
+# Half of i.
+#
+sub ip2 () { i / 2 }
+
+#
# Attribute access/set routines
#
@@ -262,7 +291,8 @@ sub update_polar {
my ($x, $y) = @{$self->{'cartesian'}};
$self->{p_dirty} = 0;
return $self->{'polar'} = [0, 0] if $x == 0 && $y == 0;
- return $self->{'polar'} = [CORE::sqrt($x*$x + $y*$y), CORE::atan2($y, $x)];
+ return $self->{'polar'} = [CORE::sqrt($x*$x + $y*$y),
+ CORE::atan2($y, $x)];
}
#
@@ -342,7 +372,7 @@ sub _divbyzero {
if (defined $_[1]) {
$mess .= "(Because in the definition of $_[0], the divisor ";
- $mess .= "$_[1] " unless ($_[1] eq '0');
+ $mess .= "$_[1] " unless ("$_[1]" eq '0');
$mess .= "is 0)\n";
}
@@ -416,8 +446,8 @@ sub power {
return 1 if $z2 == 0 || $z1 == 1;
return 0 if $z1 == 0 && Re($z2) > 0;
}
- my $w = $inverted ? CORE::exp($z1 * CORE::log($z2))
- : CORE::exp($z2 * CORE::log($z1));
+ my $w = $inverted ? &exp($z1 * &log($z2))
+ : &exp($z2 * &log($z1));
# If both arguments cartesian, return cartesian, else polar.
return $z1->{c_dirty} == 0 &&
(not ref $z2 or $z2->{c_dirty} == 0) ?
@@ -440,6 +470,19 @@ sub spaceship {
}
#
+# (numeq)
+#
+# Computes z1 == z2.
+#
+# (Required in addition to spaceship() because of NaNs.)
+sub numeq {
+ my ($z1, $z2, $inverted) = @_;
+ my ($re1, $im1) = ref $z1 ? @{$z1->cartesian} : ($z1, 0);
+ my ($re2, $im2) = ref $z2 ? @{$z2->cartesian} : ($z2, 0);
+ return $re1 == $re2 && $im1 == $im2 ? 1 : 0;
+}
+
+#
# (negate)
#
# Computes -z.
@@ -477,7 +520,13 @@ sub conjugate {
#
sub abs {
my ($z, $rho) = @_;
- return $z unless ref $z;
+ unless (ref $z) {
+ if (@_ == 2) {
+ $_[0] = $_[1];
+ } else {
+ return CORE::abs($z);
+ }
+ }
if (defined $rho) {
$z->{'polar'} = [ $rho, ${$z->polar}[1] ];
$z->{p_dirty} = 0;
@@ -533,7 +582,8 @@ sub arg {
sub sqrt {
my ($z) = @_;
my ($re, $im) = ref $z ? @{$z->cartesian} : ($z, 0);
- return $re < 0 ? cplx(0, CORE::sqrt(-$re)) : CORE::sqrt($re) if $im == 0;
+ return $re < 0 ? cplx(0, CORE::sqrt(-$re)) : CORE::sqrt($re)
+ if $im == 0;
my ($r, $t) = @{$z->polar};
return (ref $z)->emake(CORE::sqrt($r), $t/2);
}
@@ -547,9 +597,12 @@ sub sqrt {
#
sub cbrt {
my ($z) = @_;
- return $z < 0 ? -CORE::exp(CORE::log(-$z)/3) : ($z > 0 ? CORE::exp(CORE::log($z)/3): 0)
+ return $z < 0 ?
+ -CORE::exp(CORE::log(-$z)/3) :
+ ($z > 0 ? CORE::exp(CORE::log($z)/3): 0)
unless ref $z;
my ($r, $t) = @{$z->polar};
+ return 0 if $r == 0;
return (ref $z)->emake(CORE::exp(CORE::log($r)/3), $t/3);
}
@@ -559,7 +612,7 @@ sub cbrt {
# Die on bad root.
#
sub _rootbad {
- my $mess = "Root $_[0] not defined, root must be positive integer.\n";
+ my $mess = "Root $_[0] illegal, root rank must be positive integer.\n";
my @up = caller(1);
@@ -581,7 +634,8 @@ sub _rootbad {
sub root {
my ($z, $n) = @_;
_rootbad($n) if ($n < 1 or int($n) != $n);
- my ($r, $t) = ref $z ? @{$z->polar} : (CORE::abs($z), $z >= 0 ? 0 : pi);
+ my ($r, $t) = ref $z ?
+ @{$z->polar} : (CORE::abs($z), $z >= 0 ? 0 : pi);
my @root;
my $k;
my $theta_inc = pit2 / $n;
@@ -620,7 +674,7 @@ sub Re {
#
sub Im {
my ($z, $Im) = @_;
- return $z unless ref $z;
+ return 0 unless ref $z;
if (defined $Im) {
$z->{'cartesian'} = [ ${$z->cartesian}[0], $Im ];
$z->{c_dirty} = 0;
@@ -723,9 +777,9 @@ sub log10 {
sub logn {
my ($z, $n) = @_;
$z = cplx($z, 0) unless ref $z;
- my $logn = $logn{$n};
- $logn = $logn{$n} = CORE::log($n) unless defined $logn; # Cache log(n)
- return CORE::log($z) / $logn;
+ my $logn = $LOGN{$n};
+ $logn = $LOGN{$n} = CORE::log($n) unless defined $logn; # Cache log(n)
+ return &log($z) / $logn;
}
#
@@ -735,11 +789,14 @@ sub logn {
#
sub cos {
my ($z) = @_;
+ return CORE::cos($z) unless ref $z;
my ($x, $y) = @{$z->cartesian};
my $ey = CORE::exp($y);
- my $ey_1 = 1 / $ey;
- return (ref $z)->make(CORE::cos($x) * ($ey + $ey_1)/2,
- CORE::sin($x) * ($ey_1 - $ey)/2);
+ my $sx = CORE::sin($x);
+ my $cx = CORE::cos($x);
+ my $ey_1 = $ey ? 1 / $ey : $Inf;
+ return (ref $z)->make($cx * ($ey + $ey_1)/2,
+ $sx * ($ey_1 - $ey)/2);
}
#
@@ -749,11 +806,14 @@ sub cos {
#
sub sin {
my ($z) = @_;
+ return CORE::sin($z) unless ref $z;
my ($x, $y) = @{$z->cartesian};
my $ey = CORE::exp($y);
- my $ey_1 = 1 / $ey;
- return (ref $z)->make(CORE::sin($x) * ($ey + $ey_1)/2,
- CORE::cos($x) * ($ey - $ey_1)/2);
+ my $sx = CORE::sin($x);
+ my $cx = CORE::cos($x);
+ my $ey_1 = $ey ? 1 / $ey : $Inf;
+ return (ref $z)->make($sx * ($ey + $ey_1)/2,
+ $cx * ($ey - $ey_1)/2);
}
#
@@ -763,9 +823,9 @@ sub sin {
#
sub tan {
my ($z) = @_;
- my $cz = CORE::cos($z);
- _divbyzero "tan($z)", "cos($z)" if (CORE::abs($cz) < $eps);
- return CORE::sin($z) / $cz;
+ my $cz = &cos($z);
+ _divbyzero "tan($z)", "cos($z)" if $cz == 0;
+ return &sin($z) / $cz;
}
#
@@ -775,7 +835,7 @@ sub tan {
#
sub sec {
my ($z) = @_;
- my $cz = CORE::cos($z);
+ my $cz = &cos($z);
_divbyzero "sec($z)", "cos($z)" if ($cz == 0);
return 1 / $cz;
}
@@ -787,7 +847,7 @@ sub sec {
#
sub csc {
my ($z) = @_;
- my $sz = CORE::sin($z);
+ my $sz = &sin($z);
_divbyzero "csc($z)", "sin($z)" if ($sz == 0);
return 1 / $sz;
}
@@ -806,9 +866,9 @@ sub cosec { Math::Complex::csc(@_) }
#
sub cot {
my ($z) = @_;
- my $sz = CORE::sin($z);
+ my $sz = &sin($z);
_divbyzero "cot($z)", "sin($z)" if ($sz == 0);
- return CORE::cos($z) / $sz;
+ return &cos($z) / $sz;
}
#
@@ -825,8 +885,11 @@ sub cotan { Math::Complex::cot(@_) }
#
sub acos {
my $z = $_[0];
- return CORE::atan2(CORE::sqrt(1-$z*$z), $z) if (! ref $z) && CORE::abs($z) <= 1;
- my ($x, $y) = ref $z ? @{$z->cartesian} : ($z, 0);
+ return CORE::atan2(CORE::sqrt(1-$z*$z), $z)
+ if (! ref $z) && CORE::abs($z) <= 1;
+ $z = cplx($z, 0) unless ref $z;
+ my ($x, $y) = @{$z->cartesian};
+ return 0 if $x == 1 && $y == 0;
my $t1 = CORE::sqrt(($x+1)*($x+1) + $y*$y);
my $t2 = CORE::sqrt(($x-1)*($x-1) + $y*$y);
my $alpha = ($t1 + $t2)/2;
@@ -837,7 +900,7 @@ sub acos {
my $u = CORE::atan2(CORE::sqrt(1-$beta*$beta), $beta);
my $v = CORE::log($alpha + CORE::sqrt($alpha*$alpha-1));
$v = -$v if $y > 0 || ($y == 0 && $x < -1);
- return __PACKAGE__->make($u, $v);
+ return (ref $z)->make($u, $v);
}
#
@@ -847,8 +910,11 @@ sub acos {
#
sub asin {
my $z = $_[0];
- return CORE::atan2($z, CORE::sqrt(1-$z*$z)) if (! ref $z) && CORE::abs($z) <= 1;
- my ($x, $y) = ref $z ? @{$z->cartesian} : ($z, 0);
+ return CORE::atan2($z, CORE::sqrt(1-$z*$z))
+ if (! ref $z) && CORE::abs($z) <= 1;
+ $z = cplx($z, 0) unless ref $z;
+ my ($x, $y) = @{$z->cartesian};
+ return 0 if $x == 0 && $y == 0;
my $t1 = CORE::sqrt(($x+1)*($x+1) + $y*$y);
my $t2 = CORE::sqrt(($x-1)*($x-1) + $y*$y);
my $alpha = ($t1 + $t2)/2;
@@ -859,7 +925,7 @@ sub asin {
my $u = CORE::atan2($beta, CORE::sqrt(1-$beta*$beta));
my $v = -CORE::log($alpha + CORE::sqrt($alpha*$alpha-1));
$v = -$v if $y > 0 || ($y == 0 && $x < -1);
- return __PACKAGE__->make($u, $v);
+ return (ref $z)->make($u, $v);
}
#
@@ -870,11 +936,12 @@ sub asin {
sub atan {
my ($z) = @_;
return CORE::atan2($z, 1) unless ref $z;
+ my ($x, $y) = ref $z ? @{$z->cartesian} : ($z, 0);
+ return 0 if $x == 0 && $y == 0;
_divbyzero "atan(i)" if ( $z == i);
- _divbyzero "atan(-i)" if (-$z == i);
- my $log = CORE::log((i + $z) / (i - $z));
- $ip2 = 0.5 * i unless defined $ip2;
- return $ip2 * $log;
+ _logofzero "atan(-i)" if (-$z == i); # -i is a bad file test...
+ my $log = &log((i + $z) / (i - $z));
+ return ip2 * $log;
}
#
@@ -913,10 +980,11 @@ sub acosec { Math::Complex::acsc(@_) }
#
sub acot {
my ($z) = @_;
- _divbyzero "acot(0)" if (CORE::abs($z) < $eps);
- return ($z >= 0) ? CORE::atan2(1, $z) : CORE::atan2(-1, -$z) unless ref $z;
- _divbyzero "acot(i)" if (CORE::abs($z - i) < $eps);
- _logofzero "acot(-i)" if (CORE::abs($z + i) < $eps);
+ _divbyzero "acot(0)" if $z == 0;
+ return ($z >= 0) ? CORE::atan2(1, $z) : CORE::atan2(-1, -$z)
+ unless ref $z;
+ _divbyzero "acot(i)" if ($z - i == 0);
+ _logofzero "acot(-i)" if ($z + i == 0);
return atan(1 / $z);
}
@@ -937,11 +1005,11 @@ sub cosh {
my $ex;
unless (ref $z) {
$ex = CORE::exp($z);
- return ($ex + 1/$ex)/2;
+ return $ex ? ($ex + 1/$ex)/2 : $Inf;
}
my ($x, $y) = @{$z->cartesian};
$ex = CORE::exp($x);
- my $ex_1 = 1 / $ex;
+ my $ex_1 = $ex ? 1 / $ex : $Inf;
return (ref $z)->make(CORE::cos($y) * ($ex + $ex_1)/2,
CORE::sin($y) * ($ex - $ex_1)/2);
}
@@ -955,12 +1023,15 @@ sub sinh {
my ($z) = @_;
my $ex;
unless (ref $z) {
+ return 0 if $z == 0;
$ex = CORE::exp($z);
- return ($ex - 1/$ex)/2;
+ return $ex ? ($ex - 1/$ex)/2 : "-$Inf";
}
my ($x, $y) = @{$z->cartesian};
+ my $cy = CORE::cos($y);
+ my $sy = CORE::sin($y);
$ex = CORE::exp($x);
- my $ex_1 = 1 / $ex;
+ my $ex_1 = $ex ? 1 / $ex : $Inf;
return (ref $z)->make(CORE::cos($y) * ($ex - $ex_1)/2,
CORE::sin($y) * ($ex + $ex_1)/2);
}
@@ -1016,7 +1087,7 @@ sub cosech { Math::Complex::csch(@_) }
sub coth {
my ($z) = @_;
my $sz = sinh($z);
- _divbyzero "coth($z)", "sinh($z)" if ($sz == 0);
+ _divbyzero "coth($z)", "sinh($z)" if $sz == 0;
return cosh($z) / $sz;
}
@@ -1035,25 +1106,44 @@ sub cotanh { Math::Complex::coth(@_) }
sub acosh {
my ($z) = @_;
unless (ref $z) {
- return CORE::log($z + CORE::sqrt($z*$z-1)) if $z >= 1;
$z = cplx($z, 0);
}
my ($re, $im) = @{$z->cartesian};
if ($im == 0) {
- return cplx(CORE::log($re + CORE::sqrt($re*$re - 1)), 0) if $re >= 1;
- return cplx(0, CORE::atan2(CORE::sqrt(1-$re*$re), $re)) if CORE::abs($re) <= 1;
+ return CORE::log($re + CORE::sqrt($re*$re - 1))
+ if $re >= 1;
+ return cplx(0, CORE::atan2(CORE::sqrt(1 - $re*$re), $re))
+ if CORE::abs($re) < 1;
}
- return CORE::log($z + CORE::sqrt($z*$z - 1));
+ my $t = &sqrt($z * $z - 1) + $z;
+ # Try Taylor if looking bad (this usually means that
+ # $z was large negative, therefore the sqrt is really
+ # close to abs(z), summing that with z...)
+ $t = 1/(2 * $z) - 1/(8 * $z**3) + 1/(16 * $z**5) - 5/(128 * $z**7)
+ if $t == 0;
+ my $u = &log($t);
+ $u->Im(-$u->Im) if $re < 0 && $im == 0;
+ return $re < 0 ? -$u : $u;
}
#
# asinh
#
-# Computes the arc hyperbolic sine asinh(z) = log(z + sqrt(z*z-1))
+# Computes the arc hyperbolic sine asinh(z) = log(z + sqrt(z*z+1))
#
sub asinh {
my ($z) = @_;
- return CORE::log($z + CORE::sqrt($z*$z + 1));
+ unless (ref $z) {
+ my $t = $z + CORE::sqrt($z*$z + 1);
+ return CORE::log($t) if $t;
+ }
+ my $t = &sqrt($z * $z + 1) + $z;
+ # Try Taylor if looking bad (this usually means that
+ # $z was large negative, therefore the sqrt is really
+ # close to abs(z), summing that with z...)
+ $t = 1/(2 * $z) - 1/(8 * $z**3) + 1/(16 * $z**5) - 5/(128 * $z**7)
+ if $t == 0;
+ return &log($t);
}
#
@@ -1067,9 +1157,9 @@ sub atanh {
return CORE::log((1 + $z)/(1 - $z))/2 if CORE::abs($z) < 1;
$z = cplx($z, 0);
}
- _divbyzero 'atanh(1)', "1 - $z" if ($z == 1);
- _logofzero 'atanh(-1)' if ($z == -1);
- return 0.5 * CORE::log((1 + $z) / (1 - $z));
+ _divbyzero 'atanh(1)', "1 - $z" if (1 - $z == 0);
+ _logofzero 'atanh(-1)' if (1 + $z == 0);
+ return 0.5 * &log((1 + $z) / (1 - $z));
}
#
@@ -1079,7 +1169,7 @@ sub atanh {
#
sub asech {
my ($z) = @_;
- _divbyzero 'asech(0)', $z if ($z == 0);
+ _divbyzero 'asech(0)', "$z" if ($z == 0);
return acosh(1 / $z);
}
@@ -1108,14 +1198,14 @@ sub acosech { Math::Complex::acsch(@_) }
#
sub acoth {
my ($z) = @_;
- _divbyzero 'acoth(0)' if (CORE::abs($z) < $eps);
+ _divbyzero 'acoth(0)' if ($z == 0);
unless (ref $z) {
return CORE::log(($z + 1)/($z - 1))/2 if CORE::abs($z) > 1;
$z = cplx($z, 0);
}
- _divbyzero 'acoth(1)', "$z - 1" if (CORE::abs($z - 1) < $eps);
- _logofzero 'acoth(-1)', "1 / $z" if (CORE::abs($z + 1) < $eps);
- return CORE::log((1 + $z) / ($z - 1)) / 2;
+ _divbyzero 'acoth(1)', "$z - 1" if ($z - 1 == 0);
+ _logofzero 'acoth(-1)', "1 + $z" if (1 + $z == 0);
+ return &log((1 + $z) / ($z - 1)) / 2;
}
#
@@ -1141,8 +1231,8 @@ sub atan2 {
($re2, $im2) = ref $z2 ? @{$z2->cartesian} : ($z2, 0);
}
if ($im2 == 0) {
- return cplx(CORE::atan2($re1, $re2), 0) if $im1 == 0;
- return cplx(($im1<=>0) * pip2, 0) if $re2 == 0;
+ return CORE::atan2($re1, $re2) if $im1 == 0;
+ return ($im1<=>0) * pip2 if $re2 == 0;
}
my $w = atan($z1/$z2);
my ($u, $v) = ref $w ? @{$w->cartesian} : ($w, 0);
@@ -1173,23 +1263,15 @@ sub display_format {
my %obj = %{$self->{display_format}};
@display_format{keys %obj} = values %obj;
}
- if (@_ == 1) {
- $display_format{style} = shift;
- } else {
- my %new = @_;
- @display_format{keys %new} = values %new;
- }
- } else { # Called as a class method
- if (@_ = 1) {
- $display_format{style} = $self;
- } else {
- my %new = @_;
- @display_format{keys %new} = values %new;
- }
- undef $self;
+ }
+ if (@_ == 1) {
+ $display_format{style} = shift;
+ } else {
+ my %new = @_;
+ @display_format{keys %new} = values %new;
}
- if (defined $self) {
+ if (ref $self) { # Called as an object method
$self->{display_format} = { %display_format };
return
wantarray ?
@@ -1197,6 +1279,7 @@ sub display_format {
$self->{display_format}->{style};
}
+ # Called as a class method
%DISPLAY_FORMAT = %display_format;
return
wantarray ?
@@ -1235,67 +1318,58 @@ sub stringify_cartesian {
my ($x, $y) = @{$z->cartesian};
my ($re, $im);
- $x = int($x + ($x < 0 ? -1 : 1) * $eps)
- if int(CORE::abs($x)) != int(CORE::abs($x) + $eps);
- $y = int($y + ($y < 0 ? -1 : 1) * $eps)
- if int(CORE::abs($y)) != int(CORE::abs($y) + $eps);
-
- $re = "$x" if CORE::abs($x) >= $eps;
-
my %format = $z->display_format;
my $format = $format{format};
- if ($y == 1) { $im = 'i' }
- elsif ($y == -1) { $im = '-i' }
- elsif (CORE::abs($y) >= $eps) {
- $im = (defined $format ? sprintf($format, $y) : $y) . "i";
+ if ($x) {
+ if ($x =~ /^NaN[QS]?$/i) {
+ $re = $x;
+ } else {
+ if ($x =~ /^-?$Inf$/oi) {
+ $re = $x;
+ } else {
+ $re = defined $format ? sprintf($format, $x) : $x;
+ }
+ }
+ } else {
+ undef $re;
}
- my $str = '';
- $str = defined $format ? sprintf($format, $re) : $re
- if defined $re;
+ if ($y) {
+ if ($y =~ /^(NaN[QS]?)$/i) {
+ $im = $y;
+ } else {
+ if ($y =~ /^-?$Inf$/oi) {
+ $im = $y;
+ } else {
+ $im =
+ defined $format ?
+ sprintf($format, $y) :
+ ($y == 1 ? "" : ($y == -1 ? "-" : $y));
+ }
+ }
+ $im .= "i";
+ } else {
+ undef $im;
+ }
+
+ my $str = $re;
+
if (defined $im) {
if ($y < 0) {
$str .= $im;
- } elsif ($y > 0) {
+ } elsif ($y > 0 || $im =~ /^NaN[QS]?i$/i) {
$str .= "+" if defined $re;
$str .= $im;
}
+ } elsif (!defined $re) {
+ $str = "0";
}
return $str;
}
-# Helper for stringify_polar, a Greatest Common Divisor with a memory.
-
-sub _gcd {
- my ($a, $b) = @_;
-
- use integer;
-
- # Loops forever if given negative inputs.
-
- if ($b and $a > $b) { return gcd($a % $b, $b) }
- elsif ($a and $b > $a) { return gcd($b % $a, $a) }
- else { return $a ? $a : $b }
-}
-
-my %gcd;
-
-sub gcd {
- my ($a, $b) = @_;
-
- my $id = "$a $b";
-
- unless (exists $gcd{$id}) {
- $gcd{$id} = _gcd($a, $b);
- $gcd{"$b $a"} = $gcd{$id};
- }
-
- return $gcd{$id};
-}
-
#
# ->stringify_polar
#
@@ -1306,74 +1380,52 @@ sub stringify_polar {
my ($r, $t) = @{$z->polar};
my $theta;
- return '[0,0]' if $r <= $eps;
-
my %format = $z->display_format;
+ my $format = $format{format};
- my $nt = $t / pit2;
- $nt = ($nt - int($nt)) * pit2;
- $nt += pit2 if $nt < 0; # Range [0, 2pi]
-
- if (CORE::abs($nt) <= $eps) { $theta = 0 }
- elsif (CORE::abs(pi-$nt) <= $eps) { $theta = 'pi' }
-
- if (defined $theta) {
- $r = int($r + ($r < 0 ? -1 : 1) * $eps)
- if int(CORE::abs($r)) != int(CORE::abs($r) + $eps);
- $theta = int($theta + ($theta < 0 ? -1 : 1) * $eps)
- if ($theta ne 'pi' and
- int(CORE::abs($theta)) != int(CORE::abs($theta) + $eps));
- return "\[$r,$theta\]";
+ if ($t =~ /^NaN[QS]?$/i || $t =~ /^-?$Inf$/oi) {
+ $theta = $t;
+ } elsif ($t == pi) {
+ $theta = "pi";
+ } elsif ($r == 0 || $t == 0) {
+ $theta = defined $format ? sprintf($format, $t) : $t;
}
+ return "[$r,$theta]" if defined $theta;
+
#
- # Okay, number is not a real. Try to identify pi/n and friends...
+ # Try to identify pi/n and friends.
#
- $nt -= pit2 if $nt > pi;
-
- if ($format{polar_pretty_print} && CORE::abs($nt) >= deg1) {
- my ($n, $k, $kpi);
-
- for ($k = 1, $kpi = pi; $k < 10; $k++, $kpi += pi) {
- $n = int($kpi / $nt + ($nt > 0 ? 1 : -1) * 0.5);
- if (CORE::abs($kpi/$n - $nt) <= $eps) {
- $n = CORE::abs($n);
- my $gcd = gcd($k, $n);
- if ($gcd > 1) {
- $k /= $gcd;
- $n /= $gcd;
- }
- next if $n > 360;
- $theta = ($nt < 0 ? '-':'').
- ($k == 1 ? 'pi':"${k}pi");
- $theta .= '/'.$n if $n > 1;
+ $t -= int(CORE::abs($t) / pit2) * pit2;
+
+ if ($format{polar_pretty_print} && $t) {
+ my ($a, $b);
+ for $a (2..9) {
+ $b = $t * $a / pi;
+ if ($b =~ /^-?\d+$/) {
+ $b = $b < 0 ? "-" : "" if CORE::abs($b) == 1;
+ $theta = "${b}pi/$a";
last;
}
}
}
- $theta = $nt unless defined $theta;
-
- $r = int($r + ($r < 0 ? -1 : 1) * $eps)
- if int(CORE::abs($r)) != int(CORE::abs($r) + $eps);
- $theta = int($theta + ($theta < 0 ? -1 : 1) * $eps)
- if ($theta !~ m(^-?\d*pi/\d+$) and
- int(CORE::abs($theta)) != int(CORE::abs($theta) + $eps));
-
- my $format = $format{format};
if (defined $format) {
$r = sprintf($format, $r);
- $theta = sprintf($format, $theta);
+ $theta = sprintf($format, $theta) unless defined $theta;
+ } else {
+ $theta = $t unless defined $theta;
}
- return "\[$r,$theta\]";
+ return "[$r,$theta]";
}
1;
__END__
=pod
+
=head1 NAME
Math::Complex - complex numbers and associated mathematical functions
@@ -1695,7 +1747,7 @@ For instance:
print "j = $j\n"; # Prints "j = -0.5+0.866025403784439i"
The polar style attempts to emphasize arguments like I<k*pi/n>
-(where I<n> is a positive integer and I<k> an integer within [-9,+9]),
+(where I<n> is a positive integer and I<k> an integer within [-9, +9]),
this is called I<polar pretty-printing>.
=head2 CHANGED IN PERL 5.6
@@ -1705,29 +1757,33 @@ C<display_format> object method can now be called using
a parameter hash instead of just a one parameter.
The old display format style, which can have values C<"cartesian"> or
-C<"polar">, can be changed using the C<"style"> parameter. (The one
-parameter calling convention also still works.)
+C<"polar">, can be changed using the C<"style"> parameter.
+
+ $j->display_format(style => "polar");
+
+The one parameter calling convention also still works.
+
+ $j->display_format("polar");
There are two new display parameters.
-The first one is C<"format">, which is a sprintf()-style format
-string to be used for both parts of the complex number(s). The
-default is C<undef>, which corresponds usually (this is somewhat
-system-dependent) to C<"%.15g">. You can revert to the default by
-setting the format string to C<undef>.
+The first one is C<"format">, which is a sprintf()-style format string
+to be used for both numeric parts of the complex number(s). The is
+somewhat system-dependent but most often it corresponds to C<"%.15g">.
+You can revert to the default by setting the C<format> to C<undef>.
# the $j from the above example
$j->display_format('format' => '%.5f');
print "j = $j\n"; # Prints "j = -0.50000+0.86603i"
- $j->display_format('format' => '%.6f');
+ $j->display_format('format' => undef);
print "j = $j\n"; # Prints "j = -0.5+0.86603i"
Notice that this affects also the return values of the
C<display_format> methods: in list context the whole parameter hash
-will be returned, as opposed to only the style parameter value. If
-you want to know the whole truth for a complex number, you must call
-both the class method and the object method:
+will be returned, as opposed to only the style parameter value.
+This is a potential incompatibility with earlier versions if you
+have been calling the C<display_format> method in list context.
The second new display parameter is C<"polar_pretty_print">, which can
be set to true or false, the default being true. See the previous
@@ -1791,8 +1847,7 @@ is any integer.
Note that because we are operating on approximations of real numbers,
these errors can happen when merely `too close' to the singularities
-listed above. For example C<tan(2*atan2(1,1)+1e-15)> will die of
-division by zero.
+listed above.
=head1 ERRORS DUE TO INDIGESTIBLE ARGUMENTS
diff --git a/contrib/perl5/lib/Math/Trig.pm b/contrib/perl5/lib/Math/Trig.pm
index 492706c..b28f150 100644
--- a/contrib/perl5/lib/Math/Trig.pm
+++ b/contrib/perl5/lib/Math/Trig.pm
@@ -36,14 +36,15 @@ my @rdlcnv = qw(cartesian_to_cylindrical
%EXPORT_TAGS = ('radial' => [ @rdlcnv ]);
-sub pi2 () { 2 * pi } # use constant generates warning
-sub pip2 () { pi / 2 } # use constant generates warning
-use constant DR => pi2/360;
-use constant RD => 360/pi2;
-use constant DG => 400/360;
-use constant GD => 360/400;
-use constant RG => 400/pi2;
-use constant GR => pi2/400;
+sub pi2 () { 2 * pi }
+sub pip2 () { pi / 2 }
+
+sub DR () { pi2/360 }
+sub RD () { 360/pi2 }
+sub DG () { 400/360 }
+sub GD () { 360/400 }
+sub RG () { 400/pi2 }
+sub GR () { pi2/400 }
#
# Truncating remainder.
@@ -58,17 +59,23 @@ sub remt ($$) {
# Angle conversions.
#
-sub rad2deg ($) { remt(RD * $_[0], 360) }
+sub rad2rad($) { remt($_[0], pi2) }
+
+sub deg2deg($) { remt($_[0], 360) }
+
+sub grad2grad($) { remt($_[0], 400) }
-sub deg2rad ($) { remt(DR * $_[0], pi2) }
+sub rad2deg ($;$) { my $d = RD * $_[0]; $_[1] ? $d : deg2deg($d) }
-sub grad2deg ($) { remt(GD * $_[0], 360) }
+sub deg2rad ($;$) { my $d = DR * $_[0]; $_[1] ? $d : rad2rad($d) }
-sub deg2grad ($) { remt(DG * $_[0], 400) }
+sub grad2deg ($;$) { my $d = GD * $_[0]; $_[1] ? $d : deg2deg($d) }
-sub rad2grad ($) { remt(RG * $_[0], 400) }
+sub deg2grad ($;$) { my $d = DG * $_[0]; $_[1] ? $d : grad2grad($d) }
-sub grad2rad ($) { remt(GR * $_[0], pi2) }
+sub rad2grad ($;$) { my $d = RG * $_[0]; $_[1] ? $d : grad2grad($d) }
+
+sub grad2rad ($;$) { my $d = GR * $_[0]; $_[1] ? $d : rad2rad($d) }
sub cartesian_to_spherical {
my ( $x, $y, $z ) = @_;
@@ -280,6 +287,14 @@ and the imaginary part of approximately C<-1.317>.
$gradians = rad2grad($radians);
The full circle is 2 I<pi> radians or I<360> degrees or I<400> gradians.
+The result is by default wrapped to be inside the [0, {2pi,360,400}[ circle.
+If you don't want this, supply a true second argument:
+
+ $zillions_of_radians = deg2rad($zillions_of_degrees, 1);
+ $negative_degrees = rad2deg($negative_radians, 1);
+
+You can also do the wrapping explicitly by rad2rad(), deg2deg(), and
+grad2grad().
=head1 RADIAL COORDINATE CONVERSIONS
diff --git a/contrib/perl5/lib/Net/Ping.pm b/contrib/perl5/lib/Net/Ping.pm
index 2713383..a2846fe 100644
--- a/contrib/perl5/lib/Net/Ping.pm
+++ b/contrib/perl5/lib/Net/Ping.pm
@@ -269,13 +269,13 @@ sub checksum
);
$len_msg = length($msg);
- $num_short = $len_msg / 2;
+ $num_short = int($len_msg / 2);
$chk = 0;
foreach $short (unpack("S$num_short", $msg))
{
$chk += $short;
} # Add the odd byte in
- $chk += unpack("C", substr($msg, $len_msg - 1, 1)) if $len_msg % 2;
+ $chk += (unpack("C", substr($msg, $len_msg - 1, 1)) << 8) if $len_msg % 2;
$chk = ($chk >> 16) + ($chk & 0xffff); # Fold high into low
return(~(($chk >> 16) + $chk) & 0xffff); # Again and complement
}
@@ -369,16 +369,17 @@ sub ping_udp
elsif ($nfound) # A packet is waiting
{
$from_msg = "";
- $from_saddr = recv($self->{"fh"}, $from_msg, 1500, $flags);
- ($from_port, $from_ip) = sockaddr_in($from_saddr);
- if (($from_ip eq $ip) && # Does the packet check out?
- ($from_port == $self->{"port_num"}) &&
- ($from_msg eq $msg))
- {
- $ret = 1; # It's a winner
- $done = 1;
- }
- }
+ $from_saddr = recv($self->{"fh"}, $from_msg, 1500, $flags)
+ or last; # For example an unreachable host will make recv() fail.
+ ($from_port, $from_ip) = sockaddr_in($from_saddr);
+ if (($from_ip eq $ip) && # Does the packet check out?
+ ($from_port == $self->{"port_num"}) &&
+ ($from_msg eq $msg))
+ {
+ $ret = 1; # It's a winner
+ $done = 1;
+ }
+ }
else # Oops, timed out
{
$done = 1;
@@ -442,7 +443,11 @@ hosts on a network. A ping object is first created with optional
parameters, a variable number of hosts may be pinged multiple
times and then the connection is closed.
-You may choose one of three different protocols to use for the ping.
+You may choose one of three different protocols to use for the
+ping. The "udp" protocol is the default. Note that a live remote host
+may still fail to be pingable by one or more of these protocols. For
+example, www.microsoft.com is generally alive but not pingable.
+
With the "tcp" protocol the ping() method attempts to establish a
connection to the remote host's echo port. If the connection is
successfully established, the remote host is considered reachable. No
@@ -455,6 +460,11 @@ received from the remote host and the received packet contains the
same data as the packet that was sent, the remote host is considered
reachable. This protocol does not require any special privileges.
+It should be borne in mind that, for both tcp and udp ping, a host
+will be reported as unreachable if it is not running the
+appropriate echo service. For Unix-like systems see L<inetd(8)> for
+more information.
+
If the "icmp" protocol is specified, the ping() method sends an icmp
echo message to the remote host, which is what the UNIX ping program
does. If the echoed message is received from the remote host and
diff --git a/contrib/perl5/lib/Net/protoent.pm b/contrib/perl5/lib/Net/protoent.pm
index 334af78..00a76af 100644
--- a/contrib/perl5/lib/Net/protoent.pm
+++ b/contrib/perl5/lib/Net/protoent.pm
@@ -6,7 +6,7 @@ our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
BEGIN {
use Exporter ();
@EXPORT = qw(getprotobyname getprotobynumber getprotoent);
- @EXPORT_OK = qw( $p_name @p_aliases $p_proto );
+ @EXPORT_OK = qw( $p_name @p_aliases $p_proto getproto );
%EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] );
}
use vars @EXPORT_OK;
@@ -78,6 +78,7 @@ regular array variables, so for example C<@{ $proto_obj-E<gt>aliases()
The getproto() function is a simple front-end that forwards a numeric
argument to getprotobyport(), and the rest to getprotobyname().
+This function is not exported by default.
To access this functionality without the core overrides,
pass the C<use> an empty import list, and then access
diff --git a/contrib/perl5/lib/Pod/Checker.pm b/contrib/perl5/lib/Pod/Checker.pm
index ae32677..0863c80 100644
--- a/contrib/perl5/lib/Pod/Checker.pm
+++ b/contrib/perl5/lib/Pod/Checker.pm
@@ -10,7 +10,7 @@
package Pod::Checker;
use vars qw($VERSION);
-$VERSION = 1.098; ## Current version of this package
+$VERSION = 1.2; ## Current version of this package
require 5.005; ## requires this Perl version or later
use Pod::ParseUtils; ## for hyperlinks and lists
@@ -44,7 +44,8 @@ This function can take a hash of options:
=item B<-warnings> =E<gt> I<val>
-Turn warnings on/off. See L<"Warnings">.
+Turn warnings on/off. I<val> is usually 1 for on, but higher values
+trigger additional warnings. See L<"Warnings">.
=back
@@ -212,15 +213,14 @@ 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.
+=begin _disabled_
+
=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).
+=end _disabled_
=item * previous =item has no contents
@@ -243,7 +243,8 @@ type of the I<first> C<=item> determines the type of the list.
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.
+markup commands. This is only printed when the -warnings level is
+greater than 1.
=item * Unknown entity
@@ -273,11 +274,36 @@ The NAME section (C<=head1 NAME>) should consist of a single paragraph
with the script/module name, followed by a dash `-' and a very short
description of what the thing is good for.
-=item * Hyperlinks
+=back
+
+=head2 Hyperlinks
+
+There are some warnings wrt. malformed hyperlinks.
+
+=over 4
+
+=item * ignoring leading/trailing whitespace in link
+
+There is whitespace at the beginning or the end of the contents of
+LE<lt>...E<gt>.
-There are some warnings wrt. hyperlinks:
-Leading/trailing whitespace, newlines in hyperlinks,
-brackets C<()>.
+=item * (section) in '$page' deprecated
+
+There is a section detected in the page name of LE<lt>...E<gt>, e.g.
+C<LE<gt>passwd(2)E<gt>>. POD hyperlinks may point to POD documents only.
+Please write C<CE<lt>passwd(2)E<gt>> instead. Some formatters are able
+to expand this to appropriate code. For links to (builtin) functions,
+please say C<LE<lt>perlfunc/mkdirE<gt>>, without ().
+
+=item * alternative text/node '%s' contains non-escaped | or /
+
+The characters C<|> and C</> are special in the LE<lt>...E<gt> context.
+Although the hyperlink parser does its best to determine which "/" is
+text and which is a delimiter in case of doubt, one ought to escape
+these literal characters like this:
+
+ / E<sol>
+ | E<verbar>
=back
@@ -307,7 +333,6 @@ use strict;
use Carp;
use Exporter;
use Pod::Parser;
-require VMS::Filespec if $^O eq 'VMS';
use vars qw(@ISA @EXPORT);
@ISA = qw(Pod::Parser);
@@ -471,7 +496,6 @@ sub podchecker( $ ; $ % ) {
## Now create a pod checker
my $checker = new Pod::Checker(%options);
- $checker->parseopts(-process_cut_cmd => 1, -warnings => 1);
## Now check the pod document for errors
$checker->parse_from_file($infile, $outfile);
@@ -486,6 +510,27 @@ sub podchecker( $ ; $ % ) {
## Method definitions begin here
##-------------------------------
+##################################
+
+=over 4
+
+=item C<Pod::Checker-E<gt>new( %options )>
+
+Return a reference to a new Pod::Checker object that inherits from
+Pod::Parser and is used for calling the required methods later. The
+following options are recognized:
+
+C<-warnings =E<gt> num>
+ Print warnings if C<num> is true. The higher the value of C<num>,
+the more warnings are printed. Currently there are only levels 1 and 2.
+
+C<-quiet =E<gt> num>
+ If C<num> is true, do not print any errors/warnings. This is useful
+when Pod::Checker is used to munge POD code into plain text from within
+POD formatters.
+
+=cut
+
## sub new {
## my $this = shift;
## my $class = ref($this) || $this;
@@ -501,7 +546,9 @@ sub initialize {
## Initialize number of errors, and setup an error function to
## increment this number and then print to the designated output.
$self->{_NUM_ERRORS} = 0;
- $self->errorsub('poderror'); # set the error handling subroutine
+ $self->{-quiet} ||= 0;
+ # set the error handling subroutine
+ $self->errorsub($self->{-quiet} ? sub { 1; } : 'poderror');
$self->{_commands} = 0; # total number of POD commands encountered
$self->{_list_stack} = []; # stack for nested lists
$self->{_have_begin} = ''; # stores =begin
@@ -511,12 +558,11 @@ sub initialize {
# print warnings?
$self->{-warnings} = 1 unless(defined $self->{-warnings});
$self->{_current_head1} = ''; # the current =head1 block
+ $self->parseopts(-process_cut_cmd => 1, -warnings => $self->{-warnings});
}
##################################
-=over 4
-
=item C<$checker-E<gt>poderror( @args )>
=item C<$checker-E<gt>poderror( {%opts}, @args )>
@@ -547,7 +593,6 @@ The error level, should be 'WARNING' or 'ERROR'.
sub poderror {
my $self = shift;
my %opts = (ref $_[0]) ? %{shift()} : ();
- $opts{-file} = VMS::Filespec::unixify($opts{-file}) if (exists($opts{-file}) && $^O eq 'VMS');
## Retrieve options
chomp( my $msg = ($opts{-msg} || "")."@_" );
@@ -562,7 +607,7 @@ sub poderror {
## Increment error count and print message "
++($self->{_NUM_ERRORS})
if(!%opts || ($opts{-severity} && $opts{-severity} eq 'ERROR'));
- my $out_fh = $self->output_handle();
+ my $out_fh = $self->output_handle() || \*STDERR;
print $out_fh ($severity, $msg, $line, $file, "\n")
if($self->{-warnings} || !%opts || $opts{-severity} ne 'WARNING');
}
@@ -672,7 +717,6 @@ sub end_pod {
## print the number of errors found
my $self = shift;
my $infile = $self->input_file();
- $infile = VMS::Filespec::unixify($infile) if $^O eq 'VMS';
my $out_fh = $self->output_handle();
if(@{$self->{_list_stack}}) {
@@ -691,12 +735,15 @@ sub end_pod {
my %nodes;
foreach($self->node()) {
$nodes{$_} = 1;
- if(/^(\S+)\s+/) {
+ if(/^(\S+)\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->idx()) {
+ $nodes{$_} = 3; # index node
+ }
foreach($self->hyperlink()) {
my ($line,$link) = @$_;
# _TODO_ what if there is a link to the page itself by the name,
@@ -746,24 +793,23 @@ sub command {
$self->poderror({ -line => $line, -file => $file, -severity => 'ERROR',
-msg => "Unknown command '$cmd'" });
}
- else {
- # 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
+ else { # found a valid command
+ $self->{_commands}++; # delete this line if below is enabled again
+
+ ##### following check disabled due to strong request
+ #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
$arg = $self->interpolate_and_check($paragraph, $line,$file);
my $indent = 4; # default
if($arg && $arg =~ /^\s*(\d+)\s*$/) {
$indent = $1;
- } else {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => "No numeric argument for =over"});
}
# start a new list
$self->_open_list($indent,$line,$file);
@@ -1005,12 +1051,13 @@ sub _check_ptree {
unless(ref) {
my $count;
# count the unescaped angle brackets
+ # complain only when warning level is greater than 1
my $i = $_;
if($count = $i =~ tr/<>/<>/) {
$self->poderror({ -line => $line, -file => $file,
-severity => 'WARNING',
-msg => "$count unescaped <> in paragraph" })
- if($self->{-warnings});
+ if($self->{-warnings} && $self->{-warnings}>1);
}
$text .= $i;
next;
diff --git a/contrib/perl5/lib/Pod/Find.pm b/contrib/perl5/lib/Pod/Find.pm
index 8de197b..4a0ecb9 100644
--- a/contrib/perl5/lib/Pod/Find.pm
+++ b/contrib/perl5/lib/Pod/Find.pm
@@ -13,8 +13,9 @@
package Pod::Find;
use vars qw($VERSION);
-$VERSION = 0.12; ## Current version of this package
-require 5.005; ## requires this Perl version or later
+$VERSION = 0.21; ## Current version of this package
+require 5.005; ## requires this Perl version or later
+use Carp;
#############################################################################
@@ -32,12 +33,38 @@ Pod::Find - find POD documents in directory trees
print "podname=",simplify_name('a/b/c/mymodule.pod'),"\n";
+ $location = pod_where( { -inc => 1 }, "Pod::Find" );
+
=head1 DESCRIPTION
-B<Pod::Find> provides a function B<pod_find> that searches for POD
-documents in a given set of files and directories. It returns a hash
-with the file names as keys and the POD name as value. The POD name
-is derived from the file name and its position in the directory tree.
+B<Pod::Find> provides a set of functions to locate POD files. Note that
+no function is exported by default to avoid pollution of your namespace,
+so be sure to specify them in the B<use> statement if you need them:
+
+ use Pod::Find qw(pod_find);
+
+=cut
+
+use strict;
+#use diagnostics;
+use Exporter;
+use File::Spec;
+use File::Find;
+use Cwd;
+
+use vars qw(@ISA @EXPORT_OK $VERSION);
+@ISA = qw(Exporter);
+@EXPORT_OK = qw(&pod_find &simplify_name &pod_where &contains_pod);
+
+# package global variables
+my $SIMPLIFY_RX;
+
+=head2 C<pod_find( { %opts } , @directories )>
+
+The function B<pod_find> searches for POD documents in a given set of
+files and/or directories. It returns a hash with the file names as keys
+and the POD name as value. The POD name is derived from the file name
+and its position in the directory tree.
E.g. when searching in F<$HOME/perl5lib>, the file
F<$HOME/perl5lib/MyModule.pm> would get the POD name I<MyModule>,
@@ -51,73 +78,39 @@ A warning is printed if more than one POD file with the same POD name
is found, e.g. F<CPAN.pm> in different directories. This usually
indicates duplicate occurrences of modules in the I<@INC> search path.
-The function B<simplify_name> is equivalent to B<basename>, but also
-strips Perl-like extensions (.pm, .pl, .pod) and extensions like
-F<.bat>, F<.cmd> on Win32 and OS/2, respectively.
-
-Note that neither B<pod_find> nor B<simplify_name> are exported by
-default so be sure to specify them in the B<use> statement if you need
-them:
-
- use Pod::Find qw(pod_find simplify_name);
-
-=head1 OPTIONS
-
-The first argument for B<pod_find> may be a hash reference with options.
-The rest are either directories that are searched recursively or files.
-The POD names of files are the plain basenames with any Perl-like extension
-(.pm, .pl, .pod) stripped.
+B<OPTIONS> The first argument for B<pod_find> may be a hash reference
+with options. The rest are either directories that are searched
+recursively or files. The POD names of files are the plain basenames
+with any Perl-like extension (.pm, .pl, .pod) stripped.
=over 4
-=item B<-verbose>
+=item C<-verbose =E<gt> 1>
Print progress information while scanning.
-=item B<-perl>
+=item C<-perl =E<gt> 1>
Apply Perl-specific heuristics to find the correct PODs. This includes
stripping Perl-like extensions, omitting subdirectories that are numeric
but do I<not> match the current Perl interpreter's version id, suppressing
F<site_perl> as a module hierarchy name etc.
-=item B<-script>
+=item C<-script =E<gt> 1>
Search for PODs in the current Perl interpreter's installation
B<scriptdir>. This is taken from the local L<Config|Config> module.
-=item B<-inc>
+=item C<-inc =E<gt> 1>
Search for PODs in the current Perl interpreter's I<@INC> paths. This
-automatically considers paths specified in the C<PERL5LIB> environment.
+automatically considers paths specified in the C<PERL5LIB> environment
+as this is prepended to I<@INC> by the Perl interpreter itself.
=back
-=head1 AUTHOR
-
-Marek Rouchal E<lt>marek@saftsack.fs.uni-bayreuth.deE<gt>,
-heavily borrowing code from Nick Ing-Simmons' PodToHtml.
-
-=head1 SEE ALSO
-
-L<Pod::Parser>, L<Pod::Checker>
-
=cut
-use strict;
-#use diagnostics;
-use Exporter;
-use File::Spec;
-use File::Find;
-use Cwd;
-
-use vars qw(@ISA @EXPORT_OK $VERSION);
-@ISA = qw(Exporter);
-@EXPORT_OK = qw(&pod_find &simplify_name);
-
-# package global variables
-my $SIMPLIFY_RX;
-
# return a hash of the POD files found
# first argument may be a hashref (options),
# rest is a list of directories to search recursively
@@ -152,7 +145,7 @@ sub pod_find
# * remove e.g. 5.00503
# * remove pod/ if followed by *.pod (e.g. in pod/perlfunc.pod)
$SIMPLIFY_RX =
- qq!^(?i:site_perl/|\Q$Config::Config{archname}\E/|\\d+\\.\\d+([_.]?\\d+)?/|pod/(?=.*?\\.pod\\z))*!;
+ qq!^(?i:site(_perl)?/|\Q$Config::Config{archname}\E/|\\d+\\.\\d+([_.]?\\d+)?/|pod/(?=.*?\\.pod\\z))*!;
}
@@ -167,7 +160,9 @@ sub pod_find
$try = File::Spec->catfile($pwd,$try);
}
# simplify path
- $try = File::Spec->canonpath($try);
+ # on VMS canonpath will vmsify:[the.path], but File::Find::find
+ # wants /unixy/paths
+ $try = File::Spec->canonpath($try) if ($^O ne 'VMS');
my $name;
if(-f $try) {
if($name = _check_and_extract_name($try, $opts{-verbose})) {
@@ -222,27 +217,14 @@ sub _check_and_extract_name {
# check extension or executable flag
# this involves testing the .bat extension on Win32!
- unless($file =~ /\.(pod|pm|plx?)\z/i || (-f $file && -x _ && -T _)) {
- return undef;
+ unless(-f $file && -T _ && ($file =~ /\.(pod|pm|plx?)\z/i || -x _ )) {
+ return undef;
}
- # check for one line of POD
- unless(open(POD,"<$file")) {
- warn "Error: $file is unreadable: $!\n";
- return undef;
- }
- local $/ = undef;
- my $pod = <POD>;
- close(POD);
- unless($pod =~ /\n=(head\d|pod|over|item)\b/) {
- warn "No POD in $file, skipping.\n"
- if($verbose);
- return;
- }
- undef $pod;
+ return undef unless contains_pod($file,$verbose);
# strip non-significant path components
- # _TODO_ what happens on e.g. Win32?
+ # TODO what happens on e.g. Win32?
my $name = $file;
if(defined $root_rx) {
$name =~ s!$root_rx!!s;
@@ -256,6 +238,14 @@ sub _check_and_extract_name {
$name;
}
+=head2 C<simplify_name( $str )>
+
+The function B<simplify_name> is equivalent to B<basename>, but also
+strips Perl-like extensions (.pm, .pl, .pod) and extensions like
+F<.bat>, F<.cmd> on Win32 and OS/2, or F<.com> on VMS, respectively.
+
+=cut
+
# basic simplification of the POD name:
# basename & strip extension
sub simplify_name {
@@ -271,8 +261,185 @@ sub _simplify {
# strip Perl's own extensions
$_[0] =~ s/\.(pod|pm|plx?)\z//i;
# strip meaningless extensions on Win32 and OS/2
- $_[0] =~ s/\.(bat|exe|cmd)\z//i if($^O =~ /win|os2/i);
+ $_[0] =~ s/\.(bat|exe|cmd)\z//i if($^O =~ /mswin|os2/i);
+ # strip meaningless extensions on VMS
+ $_[0] =~ s/\.(com)\z//i if($^O eq 'VMS');
}
+# contribution from Tim Jenness <t.jenness@jach.hawaii.edu>
+
+=head2 C<pod_where( { %opts }, $pod )>
+
+Returns the location of a pod document given a search directory
+and a module (e.g. C<File::Find>) or script (e.g. C<perldoc>) name.
+
+Options:
+
+=over 4
+
+=item C<-inc =E<gt> 1>
+
+Search @INC for the pod and also the C<scriptdir> defined in the
+L<Config|Config> module.
+
+=item C<-dirs =E<gt> [ $dir1, $dir2, ... ]>
+
+Reference to an array of search directories. These are searched in order
+before looking in C<@INC> (if B<-inc>). Current directory is used if
+none are specified.
+
+=item C<-verbose =E<gt> 1>
+
+List directories as they are searched
+
+=back
+
+Returns the full path of the first occurence to the file.
+Package names (eg 'A::B') are automatically converted to directory
+names in the selected directory. (eg on unix 'A::B' is converted to
+'A/B'). Additionally, '.pm', '.pl' and '.pod' are appended to the
+search automatically if required.
+
+A subdirectory F<pod/> is also checked if it exists in any of the given
+search directories. This ensures that e.g. L<perlfunc|perlfunc> is
+found.
+
+It is assumed that if a module name is supplied, that that name
+matches the file name. Pods are not opened to check for the 'NAME'
+entry.
+
+A check is made to make sure that the file that is found does
+contain some pod documentation.
+
+=cut
+
+sub pod_where {
+
+ # default options
+ my %options = (
+ '-inc' => 0,
+ '-verbose' => 0,
+ '-dirs' => [ '.' ],
+ );
+
+ # Check for an options hash as first argument
+ if (defined $_[0] && ref($_[0]) eq 'HASH') {
+ my $opt = shift;
+
+ # Merge default options with supplied options
+ %options = (%options, %$opt);
+ }
+
+ # Check usage
+ carp 'Usage: pod_where({options}, $pod)' unless (scalar(@_));
+
+ # Read argument
+ my $pod = shift;
+
+ # Split on :: and then join the name together using File::Spec
+ my @parts = split (/::/, $pod);
+
+ # Get full directory list
+ my @search_dirs = @{ $options{'-dirs'} };
+
+ if ($options{'-inc'}) {
+
+ require Config;
+
+ # Add @INC
+ push (@search_dirs, @INC) if $options{'-inc'};
+
+ # Add location of pod documentation for perl man pages (eg perlfunc)
+ # This is a pod directory in the private install tree
+ #my $perlpoddir = File::Spec->catdir($Config::Config{'installprivlib'},
+ # 'pod');
+ #push (@search_dirs, $perlpoddir)
+ # if -d $perlpoddir;
+
+ # Add location of binaries such as pod2text
+ push (@search_dirs, $Config::Config{'scriptdir'})
+ if -d $Config::Config{'scriptdir'};
+ }
+
+ # Loop over directories
+ Dir: foreach my $dir ( @search_dirs ) {
+
+ # Don't bother if cant find the directory
+ if (-d $dir) {
+ warn "Looking in directory $dir\n"
+ if $options{'-verbose'};
+
+ # Now concatenate this directory with the pod we are searching for
+ my $fullname = File::Spec->catfile($dir, @parts);
+ warn "Filename is now $fullname\n"
+ if $options{'-verbose'};
+
+ # Loop over possible extensions
+ foreach my $ext ('', '.pod', '.pm', '.pl') {
+ my $fullext = $fullname . $ext;
+ if (-f $fullext &&
+ contains_pod($fullext, $options{'-verbose'}) ) {
+ warn "FOUND: $fullext\n" if $options{'-verbose'};
+ return $fullext;
+ }
+ }
+ } else {
+ warn "Directory $dir does not exist\n"
+ if $options{'-verbose'};
+ next Dir;
+ }
+ if(-d File::Spec->catdir($dir,'pod')) {
+ $dir = File::Spec->catdir($dir,'pod');
+ redo Dir;
+ }
+ }
+ # No match;
+ return undef;
+}
+
+=head2 C<contains_pod( $file , $verbose )>
+
+Returns true if the supplied filename (not POD module) contains some pod
+information.
+
+=cut
+
+sub contains_pod {
+ my $file = shift;
+ my $verbose = 0;
+ $verbose = shift if @_;
+
+ # check for one line of POD
+ unless(open(POD,"<$file")) {
+ warn "Error: $file is unreadable: $!\n";
+ return undef;
+ }
+
+ local $/ = undef;
+ my $pod = <POD>;
+ close(POD) || die "Error closing $file: $!\n";
+ unless($pod =~ /\n=(head\d|pod|over|item)\b/s) {
+ warn "No POD in $file, skipping.\n"
+ if($verbose);
+ return 0;
+ }
+
+ return 1;
+}
+
+=head1 AUTHOR
+
+Marek Rouchal E<lt>marek@saftsack.fs.uni-bayreuth.deE<gt>,
+heavily borrowing code from Nick Ing-Simmons' PodToHtml.
+
+Tim Jenness E<lt>t.jenness@jach.hawaii.eduE<gt> provided
+C<pod_where> and C<contains_pod>.
+
+=head1 SEE ALSO
+
+L<Pod::Parser>, L<Pod::Checker>, L<perldoc>
+
+=cut
+
1;
diff --git a/contrib/perl5/lib/Pod/Functions.pm b/contrib/perl5/lib/Pod/Functions.pm
index 03cbf71..44619d5 100644
--- a/contrib/perl5/lib/Pod/Functions.pm
+++ b/contrib/perl5/lib/Pod/Functions.pm
@@ -296,7 +296,7 @@ values HASH return a list of the values in a hash
vec Binary test or set particular bits in a string
wait Process wait for any child process to die
waitpid Process wait for a particular child process to die
-wantarray Misc,Flow get list vs array context of current subroutine call
+wantarray Misc,Flow get void vs scalar vs list context of current subroutine call
warn I/O print debugging info
write I/O print a picture record
y/// String transliterate a string
diff --git a/contrib/perl5/lib/Pod/Html.pm b/contrib/perl5/lib/Pod/Html.pm
index 89e3d0f..f70a42b 100644
--- a/contrib/perl5/lib/Pod/Html.pm
+++ b/contrib/perl5/lib/Pod/Html.pm
@@ -893,6 +893,10 @@ sub scan_dir {
$pages{$_} = "" unless defined $pages{$_};
$pages{$_} .= "$dir/$_.pod:";
push(@pods, "$dir/$_.pod");
+ } elsif (/\.html\z/) { # .html
+ s/\.html\z//;
+ $pages{$_} = "" unless defined $pages{$_};
+ $pages{$_} .= "$dir/$_.pod:";
} elsif (/\.pm\z/) { # .pm
s/\.pm\z//;
$pages{$_} = "" unless defined $pages{$_};
@@ -1438,8 +1442,10 @@ sub process_text1($$;$$){
} elsif( $func eq 'E' ){
# E<x> - convert to character
- $$rstr =~ s/^(\w+)>//;
- $res = "&$1;";
+ $$rstr =~ s/^([^>]*)>//;
+ my $escape = $1;
+ $escape =~ s/^(\d+|X[\dA-F]+)$/#$1/i;
+ $res = "&$escape;";
} elsif( $func eq 'F' ){
# F<filename> - italizice
@@ -1940,7 +1946,7 @@ sub depod1($;$$){
$res .= $$rstr;
} elsif( $func eq 'E' ){
# E<x> - convert to character
- $$rstr =~ s/^(\w+)>//;
+ $$rstr =~ s/^([^>]*)>//;
$res .= $E2c{$1} || "";
} elsif( $func eq 'X' ){
# X<> - ignore
diff --git a/contrib/perl5/lib/Pod/InputObjects.pm b/contrib/perl5/lib/Pod/InputObjects.pm
index 849182b..352373b 100644
--- a/contrib/perl5/lib/Pod/InputObjects.pm
+++ b/contrib/perl5/lib/Pod/InputObjects.pm
@@ -11,7 +11,7 @@
package Pod::InputObjects;
use vars qw($VERSION);
-$VERSION = 1.12; ## Current version of this package
+$VERSION = 1.13; ## Current version of this package
require 5.005; ## requires this Perl version or later
#############################################################################
@@ -42,7 +42,7 @@ are defined:
=begin __PRIVATE__
-=item B<Pod::InputSource>
+=item package B<Pod::InputSource>
An object corresponding to a source of POD input text. It is mostly a
wrapper around a filehandle or C<IO::Handle>-type object (or anything
@@ -51,23 +51,23 @@ additional information relevant to the parsing of PODs.
=end __PRIVATE__
-=item B<Pod::Paragraph>
+=item package B<Pod::Paragraph>
An object corresponding to a paragraph of POD input text. It may be a
plain paragraph, a verbatim paragraph, or a command paragraph (see
L<perlpod>).
-=item B<Pod::InteriorSequence>
+=item package B<Pod::InteriorSequence>
An object corresponding to an interior sequence command from the POD
input text (see L<perlpod>).
-=item B<Pod::ParseTree>
+=item package B<Pod::ParseTree>
An object corresponding to a tree of parsed POD text. Each "node" in
a parse-tree (or I<ptree>) is either a text-string or a reference to
a B<Pod::InteriorSequence> object. The nodes appear in the parse-tree
-in they order in which they were parsed from left-to-right.
+in the order in which they were parsed from left-to-right.
=back
@@ -232,7 +232,7 @@ It has the following methods/attributes:
##---------------------------------------------------------------------------
-=head2 B<new()>
+=head2 Pod::Paragraph-E<gt>B<new()>
my $pod_para1 = Pod::Paragraph->new(-text => $text);
my $pod_para2 = Pod::Paragraph->new(-name => $cmd,
@@ -284,7 +284,7 @@ sub new {
##---------------------------------------------------------------------------
-=head2 B<cmd_name()>
+=head2 $pod_para-E<gt>B<cmd_name()>
my $para_cmd = $pod_para->cmd_name();
@@ -303,7 +303,7 @@ sub cmd_name {
##---------------------------------------------------------------------------
-=head2 B<text()>
+=head2 $pod_para-E<gt>B<text()>
my $para_text = $pod_para->text();
@@ -318,7 +318,7 @@ sub text {
##---------------------------------------------------------------------------
-=head2 B<raw_text()>
+=head2 $pod_para-E<gt>B<raw_text()>
my $raw_pod_para = $pod_para->raw_text();
@@ -335,7 +335,7 @@ sub raw_text {
##---------------------------------------------------------------------------
-=head2 B<cmd_prefix()>
+=head2 $pod_para-E<gt>B<cmd_prefix()>
my $prefix = $pod_para->cmd_prefix();
@@ -351,7 +351,7 @@ sub cmd_prefix {
##---------------------------------------------------------------------------
-=head2 B<cmd_separator()>
+=head2 $pod_para-E<gt>B<cmd_separator()>
my $separator = $pod_para->cmd_separator();
@@ -367,7 +367,7 @@ sub cmd_separator {
##---------------------------------------------------------------------------
-=head2 B<parse_tree()>
+=head2 $pod_para-E<gt>B<parse_tree()>
my $ptree = $pod_parser->parse_text( $pod_para->text() );
$pod_para->parse_tree( $ptree );
@@ -387,13 +387,13 @@ sub parse_tree {
##---------------------------------------------------------------------------
-=head2 B<file_line()>
+=head2 $pod_para-E<gt>B<file_line()>
my ($filename, $line_number) = $pod_para->file_line();
my $position = $pod_para->file_line();
Returns the current filename and line number for the paragraph
-object. If called in an array context, it returns a list of two
+object. If called in a list context, it returns a list of two
elements: first the filename, then the line number. If called in
a scalar context, it returns a string containing the filename, followed
by a colon (':'), followed by the line number.
@@ -423,7 +423,7 @@ It has the following methods/attributes:
##---------------------------------------------------------------------------
-=head2 B<new()>
+=head2 Pod::InteriorSequence-E<gt>B<new()>
my $pod_seq1 = Pod::InteriorSequence->new(-name => $cmd
-ldelim => $delimiter);
@@ -497,7 +497,7 @@ sub new {
##---------------------------------------------------------------------------
-=head2 B<cmd_name()>
+=head2 $pod_seq-E<gt>B<cmd_name()>
my $seq_cmd = $pod_seq->cmd_name();
@@ -546,7 +546,7 @@ sub _unset_child2parent_links {
##---------------------------------------------------------------------------
-=head2 B<prepend()>
+=head2 $pod_seq-E<gt>B<prepend()>
$pod_seq->prepend($text);
$pod_seq1->prepend($pod_seq2);
@@ -565,7 +565,7 @@ sub prepend {
##---------------------------------------------------------------------------
-=head2 B<append()>
+=head2 $pod_seq-E<gt>B<append()>
$pod_seq->append($text);
$pod_seq1->append($pod_seq2);
@@ -584,7 +584,7 @@ sub append {
##---------------------------------------------------------------------------
-=head2 B<nested()>
+=head2 $pod_seq-E<gt>B<nested()>
$outer_seq = $pod_seq->nested || print "not nested";
@@ -602,7 +602,7 @@ sub nested {
##---------------------------------------------------------------------------
-=head2 B<raw_text()>
+=head2 $pod_seq-E<gt>B<raw_text()>
my $seq_raw_text = $pod_seq->raw_text();
@@ -623,7 +623,7 @@ sub raw_text {
##---------------------------------------------------------------------------
-=head2 B<left_delimiter()>
+=head2 $pod_seq-E<gt>B<left_delimiter()>
my $ldelim = $pod_seq->left_delimiter();
@@ -642,7 +642,7 @@ sub left_delimiter {
##---------------------------------------------------------------------------
-=head2 B<right_delimiter()>
+=head2 $pod_seq-E<gt>B<right_delimiter()>
The rightmost delimiter beginning the argument text to the interior
sequence (should be ">").
@@ -659,7 +659,7 @@ sub right_delimiter {
##---------------------------------------------------------------------------
-=head2 B<parse_tree()>
+=head2 $pod_seq-E<gt>B<parse_tree()>
my $ptree = $pod_parser->parse_text($paragraph_text);
$pod_seq->parse_tree( $ptree );
@@ -680,13 +680,13 @@ sub parse_tree {
##---------------------------------------------------------------------------
-=head2 B<file_line()>
+=head2 $pod_seq-E<gt>B<file_line()>
my ($filename, $line_number) = $pod_seq->file_line();
my $position = $pod_seq->file_line();
Returns the current filename and line number for the interior sequence
-object. If called in an array context, it returns a list of two
+object. If called in a list context, it returns a list of two
elements: first the filename, then the line number. If called in
a scalar context, it returns a string containing the filename, followed
by a colon (':'), followed by the line number.
@@ -701,7 +701,7 @@ sub file_line {
##---------------------------------------------------------------------------
-=head2 B<DESTROY()>
+=head2 Pod::InteriorSequence::B<DESTROY()>
This method performs any necessary cleanup for the interior-sequence.
If you override this method then it is B<imperative> that you invoke
@@ -738,7 +738,7 @@ itself contain a parse-tree (since interior sequences may be nested).
##---------------------------------------------------------------------------
-=head2 B<new()>
+=head2 Pod::ParseTree-E<gt>B<new()>
my $ptree1 = Pod::ParseTree->new;
my $ptree2 = new Pod::ParseTree;
@@ -766,7 +766,7 @@ sub new {
##---------------------------------------------------------------------------
-=head2 B<top()>
+=head2 $ptree-E<gt>B<top()>
my $top_node = $ptree->top();
$ptree->top( $top_node );
@@ -794,7 +794,7 @@ sub top {
##---------------------------------------------------------------------------
-=head2 B<children()>
+=head2 $ptree-E<gt>B<children()>
This method gets/sets the children of the top node in the parse-tree.
If no arguments are given, it returns the list (array) of children
@@ -814,7 +814,7 @@ sub children {
##---------------------------------------------------------------------------
-=head2 B<prepend()>
+=head2 $ptree-E<gt>B<prepend()>
This method prepends the given text or parse-tree to the current parse-tree.
If the first item on the parse-tree is text and the argument is also text,
@@ -842,7 +842,7 @@ sub prepend {
##---------------------------------------------------------------------------
-=head2 B<append()>
+=head2 $ptree-E<gt>B<append()>
This method appends the given text or parse-tree to the current parse-tree.
If the last item on the parse-tree is text and the argument is also text,
@@ -866,7 +866,7 @@ sub append {
}
}
-=head2 B<raw_text()>
+=head2 $ptree-E<gt>B<raw_text()>
my $ptree_raw_text = $ptree->raw_text();
@@ -902,7 +902,7 @@ sub _set_child2parent_links {
## nothing to do, Pod::ParseTrees cant have parent pointers
}
-=head2 B<DESTROY()>
+=head2 Pod::ParseTree::B<DESTROY()>
This method performs any necessary cleanup for the parse-tree.
If you override this method then it is B<imperative>
diff --git a/contrib/perl5/lib/Pod/Man.pm b/contrib/perl5/lib/Pod/Man.pm
index 97a3828..3103682 100644
--- a/contrib/perl5/lib/Pod/Man.pm
+++ b/contrib/perl5/lib/Pod/Man.pm
@@ -1,7 +1,7 @@
# Pod::Man -- Convert POD data to formatted *roff input.
-# $Id: Man.pm,v 1.2 2000/03/19 07:30:13 eagle Exp $
+# $Id: Man.pm,v 1.15 2001/02/10 06:50:22 eagle Exp $
#
-# Copyright 1999, 2000 by Russ Allbery <rra@stanford.edu>
+# Copyright 1999, 2000, 2001 by Russ Allbery <rra@stanford.edu>
#
# This program is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -38,7 +38,7 @@ use vars qw(@ISA %ESCAPES $PREAMBLE $VERSION);
# Perl core and too many things could munge CVS magic revision strings.
# This number should ideally be the same as the CVS revision in podlators,
# however.
-$VERSION = 1.02;
+$VERSION = 1.15;
############################################################################
@@ -47,8 +47,10 @@ $VERSION = 1.02;
# The following is the static preamble which starts all *roff output we
# generate. It's completely static except for the font to use as a
-# fixed-width font, which is designed by @CFONT@. $PREAMBLE should
-# therefore be run through s/\@CFONT\@/<font>/g before output.
+# fixed-width font, which is designed by @CFONT@, and the left and right
+# quotes to use for C<> text, designated by @LQOUTE@ and @RQUOTE@.
+# $PREAMBLE should therefore be run through s/\@CFONT\@/<font>/g before
+# output.
$PREAMBLE = <<'----END OF PREAMBLE----';
.de Sh \" Subsection heading
.br
@@ -93,8 +95,8 @@ $PREAMBLE = <<'----END OF PREAMBLE----';
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
-. ds C` `
-. ds C' '
+. ds C` @LQUOTE@
+. ds C' @RQUOTE@
'br\}
.el\{\
. ds -- \|\(em\|
@@ -110,7 +112,7 @@ $PREAMBLE = <<'----END OF PREAMBLE----';
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
-. .
+..
. nr % 0
. rr F
.\}
@@ -183,7 +185,8 @@ $PREAMBLE = <<'----END OF PREAMBLE----';
.\}
.rm #[ #] #H #V #F C
----END OF PREAMBLE----
-
+#`# for cperl-mode
+
# This table is taken nearly verbatim from Tom Christiansen's pod2man. It
# assumes that the standard preamble has already been printed, since that's
# what defines all of the accent marks. Note that some of these are quoted
@@ -194,6 +197,8 @@ $PREAMBLE = <<'----END OF PREAMBLE----';
'lt' => '<', # left chevron, less-than
'gt' => '>', # right chevron, greater-than
'quot' => '"', # double quote
+ 'sol' => '/', # solidus (forward slash)
+ 'verbar' => '|', # vertical bar
'Aacute' => "A\\*'", # capital A, acute accent
'aacute' => "a\\*'", # small a, acute accent
@@ -273,38 +278,11 @@ sub protect {
s/^([.\'\\])/\\&$1/mg;
$_;
}
-
-# Given a command and a single argument that may or may not contain double
-# quotes, handle double-quote formatting for it. If there are no double
-# quotes, just return the command followed by the argument in double quotes.
-# If there are double quotes, use an if statement to test for nroff, and for
-# nroff output the command followed by the argument in double quotes with
-# embedded double quotes doubled. For other formatters, remap paired double
-# quotes to `` and ''.
-sub switchquotes {
- my $command = shift;
- local $_ = shift;
- my $extra = shift;
- s/\\\*\([LR]\"/\"/g;
- if (/\"/) {
- s/\"/\"\"/g;
- my $troff = $_;
- $troff =~ s/\"\"([^\"]*)\"\"/\`\`$1\'\'/g;
- s/\"/\"\"/g if $extra;
- $troff =~ s/\"/\"\"/g if $extra;
- $_ = qq("$_") . ($extra ? " $extra" : '');
- $troff = qq("$troff") . ($extra ? " $extra" : '');
- return ".if n $command $_\n.el $command $troff\n";
- } else {
- $_ = qq("$_") . ($extra ? " $extra" : '');
- return "$command $_\n";
- }
-}
# Translate a font string into an escape.
sub toescape { (length ($_[0]) > 1 ? '\f(' : '\f') . $_[0] }
-
+
############################################################################
# Initialization
############################################################################
@@ -323,7 +301,8 @@ sub initialize {
for (qw/fixed fixedbold fixeditalic fixedbolditalic/) {
if (defined $$self{$_}) {
if (length ($$self{$_}) < 1 || length ($$self{$_}) > 2) {
- croak "roff font should be 1 or 2 chars, not `$$self{$_}'";
+ croak qq(roff font should be 1 or 2 chars,)
+ . qq( not "$$self{$_}");
}
} else {
$$self{$_} = '';
@@ -368,16 +347,35 @@ sub initialize {
$$self{$_} =~ s/\"/\"\"/g if $$self{$_};
}
+ # Figure out what quotes we'll be using for C<> text.
+ $$self{quotes} ||= '"';
+ if ($$self{quotes} eq 'none') {
+ $$self{LQUOTE} = $$self{RQUOTE} = '';
+ } elsif (length ($$self{quotes}) == 1) {
+ $$self{LQUOTE} = $$self{RQUOTE} = $$self{quotes};
+ } elsif ($$self{quotes} =~ /^(.)(.)$/
+ || $$self{quotes} =~ /^(..)(..)$/) {
+ $$self{LQUOTE} = $1;
+ $$self{RQUOTE} = $2;
+ } else {
+ croak qq(Invalid quote specification "$$self{quotes}");
+ }
+
+ # Double the first quote; note that this should not be s///g as two
+ # double quotes is represented in *roff as three double quotes, not
+ # four. Weird, I know.
+ $$self{LQUOTE} =~ s/\"/\"\"/;
+ $$self{RQUOTE} =~ s/\"/\"\"/;
+
$$self{INDENT} = 0; # Current indentation level.
$$self{INDENTS} = []; # Stack of indentations.
$$self{INDEX} = []; # Index keys waiting to be printed.
+ $$self{ITEMS} = 0; # The number of consecutive =items.
$self->SUPER::initialize;
}
-# For each document we process, output the preamble first. Note that the
-# fixed width font is a global default; once we interpolate it into the
-# PREAMBLE, it ain't ever changing. Maybe fix this later.
+# For each document we process, output the preamble first.
sub begin_pod {
my $self = shift;
@@ -412,6 +410,10 @@ sub begin_pod {
}
}
+ # If $name contains spaces, quote it; this mostly comes up in the case
+ # of input from stdin.
+ $name = '"' . $name . '"' if ($name =~ /\s/);
+
# Modification date header. Try to use the modification time of our
# input.
if (!defined $$self{date}) {
@@ -423,15 +425,18 @@ sub begin_pod {
}
# Now, print out the preamble and the title.
- $PREAMBLE =~ s/\@CFONT\@/$$self{fixed}/;
- chomp $PREAMBLE;
+ local $_ = $PREAMBLE;
+ s/\@CFONT\@/$$self{fixed}/;
+ s/\@LQUOTE\@/$$self{LQUOTE}/;
+ s/\@RQUOTE\@/$$self{RQUOTE}/;
+ chomp $_;
print { $self->output_handle } <<"----END OF HEADER----";
.\\" Automatically generated by Pod::Man version $VERSION
.\\" @{[ scalar localtime ]}
.\\"
.\\" Standard preamble:
.\\" ======================================================================
-$PREAMBLE
+$_
.\\" ======================================================================
.\\"
.IX Title "$name $section"
@@ -458,9 +463,19 @@ sub command {
my $self = shift;
my $command = shift;
return if $command eq 'pod';
- return if ($$self{EXCLUDE} && $command ne 'end');
- $command = 'cmd_' . $command;
- $self->$command (@_);
+ return if ($$self{EXCLUDE} && $command ne 'end');
+ if ($self->can ('cmd_' . $command)) {
+ $command = 'cmd_' . $command;
+ $self->$command (@_);
+ } else {
+ my ($text, $line, $paragraph) = @_;
+ my $file;
+ ($file, $line) = $paragraph->file_line;
+ $text =~ s/\n+\z//;
+ $text = " $text" if ($text =~ /^\S/);
+ warn qq($file:$line: Unknown command paragraph "=$command$text"\n);
+ return;
+ }
}
# Called for a verbatim paragraph. Gets the paragraph, the line number, and
@@ -477,7 +492,7 @@ sub verbatim {
1 while s/^(.*?)(\t+)/$1 . ' ' x (length ($2) * 8 - length ($1) % 8)/me;
s/\\/\\e/g;
s/^(\s*\S)/'\&' . $1/gme;
- $self->makespace if $$self{NEEDSPACE};
+ $self->makespace;
$self->output (".Vb $lines\n$_.Ve\n");
$$self{NEEDSPACE} = 0;
}
@@ -503,7 +518,7 @@ sub textblock {
>
(
,?\s+(and\s+)? # Allow lots of them, conjuncted.
- L<
+ L<
/
( [:\w]+ ( \(\) )? )
>
@@ -529,8 +544,8 @@ sub textblock {
# scalars as well as scalars and does the right thing with them.
$text = $self->parse ($text, @_);
$text =~ s/\n\s*$/\n/;
- $self->makespace if $$self{NEEDSPACE};
- $self->output (protect $self->mapfonts ($text));
+ $self->makespace;
+ $self->output (protect $self->textmapfonts ($text));
$self->outindex;
$$self{NEEDSPACE} = 1;
}
@@ -550,8 +565,11 @@ sub sequence {
return bless \ "$tmp", 'Pod::Man::String';
}
- # C<>, L<>, X<>, and E<> don't apply guesswork to their contents.
- local $_ = $self->collapse ($seq->parse_tree, $command =~ /^[CELX]$/);
+ # C<>, L<>, X<>, and E<> don't apply guesswork to their contents. C<>
+ # needs some additional special handling.
+ my $literal = ($command =~ /^[CELX]$/);
+ $literal++ if $command eq 'C';
+ local $_ = $self->collapse ($seq->parse_tree, $literal);
# Handle E<> escapes.
if ($command eq 'E') {
@@ -576,8 +594,6 @@ sub sequence {
} elsif ($command eq 'I') {
return bless \ ('\f(IS' . $_ . '\f(IE'), 'Pod::Man::String';
} elsif ($command eq 'C') {
- s/-/\\-/g;
- s/__/_\\|_/g;
return bless \ ('\f(FS\*(C`' . $_ . "\\*(C'\\f(FE"),
'Pod::Man::String';
}
@@ -588,7 +604,7 @@ sub sequence {
my $tmp = $self->buildlink ($_);
return bless \ "$tmp", 'Pod::Man::String';
}
-
+
# Whitespace protection replaces whitespace with "\ ".
if ($command eq 'S') {
s/\s+/\\ /g;
@@ -618,7 +634,12 @@ sub cmd_head1 {
local $_ = $self->parse (@_);
s/\s+$//;
s/\\s-?\d//g;
- $self->output (switchquotes ('.SH', $self->mapfonts ($_)));
+ s/\s*\n\s*/ /g;
+ if ($$self{ITEMS} > 1) {
+ $$self{ITEMS} = 0;
+ $self->output (".PD\n");
+ }
+ $self->output ($self->switchquotes ('.SH', $self->mapfonts ($_)));
$self->outindex (($_ eq 'NAME') ? () : ('Header', $_));
$$self{NEEDSPACE} = 0;
}
@@ -628,11 +649,48 @@ sub cmd_head2 {
my $self = shift;
local $_ = $self->parse (@_);
s/\s+$//;
- $self->output (switchquotes ('.Sh', $self->mapfonts ($_)));
+ s/\s*\n\s*/ /g;
+ if ($$self{ITEMS} > 1) {
+ $$self{ITEMS} = 0;
+ $self->output (".PD\n");
+ }
+ $self->output ($self->switchquotes ('.Sh', $self->mapfonts ($_)));
$self->outindex ('Subsection', $_);
$$self{NEEDSPACE} = 0;
}
+# Third level heading.
+sub cmd_head3 {
+ my $self = shift;
+ local $_ = $self->parse (@_);
+ s/\s+$//;
+ s/\s*\n\s*/ /g;
+ if ($$self{ITEMS} > 1) {
+ $$self{ITEMS} = 0;
+ $self->output (".PD\n");
+ }
+ $self->makespace;
+ $self->output ($self->switchquotes ('.I', $self->mapfonts ($_)));
+ $self->outindex ('Subsection', $_);
+ $$self{NEEDSPACE} = 1;
+}
+
+# Fourth level heading.
+sub cmd_head4 {
+ my $self = shift;
+ local $_ = $self->parse (@_);
+ s/\s+$//;
+ s/\s*\n\s*/ /g;
+ if ($$self{ITEMS} > 1) {
+ $$self{ITEMS} = 0;
+ $self->output (".PD\n");
+ }
+ $self->makespace;
+ $self->output ($self->textmapfonts ($_) . "\n");
+ $self->outindex ('Subsection', $_);
+ $$self{NEEDSPACE} = 1;
+}
+
# Start a list. For indents after the first, wrap the outside indent in .RS
# so that hanging paragraph tags will be correct.
sub cmd_over {
@@ -682,17 +740,19 @@ sub cmd_item {
my $index;
if (/\w/ && !/^\w[.\)]\s*$/) {
$index = $_;
- $index =~ s/^\s*[-*+o.]?\s*//;
+ $index =~ s/^\s*[-*+o.]?(?:\s+|\Z)//;
}
s/^\*(\s|\Z)/\\\(bu$1/;
if ($$self{WEIRDINDENT}) {
$self->output (".RE\n");
$$self{WEIRDINDENT} = 0;
}
- $_ = $self->mapfonts ($_);
- $self->output (switchquotes ('.Ip', $_, $$self{INDENT}));
+ $_ = $self->textmapfonts ($_);
+ $self->output (".PD 0\n") if ($$self{ITEMS} == 1);
+ $self->output ($self->switchquotes ('.Ip', $_, $$self{INDENT}));
$self->outindex ($index ? ('Item', $index) : ());
$$self{NEEDSPACE} = 0;
+ $$self{ITEMS}++;
}
# Begin a block for a particular translator. Setting VERBATIM triggers
@@ -746,6 +806,10 @@ sub buildlink {
s/^\s+//;
s/\s+$//;
+ # If the argument looks like a URL, return it verbatim. This only
+ # handles URLs that use the server syntax.
+ if (m%^[a-z]+://\S+$%) { return $_ }
+
# Default to using the whole content of the link entry as a section
# name. Note that L<manpage/> forces a manpage interpretation, as does
# something looking like L<manpage(section)>. Do the same thing to
@@ -795,18 +859,52 @@ sub buildlink {
# At this point, we'll have embedded font codes of the form \f(<font>[SE]
# where <font> is one of B, I, or F. Turn those into the right font start
-# or end codes. B<someI<thing> else> should map to \fBsome\f(BIthing\fB
-# else\fR. The old pod2man didn't get this right; the second \fB was \fR,
-# so nested sequences didn't work right. We take care of this by using
-# variables as a combined pointer to our current font sequence, and set each
-# to the number of current nestings of start tags for that font. Use them
-# as a vector to look up what font sequence to use.
+# or end codes. The old pod2man didn't get B<someI<thing> else> right;
+# after I<> it switched back to normal text rather than bold. We take care
+# of this by using variables as a combined pointer to our current font
+# sequence, and set each to the number of current nestings of start tags for
+# that font. Use them as a vector to look up what font sequence to use.
+#
+# \fP changes to the previous font, but only one previous font is kept. We
+# don't know what the outside level font is; normally it's R, but if we're
+# inside a heading it could be something else. So arrange things so that
+# the outside font is always the "previous" font and end with \fP instead of
+# \fR. Idea from Zack Weinberg.
sub mapfonts {
my $self = shift;
local $_ = shift;
my ($fixed, $bold, $italic) = (0, 0, 0);
my %magic = (F => \$fixed, B => \$bold, I => \$italic);
+ my $last = '\fR';
+ s { \\f\((.)(.) } {
+ my $sequence = '';
+ my $f;
+ if ($last ne '\fR') { $sequence = '\fP' }
+ ${ $magic{$1} } += ($2 eq 'S') ? 1 : -1;
+ $f = $$self{FONTS}{($fixed && 1) . ($bold && 1) . ($italic && 1)};
+ if ($f eq $last) {
+ '';
+ } else {
+ if ($f ne '\fR') { $sequence .= $f }
+ $last = $f;
+ $sequence;
+ }
+ }gxe;
+ $_;
+}
+
+# Unfortunately, there is a bug in Solaris 2.6 nroff (not present in GNU
+# groff) where the sequence \fB\fP\f(CW\fP leaves the font set to B rather
+# than R, presumably because \f(CW doesn't actually do a font change. To
+# work around this, use a separate textmapfonts for text blocks where the
+# default font is always R and only use the smart mapfonts for headings.
+sub textmapfonts {
+ my $self = shift;
+ local $_ = shift;
+
+ my ($fixed, $bold, $italic) = (0, 0, 0);
+ my %magic = (F => \$fixed, B => \$bold, I => \$italic);
s { \\f\((.)(.) } {
${ $magic{$1} } += ($2 eq 'S') ? 1 : -1;
$$self{FONTS}{($fixed && 1) . ($bold && 1) . ($italic && 1)};
@@ -825,13 +923,15 @@ sub parse {
$self->parse_text ({ -expand_seq => 'sequence',
-expand_ptree => 'collapse' }, @_);
}
-
+
# Takes a parse tree and a flag saying whether or not to treat it as literal
# text (not call guesswork on it), and returns the concatenation of all of
# the text strings in that parse tree. If the literal flag isn't true,
# guesswork() will be called on all plain scalars in the parse tree.
-# Assumes that everything in the parse tree is either a scalar or a
-# reference to a scalar.
+# Otherwise, just escape backslashes in the normal case. If collapse is
+# being called on a C<> sequence, literal is set to 2, and we do some
+# additional cleanup. Assumes that everything in the parse tree is either a
+# scalar or a reference to a scalar.
sub collapse {
my ($self, $ptree, $literal) = @_;
if ($literal) {
@@ -840,6 +940,8 @@ sub collapse {
$$_;
} else {
s/\\/\\e/g;
+ s/-/\\-/g if $literal > 1;
+ s/__/_\\|_/g if $literal > 1;
$_;
}
} $ptree->children);
@@ -935,7 +1037,10 @@ sub guesswork {
# Make vertical whitespace.
sub makespace {
my $self = shift;
- $self->output ($$self{INDENT} > 0 ? ".Sp\n" : ".PP\n");
+ $self->output (".PD\n") if ($$self{ITEMS} > 1);
+ $$self{ITEMS} = 0;
+ $self->output ($$self{INDENT} > 0 ? ".Sp\n" : ".PP\n")
+ if $$self{NEEDSPACE};
}
# Output any pending index entries, and optionally an index entry given as
@@ -964,6 +1069,44 @@ sub outindex {
# Output text to the output device.
sub output { print { $_[0]->output_handle } $_[1] }
+# Given a command and a single argument that may or may not contain double
+# quotes, handle double-quote formatting for it. If there are no double
+# quotes, just return the command followed by the argument in double quotes.
+# If there are double quotes, use an if statement to test for nroff, and for
+# nroff output the command followed by the argument in double quotes with
+# embedded double quotes doubled. For other formatters, remap paired double
+# quotes to LQUOTE and RQUOTE.
+sub switchquotes {
+ my $self = shift;
+ my $command = shift;
+ local $_ = shift;
+ my $extra = shift;
+ s/\\\*\([LR]\"/\"/g;
+
+ # We also have to deal with \*C` and \*C', which are used to add the
+ # quotes around C<> text, since they may expand to " and if they do this
+ # confuses the .SH macros and the like no end. Expand them ourselves.
+ # If $extra is set, we're dealing with =item, which in most nroff macro
+ # sets requires an extra level of quoting of double quotes.
+ my $c_is_quote = ($$self{LQUOTE} =~ /\"/) || ($$self{RQUOTE} =~ /\"/);
+ if (/\"/ || ($c_is_quote && /\\\*\(C[\'\`]/)) {
+ s/\"/\"\"/g;
+ my $troff = $_;
+ $troff =~ s/\"\"([^\"]*)\"\"/\`\`$1\'\'/g;
+ s/\\\*\(C\`/$$self{LQUOTE}/g;
+ s/\\\*\(C\'/$$self{RQUOTE}/g;
+ $troff =~ s/\\\*\(C[\'\`]//g;
+ s/\"/\"\"/g if $extra;
+ $troff =~ s/\"/\"\"/g if $extra;
+ $_ = qq("$_") . ($extra ? " $extra" : '');
+ $troff = qq("$troff") . ($extra ? " $extra" : '');
+ return ".if n $command $_\n.el $command $troff\n";
+ } else {
+ $_ = qq("$_") . ($extra ? " $extra" : '');
+ return "$command $_\n";
+ }
+}
+
__END__
.\" These are some extra bits of roff that I don't want to lose track of
@@ -1096,6 +1239,18 @@ Pod::Man doesn't assume you have this, and defaults to CB. Some systems
(such as Solaris) have this font available as CX. Only matters for troff(1)
output.
+=item quotes
+
+Sets the quote marks used to surround CE<lt>> text. If the value is a
+single character, it is used as both the left and right quote; if it is two
+characters, the first character is used as the left quote and the second as
+the right quoted; and if it is four characters, the first two are used as
+the left quote and the second two as the right quote.
+
+This may also be set to the special value C<none>, in which case no quote
+marks are added around CE<lt>> text (but the font is still changed for troff
+output).
+
=item release
Set the centered footer. By default, this is the version of Perl you run
@@ -1132,7 +1287,7 @@ details.
=over 4
-=item roff font should be 1 or 2 chars, not `%s'
+=item roff font should be 1 or 2 chars, not "%s"
(F) You specified a *roff font (using C<fixed>, C<fixedbold>, etc.) that
wasn't either one or two characters. Pod::Man doesn't support *roff fonts
@@ -1145,6 +1300,16 @@ versions of nroff(1) and troff(1) don't either).
unable to parse. You should never see this error message; it probably
indicates a bug in Pod::Man.
+=item Invalid quote specification "%s"
+
+(F) The quote specification given (the quotes option to the constructor) was
+invalid. A quote specification must be one, two, or four characters long.
+
+=item %s:%d: Unknown command paragraph "%s".
+
+(W) The POD source contained a non-standard command paragraph (something of
+the form C<=command args>) that Pod::Man didn't know about. It was ignored.
+
=item Unknown escape EE<lt>%sE<gt>
(W) The POD source contained an C<EE<lt>E<gt>> escape that Pod::Man didn't
@@ -1155,6 +1320,11 @@ know about. C<EE<lt>%sE<gt>> was printed verbatim in the output.
(W) The POD source contained a non-standard interior sequence (something of
the form C<XE<lt>E<gt>>) that Pod::Man didn't know about. It was ignored.
+=item %s: Unknown command paragraph "%s" on line %d.
+
+(W) The POD source contained a non-standard command paragraph (something of
+the form C<=command args>) that Pod::Man didn't know about. It was ignored.
+
=item Unmatched =back
(W) Pod::Man encountered a C<=back> command that didn't correspond to an
diff --git a/contrib/perl5/lib/Pod/ParseUtils.pm b/contrib/perl5/lib/Pod/ParseUtils.pm
index 2cb8cdc..7d994c7 100644
--- a/contrib/perl5/lib/Pod/ParseUtils.pm
+++ b/contrib/perl5/lib/Pod/ParseUtils.pm
@@ -10,7 +10,7 @@
package Pod::ParseUtils;
use vars qw($VERSION);
-$VERSION = 0.2; ## Current version of this package
+$VERSION = 0.22; ## Current version of this package
require 5.005; ## requires this Perl version or later
=head1 NAME
@@ -49,7 +49,7 @@ The following methods are available:
=over 4
-=item new()
+=item Pod::List-E<gt>new()
Create a new list object. Properties may be specified through a hash
reference like this:
@@ -79,7 +79,7 @@ sub initialize {
$self->{-type} ||= '';
}
-=item file()
+=item $list-E<gt>file()
Without argument, retrieves the file name the list is in. This must
have been set before by either specifying B<-file> in the B<new()>
@@ -92,7 +92,7 @@ sub file {
return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file};
}
-=item start()
+=item $list-E<gt>start()
Without argument, retrieves the line number where the list started.
This must have been set before by either specifying B<-start> in the
@@ -106,7 +106,7 @@ sub start {
return (@_ > 1) ? ($_[0]->{-start} = $_[1]) : $_[0]->{-start};
}
-=item indent()
+=item $list-E<gt>indent()
Without argument, retrieves the indent level of the list as specified
in C<=over n>. This must have been set before by either specifying
@@ -120,7 +120,7 @@ sub indent {
return (@_ > 1) ? ($_[0]->{-indent} = $_[1]) : $_[0]->{-indent};
}
-=item type()
+=item $list-E<gt>type()
Without argument, retrieves the list type, which can be an arbitrary value,
e.g. C<OL>, C<UL>, ... when thinking the HTML way.
@@ -135,7 +135,7 @@ sub type {
return (@_ > 1) ? ($_[0]->{-type} = $_[1]) : $_[0]->{-type};
}
-=item rx()
+=item $list-E<gt>rx()
Without argument, retrieves a regular expression for simplifying the
individual item strings once the list type has been determined. Usage:
@@ -152,7 +152,7 @@ sub rx {
return (@_ > 1) ? ($_[0]->{-rx} = $_[1]) : $_[0]->{-rx};
}
-=item item()
+=item $list-E<gt>item()
Without argument, retrieves the array of the items in this list.
The items may be represented by any scalar.
@@ -172,7 +172,7 @@ sub item {
}
}
-=item parent()
+=item $list-E<gt>parent()
Without argument, retrieves information about the parent holding this
list, which is represented as an arbitrary scalar.
@@ -188,7 +188,7 @@ sub parent {
return (@_ > 1) ? ($_[0]->{-parent} = $_[1]) : $_[0]->{-parent};
}
-=item tag()
+=item $list-E<gt>tag()
Without argument, retrieves information about the list tag, which can be
any scalar.
@@ -227,7 +227,7 @@ used to construct hyperlinks.
=over 4
-=item new()
+=item Pod::Hyperlink-E<gt>new()
The B<new()> method can either be passed a set of key/value pairs or a single
scalar value, namely the contents of a C<LE<lt>...E<gt>> sequence. An object
@@ -269,10 +269,14 @@ sub initialize {
$self->{_warnings} = [];
}
-=item parse($string)
+=item $link-E<gt>parse($string)
This method can be used to (re)parse a (new) hyperlink, i.e. the contents
of a C<LE<lt>...E<gt>> sequence. The result is stored in the current object.
+Warnings are stored in the B<warnings> property.
+E.g. sections like C<LE<lt>open(2)E<gt>> are deprected, as they do not point
+to Perl documents. C<LE<lt>DBI::foo(3p)E<gt>> is wrong as well, the manpage
+section can simply be dropped.
=cut
@@ -280,14 +284,13 @@ sub parse {
my $self = shift;
local($_) = $_[0];
# syntax check the link and extract destination
- my ($alttext,$page,$node,$type) = ('','','','');
+ my ($alttext,$page,$node,$type) = (undef,'','','');
$self->{_warnings} = [];
# collapse newlines with whitespace
- if(s/\s*\n+\s*/ /g) {
- $self->warning("collapsing newlines to blanks");
- }
+ s/\s*\n+\s*/ /g;
+
# strip leading/trailing whitespace
if(s/^[\s\n]+//) {
$self->warning("ignoring leading whitespace in link");
@@ -308,25 +311,24 @@ sub parse {
# 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.]+)*';
+ my $page_rx = '[\w.]+(?:::[\w.]+)*(?:[(](?:\d\w*|)[)]|)';
+ # page name only
if(m!^($page_rx)$!o) {
$page = $1;
$type = 'page';
}
# alttext, page and "section"
- elsif(m!^(.+?)\s*[|]\s*($page_rx)\s*/\s*"(.+)"$!o) {
+ elsif(m!^(.*?)\s*[|]\s*($page_rx)\s*/\s*"(.+)"$!o) {
($alttext, $page, $node) = ($1, $2, $3);
$type = 'section';
}
# alttext and page
- elsif(m!^(.+?)\s*[|]\s*($page_rx)$!o) {
+ elsif(m!^(.*?)\s*[|]\s*($page_rx)$!o) {
($alttext, $page) = ($1, $2);
$type = 'page';
}
# alttext and "section"
- elsif(m!^(.+?)\s*[|]\s*(?:/\s*|)"(.+)"$!) {
+ elsif(m!^(.*?)\s*[|]\s*(?:/\s*|)"(.+)"$!) {
($alttext, $node) = ($1,$2);
$type = 'section';
}
@@ -356,16 +358,16 @@ sub parse {
$type = 'hyperlink';
}
# alttext, page and item
- elsif(m!^(.+?)\s*[|]\s*($page_rx)\s*/\s*(.+)$!o) {
+ elsif(m!^(.*?)\s*[|]\s*($page_rx)\s*/\s*(.+)$!o) {
($alttext, $page, $node) = ($1, $2, $3);
$type = 'item';
}
# alttext and item
- elsif(m!^(.+?)\s*[|]\s*/(.+)$!) {
+ elsif(m!^(.*?)\s*[|]\s*/(.+)$!) {
($alttext, $node) = ($1,$2);
}
# nonstandard: alttext and hyperlink
- elsif(m!^(.+?)\s*[|]\s*((?:http|ftp|mailto|news):.+)$!) {
+ elsif(m!^(.*?)\s*[|]\s*((?:http|ftp|mailto|news):.+)$!) {
($alttext, $node) = ($1,$2);
$type = 'hyperlink';
}
@@ -377,9 +379,19 @@ sub parse {
# collapse whitespace in nodes
$node =~ s/\s+/ /gs;
- #if($page =~ /[(]\w*[)]$/) {
- # $self->warning("section in '$page' deprecated");
- #}
+ # empty alternative text expands to node name
+ if(defined $alttext) {
+ if(!length($alttext)) {
+ $alttext = $node | $page;
+ }
+ }
+ else {
+ $alttext = '';
+ }
+
+ if($page =~ /[(]\w*[)]$/) {
+ $self->warning("(section) in '$page' deprecated");
+ }
if($node =~ m:[|/]:) {
$self->warning("node '$node' contains non-escaped | or /");
}
@@ -435,7 +447,7 @@ sub _construct_text {
}
}
-=item markup($string)
+=item $link-E<gt>markup($string)
Set/retrieve the textual value of the link. This string contains special
markers C<PE<lt>E<gt>> and C<QE<lt>E<gt>> that should be expanded by the
@@ -450,7 +462,7 @@ sub markup {
return (@_ > 1) ? ($_[0]->{_markup} = $_[1]) : $_[0]->{_markup};
}
-=item text()
+=item $link-E<gt>text()
This method returns the textual representation of the hyperlink as above,
but without markers (read only). Depending on the link type this is one of
@@ -469,7 +481,7 @@ sub text {
$_[0]->{_text};
}
-=item warning()
+=item $link-E<gt>warning()
After parsing, this method returns any warnings encountered during the
parsing process.
@@ -486,7 +498,9 @@ sub warning {
return @{$self->{_warnings}};
}
-=item line(), file()
+=item $link-E<gt>file()
+
+=item $link-E<gt>line()
Just simple slots for storing information about the line and the file
the link was encountered in. Has to be filled in manually.
@@ -503,7 +517,7 @@ sub file {
return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file};
}
-=item page()
+=item $link-E<gt>page()
This method sets or returns the POD page this link points to.
@@ -518,7 +532,7 @@ sub page {
$_[0]->{-page};
}
-=item node()
+=item $link-E<gt>node()
As above, but the destination node text of the link.
@@ -533,7 +547,7 @@ sub node {
$_[0]->{-node};
}
-=item alttext()
+=item $link-E<gt>alttext()
Sets or returns an alternative text specified in the link.
@@ -548,7 +562,7 @@ sub alttext {
$_[0]->{-alttext};
}
-=item type()
+=item $link-E<gt>type()
The node type, either C<section> or C<item>. As an unofficial type,
there is also C<hyperlink>, derived from e.g. C<LE<lt>http://perl.comE<gt>>
@@ -560,7 +574,7 @@ sub type {
return (@_ > 1) ? ($_[0]->{-type} = $_[1]) : $_[0]->{-type};
}
-=item link()
+=item $link-E<gt>link()
Returns the link as contents of C<LE<lt>E<gt>>. Reciprocal to B<parse()>.
@@ -620,7 +634,7 @@ The following methods are available:
=over 4
-=item new()
+=item Pod::Cache-E<gt>new()
Create a new cache object. This object can hold an arbitrary number of
POD documents of class Pod::Cache::Item.
@@ -635,7 +649,7 @@ sub new {
return $self;
}
-=item item()
+=item $cache-E<gt>item()
Add a new item to the cache. Without arguments, this method returns a
list of all cache elements.
@@ -654,7 +668,7 @@ sub item {
}
}
-=item find_page($name)
+=item $cache-E<gt>find_page($name)
Look for a POD document named C<$name> in the cache. Returns the
reference to the corresponding Pod::Cache::Item object or undef if
@@ -686,7 +700,7 @@ The following methods are available:
=over 4
-=item new()
+=item Pod::Cache::Item-E<gt>new()
Create a new object.
@@ -707,7 +721,7 @@ sub initialize {
$self->{-nodes} = [] unless(defined $self->{-nodes});
}
-=item page()
+=item $cacheitem-E<gt>page()
Set/retrieve the POD document name (e.g. "Pod::Parser").
@@ -718,7 +732,7 @@ sub page {
return (@_ > 1) ? ($_[0]->{-page} = $_[1]) : $_[0]->{-page};
}
-=item description()
+=item $cacheitem-E<gt>description()
Set/retrieve the POD short description as found in the C<=head1 NAME>
section.
@@ -730,7 +744,7 @@ sub description {
return (@_ > 1) ? ($_[0]->{-description} = $_[1]) : $_[0]->{-description};
}
-=item path()
+=item $cacheitem-E<gt>path()
Set/retrieve the POD file storage path.
@@ -741,7 +755,7 @@ sub path {
return (@_ > 1) ? ($_[0]->{-path} = $_[1]) : $_[0]->{-path};
}
-=item file()
+=item $cacheitem-E<gt>file()
Set/retrieve the POD file name.
@@ -752,7 +766,7 @@ sub file {
return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file};
}
-=item nodes()
+=item $cacheitem-E<gt>nodes()
Add a node (or a list of nodes) to the document's node list. Note that
the order is kept, i.e. start with the first node and end with the last.
@@ -775,14 +789,12 @@ sub nodes {
}
}
-=item find_node($name)
+=item $cacheitem-E<gt>find_node($name)
Look for a node or index entry named C<$name> in the object.
Returns the unique id of the node (i.e. the second element of the array
stored in the node arry) or undef if not found.
-=back
-
=cut
sub find_node {
@@ -798,7 +810,7 @@ sub find_node {
undef;
}
-=item idx()
+=item $cacheitem-E<gt>idx()
Add an index entry (or a list of them) to the document's index list. Note that
the order is kept, i.e. start with the first node and end with the last.
@@ -807,6 +819,8 @@ same order the entries have been added.
An index entry can be any scalar, but usually is a pair of string and
unique id.
+=back
+
=cut
# The POD index entries
diff --git a/contrib/perl5/lib/Pod/Parser.pm b/contrib/perl5/lib/Pod/Parser.pm
index 48fc198..6782519 100644
--- a/contrib/perl5/lib/Pod/Parser.pm
+++ b/contrib/perl5/lib/Pod/Parser.pm
@@ -10,7 +10,7 @@
package Pod::Parser;
use vars qw($VERSION);
-$VERSION = 1.12; ## Current version of this package
+$VERSION = 1.13; ## Current version of this package
require 5.005; ## requires this Perl version or later
#############################################################################
@@ -205,7 +205,6 @@ use strict;
use Pod::InputObjects;
use Carp;
use Exporter;
-require VMS::Filespec if $^O eq 'VMS';
BEGIN {
if ($] < 5.6) {
require Symbol;
@@ -783,11 +782,11 @@ sub parse_text {
## Iterate over all sequence starts text (NOTE: split with
## capturing parens keeps the delimiters)
$_ = $text;
- my @tokens = split /([A-Z]<(?:<+\s+)?)/;
+ my @tokens = split /([A-Z]<(?:<+\s)?)/;
while ( @tokens ) {
$_ = shift @tokens;
## Look for the beginning of a sequence
- if ( /^([A-Z])(<(?:<+\s+)?)$/ ) {
+ if ( /^([A-Z])(<(?:<+\s)?)$/ ) {
## Push a new sequence onto the stack of those "in-progress"
($cmd, $ldelim) = ($1, $2);
$seq = Pod::InteriorSequence->new(
@@ -848,7 +847,6 @@ sub parse_text {
my $errorsub = (@seq_stack > 1) ? $self->errorsub() : undef;
while (@seq_stack > 1) {
($cmd, $file, $line) = ($seq->name, $seq->file_line);
- $file = VMS::Filespec::unixify($file) if $^O eq 'VMS';
$ldelim = $seq->ldelim;
($rdelim = $ldelim) =~ tr/</>/;
$rdelim =~ s/^(\S+)(\s*)$/$2$1/;
@@ -1081,10 +1079,9 @@ sub parse_from_filehandle {
&& (length $paragraph));
## Issue a warning about any non-empty blank lines
- if (length($1) > 1 and $myOpts{'-warnings'} and ! $myData{_CUTTING}) {
+ if (length($1) > 0 and $myOpts{'-warnings'} and ! $myData{_CUTTING}) {
my $errorsub = $self->errorsub();
my $file = $self->input_file();
- $file = VMS::Filespec::unixify($file) if $^O eq 'VMS';
my $errmsg = "*** WARNING: line containing nothing but whitespace".
" in paragraph at line $nlines in file $file\n";
(ref $errorsub) and &{$errorsub}($errmsg)
diff --git a/contrib/perl5/lib/Pod/Select.pm b/contrib/perl5/lib/Pod/Select.pm
index 5dd1595..e7c820f 100644
--- a/contrib/perl5/lib/Pod/Select.pm
+++ b/contrib/perl5/lib/Pod/Select.pm
@@ -10,7 +10,7 @@
package Pod::Select;
use vars qw($VERSION);
-$VERSION = 1.12; ## Current version of this package
+$VERSION = 1.13; ## Current version of this package
require 5.005; ## requires this Perl version or later
#############################################################################
@@ -92,7 +92,7 @@ The formal syntax of a section specification is:
=over 4
-=item
+=item *
I<head1-title-regex>/I<head2-title-regex>/...
@@ -109,33 +109,39 @@ Some example section specifications follow.
=over 4
-=item
+=item *
+
Match the C<NAME> and C<SYNOPSIS> sections and all of their subsections:
C<NAME|SYNOPSIS>
-=item
+=item *
+
Match only the C<Question> and C<Answer> subsections of the C<DESCRIPTION>
section:
C<DESCRIPTION/Question|Answer>
-=item
+=item *
+
Match the C<Comments> subsection of I<all> sections:
C</Comments>
-=item
+=item *
+
Match all subsections of C<DESCRIPTION> I<except> for C<Comments>:
C<DESCRIPTION/!Comments>
-=item
+=item *
+
Match the C<DESCRIPTION> section but do I<not> match any of its subsections:
C<DESCRIPTION/!.+>
-=item
+=item *
+
Match all top level sections but none of their subsections:
C</!.+>
@@ -160,7 +166,7 @@ The formal syntax of a range specification is:
=over 4
-=item
+=item *
/I<start-range-regex>/[../I<end-range-regex>/]
diff --git a/contrib/perl5/lib/Pod/Text.pm b/contrib/perl5/lib/Pod/Text.pm
index d93e5a4..9936025 100644
--- a/contrib/perl5/lib/Pod/Text.pm
+++ b/contrib/perl5/lib/Pod/Text.pm
@@ -1,7 +1,7 @@
# Pod::Text -- Convert POD data to formatted ASCII text.
-# $Id: Text.pm,v 2.3 1999/10/07 09:41:57 eagle Exp $
+# $Id: Text.pm,v 2.8 2001/02/10 06:50:23 eagle Exp $
#
-# Copyright 1999 by Russ Allbery <rra@stanford.edu>
+# Copyright 1999, 2000, 2001 by Russ Allbery <rra@stanford.edu>
#
# This program is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -33,7 +33,11 @@ use vars qw(@ISA @EXPORT %ESCAPES $VERSION);
# We have to export pod2text for backward compatibility.
@EXPORT = qw(pod2text);
-($VERSION = (split (' ', q$Revision: 2.3 $ ))[1]) =~ s/\.(\d)$/.0$1/;
+# Don't use the CVS revision as the version, since this module is also in
+# Perl core and too many things could munge CVS magic revision strings.
+# This number should ideally be the same as the CVS revision in podlators,
+# however.
+$VERSION = 2.08;
############################################################################
@@ -43,13 +47,15 @@ use vars qw(@ISA @EXPORT %ESCAPES $VERSION);
# This table is taken near verbatim from Pod::PlainText in Pod::Parser,
# which got it near verbatim from the original Pod::Text. It is therefore
# credited to Tom Christiansen, and I'm glad I didn't have to write it. :)
-# "iexcl" to "divide" added by Tim Jenness
+# "iexcl" to "divide" added by Tim Jenness.
%ESCAPES = (
'amp' => '&', # ampersand
'lt' => '<', # left chevron, less-than
'gt' => '>', # right chevron, greater-than
'quot' => '"', # double quote
-
+ 'sol' => '/', # solidus (forward slash)
+ 'verbar' => '|', # vertical bar
+
"Aacute" => "\xC1", # capital A, acute accent
"aacute" => "\xE1", # small a, acute accent
"Acirc" => "\xC2", # capital A, circumflex accent
@@ -76,8 +82,8 @@ use vars qw(@ISA @EXPORT %ESCAPES $VERSION);
"eth" => "\xF0", # small eth, Icelandic
"Euml" => "\xCB", # capital E, dieresis or umlaut mark
"euml" => "\xEB", # small e, dieresis or umlaut mark
- "Iacute" => "\xCD", # capital I, acute accent
- "iacute" => "\xED", # small i, acute accent
+ "Iacute" => "\xCC", # capital I, acute accent
+ "iacute" => "\xEC", # small i, acute accent
"Icirc" => "\xCE", # capital I, circumflex accent
"icirc" => "\xEE", # small i, circumflex accent
"Igrave" => "\xCD", # capital I, grave accent
@@ -112,43 +118,43 @@ use vars qw(@ISA @EXPORT %ESCAPES $VERSION);
"Yacute" => "\xDD", # capital Y, acute accent
"yacute" => "\xFD", # small y, acute accent
"yuml" => "\xFF", # small y, dieresis or umlaut mark
-
- "lchevron" => "\xAB", # left chevron (double less than) laquo
- "rchevron" => "\xBB", # right chevron (double greater than) raquo
-
- "iexcl" => "\xA1", # inverted exclamation mark
- "cent" => "\xA2", # cent sign
- "pound" => "\xA3", # (UK) pound sign
- "curren" => "\xA4", # currency sign
- "yen" => "\xA5", # yen sign
- "brvbar" => "\xA6", # broken vertical bar
- "sect" => "\xA7", # section sign
- "uml" => "\xA8", # diaresis
- "copy" => "\xA9", # Copyright symbol
- "ordf" => "\xAA", # feminine ordinal indicator
- "laquo" => "\xAB", # left pointing double angle quotation mark
- "not" => "\xAC", # not sign
- "shy" => "\xAD", # soft hyphen
- "reg" => "\xAE", # registered trademark
- "macr" => "\xAF", # macron, overline
- "deg" => "\xB0", # degree sign
- "plusmn" => "\xB1", # plus-minus sign
- "sup2" => "\xB2", # superscript 2
- "sup3" => "\xB3", # superscript 3
- "acute" => "\xB4", # acute accent
- "micro" => "\xB5", # micro sign
- "para" => "\xB6", # pilcrow sign = paragraph sign
- "middot" => "\xB7", # middle dot = Georgian comma
- "cedil" => "\xB8", # cedilla
- "sup1" => "\xB9", # superscript 1
- "ordm" => "\xBA", # masculine ordinal indicator
- "raquo" => "\xBB", # right pointing double angle quotation mark
- "frac14" => "\xBC", # vulgar fraction one quarter
- "frac12" => "\xBD", # vulgar fraction one half
- "frac34" => "\xBE", # vulgar fraction three quarters
- "iquest" => "\xBF", # inverted question mark
- "times" => "\xD7", # multiplication sign
- "divide" => "\xF7", # division sign
+
+ "laquo" => "\xAB", # left pointing double angle quotation mark
+ "lchevron" => "\xAB", # synonym (backwards compatibility)
+ "raquo" => "\xBB", # right pointing double angle quotation mark
+ "rchevron" => "\xBB", # synonym (backwards compatibility)
+
+ "iexcl" => "\xA1", # inverted exclamation mark
+ "cent" => "\xA2", # cent sign
+ "pound" => "\xA3", # (UK) pound sign
+ "curren" => "\xA4", # currency sign
+ "yen" => "\xA5", # yen sign
+ "brvbar" => "\xA6", # broken vertical bar
+ "sect" => "\xA7", # section sign
+ "uml" => "\xA8", # diaresis
+ "copy" => "\xA9", # Copyright symbol
+ "ordf" => "\xAA", # feminine ordinal indicator
+ "not" => "\xAC", # not sign
+ "shy" => "\xAD", # soft hyphen
+ "reg" => "\xAE", # registered trademark
+ "macr" => "\xAF", # macron, overline
+ "deg" => "\xB0", # degree sign
+ "plusmn" => "\xB1", # plus-minus sign
+ "sup2" => "\xB2", # superscript 2
+ "sup3" => "\xB3", # superscript 3
+ "acute" => "\xB4", # acute accent
+ "micro" => "\xB5", # micro sign
+ "para" => "\xB6", # pilcrow sign = paragraph sign
+ "middot" => "\xB7", # middle dot = Georgian comma
+ "cedil" => "\xB8", # cedilla
+ "sup1" => "\xB9", # superscript 1
+ "ordm" => "\xBA", # masculine ordinal indicator
+ "frac14" => "\xBC", # vulgar fraction one quarter
+ "frac12" => "\xBD", # vulgar fraction one half
+ "frac34" => "\xBE", # vulgar fraction three quarters
+ "iquest" => "\xBF", # inverted question mark
+ "times" => "\xD7", # multiplication sign
+ "divide" => "\xF7", # division sign
);
@@ -166,6 +172,20 @@ sub initialize {
$$self{sentence} = 0 unless defined $$self{sentence};
$$self{width} = 76 unless defined $$self{width};
+ # Figure out what quotes we'll be using for C<> text.
+ $$self{quotes} ||= '"';
+ if ($$self{quotes} eq 'none') {
+ $$self{LQUOTE} = $$self{RQUOTE} = '';
+ } elsif (length ($$self{quotes}) == 1) {
+ $$self{LQUOTE} = $$self{RQUOTE} = $$self{quotes};
+ } elsif ($$self{quotes} =~ /^(.)(.)$/
+ || $$self{quotes} =~ /^(..)(..)$/) {
+ $$self{LQUOTE} = $1;
+ $$self{RQUOTE} = $2;
+ } else {
+ croak qq(Invalid quote specification "$$self{quotes}");
+ }
+
$$self{INDENTS} = []; # Stack of indentations.
$$self{MARGIN} = $$self{indent}; # Current left margin in spaces.
@@ -187,8 +207,18 @@ sub command {
return if $command eq 'pod';
return if ($$self{EXCLUDE} && $command ne 'end');
$self->item ("\n") if defined $$self{ITEM};
- $command = 'cmd_' . $command;
- $self->$command (@_);
+ if ($self->can ('cmd_' . $command)) {
+ $command = 'cmd_' . $command;
+ $self->$command (@_);
+ } else {
+ my ($text, $line, $paragraph) = @_;
+ my $file;
+ ($file, $line) = $paragraph->file_line;
+ $text =~ s/\n+\z//;
+ $text = " $text" if ($text =~ /^\S/);
+ warn qq($file:$line: Unknown command paragraph "=$command$text"\n);
+ return;
+ }
}
# Called for a verbatim paragraph. Gets the paragraph, the line number, and
@@ -228,7 +258,7 @@ sub textblock {
>
(
,?\s+(and\s+)? # Allow lots of them, conjuncted.
- L<
+ L<
/
(
[:\w]+
@@ -346,6 +376,32 @@ sub cmd_head2 {
}
}
+# Third level heading.
+sub cmd_head3 {
+ my $self = shift;
+ local $_ = shift;
+ s/\s+$//;
+ $_ = $self->interpolate ($_, shift);
+ if ($$self{alt}) {
+ $self->output ("\n= $_ =\n\n");
+ } else {
+ $self->output (' ' x ($$self{indent} * 2 / 3 + 0.5) . $_ . "\n\n");
+ }
+}
+
+# Third level heading.
+sub cmd_head4 {
+ my $self = shift;
+ local $_ = shift;
+ s/\s+$//;
+ $_ = $self->interpolate ($_, shift);
+ if ($$self{alt}) {
+ $self->output ("\n- $_ -\n\n");
+ } else {
+ $self->output (' ' x ($$self{indent} * 3 / 4 + 0.5) . $_ . "\n\n");
+ }
+}
+
# Start a list.
sub cmd_over {
my $self = shift;
@@ -393,7 +449,7 @@ sub cmd_end {
my $self = shift;
$$self{EXCLUDE} = 0;
$$self{VERBATIM} = 0;
-}
+}
# One paragraph for a particular translator. Ignore it unless it's intended
# for text, in which case we treat it as a verbatim text block.
@@ -413,9 +469,11 @@ sub cmd_for {
# The simple formatting ones. These are here mostly so that subclasses can
# override them and do more complicated things.
sub seq_b { return $_[0]{alt} ? "``$_[1]''" : $_[1] }
-sub seq_c { return $_[0]{alt} ? "``$_[1]''" : "`$_[1]'" }
sub seq_f { return $_[0]{alt} ? "\"$_[1]\"" : $_[1] }
sub seq_i { return '*' . $_[1] . '*' }
+sub seq_c {
+ return $_[0]{alt} ? "``$_[1]''" : "$_[0]{LQUOTE}$_[1]$_[0]{RQUOTE}"
+}
# The complicated one. Handle links. Since this is plain text, we can't
# actually make any real links, so this is all to figure out what text we
@@ -434,6 +492,10 @@ sub seq_l {
s/^\s+//;
s/\s+$//;
+ # If the argument looks like a URL, return it verbatim. This only
+ # handles URLs that use the server syntax.
+ if (m%^[a-z]+://\S+$%) { return $_ }
+
# Default to using the whole content of the link entry as a section
# name. Note that L<manpage/> forces a manpage interpretation, as does
# something looking like L<manpage(section)>. The latter is an
@@ -586,13 +648,14 @@ sub pod2text {
# means we need to turn the first argument into a file handle. Magic
# open will handle the <&STDIN case automagically.
if (defined $_[1]) {
+ my @fhs = @_;
local *IN;
- unless (open (IN, $_[0])) {
- croak ("Can't open $_[0] for reading: $!\n");
+ unless (open (IN, $fhs[0])) {
+ croak ("Can't open $fhs[0] for reading: $!\n");
return;
}
- $_[0] = \*IN;
- return $parser->parse_from_filehandle (@_);
+ $fhs[0] = \*IN;
+ return $parser->parse_from_filehandle (@fhs);
} else {
return $parser->parse_from_file (@_);
}
@@ -658,6 +721,17 @@ it's the expected formatting for manual pages; if you're formatting
arbitrary text documents, setting this to true may result in more pleasing
output.
+=item quotes
+
+Sets the quote marks used to surround CE<lt>> text. If the value is a
+single character, it is used as both the left and right quote; if it is two
+characters, the first character is used as the left quote and the second as
+the right quoted; and if it is four characters, the first two are used as
+the left quote and the second two as the right quote.
+
+This may also be set to the special value C<none>, in which case no quote
+marks are added around CE<lt>> text.
+
=item sentence
If set to a true value, Pod::Text will assume that each sentence ends in two
@@ -693,6 +767,16 @@ indicates a bug in Pod::Text; you should never see it.
(F) Pod::Text was invoked via the compatibility mode pod2text() interface
and the input file it was given could not be opened.
+=item Invalid quote specification "%s"
+
+(F) The quote specification given (the quotes option to the constructor) was
+invalid. A quote specification must be one, two, or four characters long.
+
+=item %s:%d: Unknown command paragraph "%s".
+
+(W) The POD source contained a non-standard command paragraph (something of
+the form C<=command args>) that Pod::Man didn't know about. It was ignored.
+
=item Unknown escape: %s
(W) The POD source contained an C<EE<lt>E<gt>> escape that Pod::Text didn't
diff --git a/contrib/perl5/lib/Pod/Text/Color.pm b/contrib/perl5/lib/Pod/Text/Color.pm
index 10e1d9f..e943216 100644
--- a/contrib/perl5/lib/Pod/Text/Color.pm
+++ b/contrib/perl5/lib/Pod/Text/Color.pm
@@ -1,5 +1,5 @@
# Pod::Text::Color -- Convert POD data to formatted color ASCII text
-# $Id: Color.pm,v 0.5 1999/09/20 10:15:16 eagle Exp $
+# $Id: Color.pm,v 0.6 2000/12/25 12:52:39 eagle Exp $
#
# Copyright 1999 by Russ Allbery <rra@stanford.edu>
#
@@ -26,8 +26,11 @@ use vars qw(@ISA $VERSION);
@ISA = qw(Pod::Text);
-# Use the CVS revision of this file as its version number.
-($VERSION = (split (' ', q$Revision: 0.5 $ ))[1]) =~ s/\.(\d)$/.0$1/;
+# Don't use the CVS revision as the version, since this module is also in
+# Perl core and too many things could munge CVS magic revision strings.
+# This number should ideally be the same as the CVS revision in podlators,
+# however.
+$VERSION = 0.06;
############################################################################
diff --git a/contrib/perl5/lib/Pod/Text/Termcap.pm b/contrib/perl5/lib/Pod/Text/Termcap.pm
index 7e89ec6..333852a 100644
--- a/contrib/perl5/lib/Pod/Text/Termcap.pm
+++ b/contrib/perl5/lib/Pod/Text/Termcap.pm
@@ -1,5 +1,5 @@
# Pod::Text::Termcap -- Convert POD data to ASCII text with format escapes.
-# $Id: Termcap.pm,v 0.4 1999/09/20 10:17:45 eagle Exp $
+# $Id: Termcap.pm,v 1.0 2000/12/25 12:52:48 eagle Exp $
#
# Copyright 1999 by Russ Allbery <rra@stanford.edu>
#
@@ -27,8 +27,11 @@ use vars qw(@ISA $VERSION);
@ISA = qw(Pod::Text);
-# Use the CVS revision of this file as its version number.
-($VERSION = (split (' ', q$Revision: 0.4 $ ))[1]) =~ s/\.(\d)$/.0$1/;
+# Don't use the CVS revision as the version, since this module is also in
+# Perl core and too many things could munge CVS magic revision strings.
+# This number should ideally be the same as the CVS revision in podlators,
+# however.
+$VERSION = 1.00;
############################################################################
diff --git a/contrib/perl5/lib/Pod/Usage.pm b/contrib/perl5/lib/Pod/Usage.pm
index aa8f712..3886076 100644
--- a/contrib/perl5/lib/Pod/Usage.pm
+++ b/contrib/perl5/lib/Pod/Usage.pm
@@ -10,7 +10,7 @@
package Pod::Usage;
use vars qw($VERSION);
-$VERSION = 1.12; ## Current version of this package
+$VERSION = 1.14; ## Current version of this package
require 5.005; ## requires this Perl version or later
=head1 NAME
@@ -46,7 +46,7 @@ B<pod2usage> should be given either a single argument, or a list of
arguments corresponding to an associative array (a "hash"). When a single
argument is given, it should correspond to exactly one of the following:
-=over
+=over 4
=item *
@@ -68,7 +68,7 @@ assumed to be a hash. If a hash is supplied (either as a reference or
as a list) it should contain one or more elements with the following
keys:
-=over
+=over 4
=item C<-message>
@@ -80,6 +80,9 @@ program's usage message.
=item C<-exitval>
The desired exit status to pass to the B<exit()> function.
+This should be an integer, or else the string "NOEXIT" to
+indicate that control should simply be returned without
+terminating the invoking process.
=item C<-verbose>
@@ -129,7 +132,7 @@ Unless they are explicitly specified, the default values for the exit
status, verbose level, and output stream to use are determined as
follows:
-=over
+=over 4
=item *
@@ -159,7 +162,7 @@ Although the above may seem a bit confusing at first, it generally does
"the right thing" in most situations. This determination of the default
values to use is based upon the following typical Unix conventions:
-=over
+=over 4
=item *
@@ -395,6 +398,7 @@ with re-writing this manpage.
use strict;
#use diagnostics;
use Carp;
+use Config;
use Exporter;
use File::Spec;
@@ -497,8 +501,19 @@ sub pod2usage {
}
## Now translate the pod document and then exit with the desired status
- $parser->parse_from_file($opts{"-input"}, $opts{"-output"});
- exit($opts{"-exitval"});
+ if ( $opts{"-verbose"} >= 2
+ and !ref($opts{"-input"})
+ and $opts{"-output"} == \*STDOUT )
+ {
+ ## spit out the entire PODs. Might as well invoke perldoc
+ my $progpath = File::Spec->catfile($Config{bin}, "perldoc");
+ system($progpath, $opts{"-input"});
+ }
+ else {
+ $parser->parse_from_file($opts{"-input"}, $opts{"-output"});
+ }
+
+ exit($opts{"-exitval"}) unless (lc($opts{"-exitval"}) eq 'noexit');
}
##---------------------------------------------------------------------------
diff --git a/contrib/perl5/lib/SelfLoader.pm b/contrib/perl5/lib/SelfLoader.pm
index 99372f2..3b9c52d 100644
--- a/contrib/perl5/lib/SelfLoader.pm
+++ b/contrib/perl5/lib/SelfLoader.pm
@@ -3,7 +3,7 @@ package SelfLoader;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(AUTOLOAD);
-$VERSION = "1.0901";
+$VERSION = "1.0902";
sub Version {$VERSION}
$DEBUG = 0;
@@ -20,6 +20,7 @@ sub croak { require Carp; goto &Carp::croak }
AUTOLOAD {
print STDERR "SelfLoader::AUTOLOAD for $AUTOLOAD\n" if $DEBUG;
my $SL_code = $Cache{$AUTOLOAD};
+ my $save = $@; # evals in both AUTOLOAD and _load_stubs can corrupt $@
unless ($SL_code) {
# Maybe this pack had stubs before __DATA__, and never initialized.
# Or, this maybe an automatic DESTROY method call when none exists.
@@ -31,11 +32,13 @@ AUTOLOAD {
croak "Undefined subroutine $AUTOLOAD" unless $SL_code;
}
print STDERR "SelfLoader::AUTOLOAD eval: $SL_code\n" if $DEBUG;
+
eval $SL_code;
if ($@) {
$@ =~ s/ at .*\n//;
croak $@;
}
+ $@ = $save;
defined(&$AUTOLOAD) || die "SelfLoader inconsistency error";
delete $Cache{$AUTOLOAD};
goto &$AUTOLOAD
diff --git a/contrib/perl5/lib/Shell.pm b/contrib/perl5/lib/Shell.pm
index 62aa829..c2f522c 100644
--- a/contrib/perl5/lib/Shell.pm
+++ b/contrib/perl5/lib/Shell.pm
@@ -1,8 +1,13 @@
package Shell;
use 5.005_64;
-our($capture_stderr, $VERSION);
+use strict;
+use warnings;
+our($capture_stderr, $VERSION, $AUTOLOAD);
-$VERSION = '0.2';
+$VERSION = '0.3';
+
+sub new { bless \$VERSION, shift } # Nothing better to bless
+sub DESTROY { }
sub import {
my $self = shift;
@@ -10,24 +15,24 @@ sub import {
my @EXPORT;
if (@_) {
@EXPORT = @_;
- }
- else {
+ } else {
@EXPORT = 'AUTOLOAD';
}
- foreach $sym (@EXPORT) {
+ foreach my $sym (@EXPORT) {
+ no strict 'refs';
*{"${callpack}::$sym"} = \&{"Shell::$sym"};
}
-};
+}
-AUTOLOAD {
+sub AUTOLOAD {
+ shift if ref $_[0] && $_[0]->isa( 'Shell' );
my $cmd = $AUTOLOAD;
$cmd =~ s/^.*:://;
eval <<"*END*";
sub $AUTOLOAD {
if (\@_ < 1) {
\$Shell::capture_stderr ? `$cmd 2>&1` : `$cmd`;
- }
- elsif ('$^O' eq 'os2') {
+ } elsif ('$^O' eq 'os2') {
local(\*SAVEOUT, \*READ, \*WRITE);
open SAVEOUT, '>&STDOUT' or die;
@@ -46,16 +51,14 @@ AUTOLOAD {
close READ;
waitpid \$pid, 0;
\@ret;
- }
- else {
+ } else {
local(\$/) = undef;
my \$ret = <READ>;
close READ;
waitpid \$pid, 0;
\$ret;
}
- }
- else {
+ } else {
my \$a;
my \@arr = \@_;
if ('$^O' eq 'MSWin32') {
@@ -74,11 +77,10 @@ AUTOLOAD {
s/\\\\\\\\"/\\\\\\\\"""/g;
\$_ = qq["\$_"] if /\\s/;
}
- }
- else {
+ } else {
for (\@arr) {
s/(['\\\\])/\\\\\$1/g;
- \$_ = "'\$_'";
+ \$_ = \$_;
}
}
push \@arr, '2>&1' if \$Shell::capture_stderr;
@@ -88,8 +90,7 @@ AUTOLOAD {
my \@ret = <SUBPROC>;
close SUBPROC; # XXX Oughta use a destructor.
\@ret;
- }
- else {
+ } else {
local(\$/) = undef;
my \$ret = <SUBPROC>;
close SUBPROC;
@@ -104,6 +105,7 @@ AUTOLOAD {
}
1;
+
__END__
=head1 NAME
@@ -155,10 +157,45 @@ The module now should work on Win32.
Jenda
+There seemed to be a problem where all arguments to a shell command were
+quoted before being executed. As in the following example:
+
+ cat('</etc/passwd');
+ ls('*.pl');
+
+really turned into:
+
+ cat '</etc/passwd'
+ ls '*.pl'
+
+instead of:
+
+ cat </etc/passwd
+ ls *.pl
+
+and of course, this is wrong.
+
+I have fixed this bug, it was brought up by Wolfgang Laun [ID 20000326.008]
+
+Casey
+
+=head2 OBJECT ORIENTED SYNTAX
+
+Shell now has an OO interface. Good for namespace conservation
+and shell representation.
+
+ use Shell;
+ my $sh = Shell->new;
+ print $sh->ls;
+
+Casey
+
=head1 AUTHOR
Larry Wall
Changes by Jenda@Krynicky.cz and Dave Cottle <d.cottle@csc.canterbury.ac.nz>
+Changes and bug fixes by Casey Tweten <crt@kiski.net>
+
=cut
diff --git a/contrib/perl5/lib/Symbol.pm b/contrib/perl5/lib/Symbol.pm
index a842c1c..a95383a 100644
--- a/contrib/perl5/lib/Symbol.pm
+++ b/contrib/perl5/lib/Symbol.pm
@@ -129,8 +129,15 @@ sub delete_package ($) {
my $stem_symtab = *{$stem}{HASH};
return unless defined $stem_symtab and exists $stem_symtab->{$leaf};
- my $leaf_glob = $stem_symtab->{$leaf};
- my $leaf_symtab = *{$leaf_glob}{HASH};
+
+ # free all the symbols in the package
+
+ my $leaf_symtab = *{$stem_symtab->{$leaf}}{HASH};
+ foreach my $name (keys %$leaf_symtab) {
+ undef *{$pkg . $name};
+ }
+
+ # delete the symbol table
%$leaf_symtab = ();
delete $stem_symtab->{$leaf};
diff --git a/contrib/perl5/lib/Term/ANSIColor.pm b/contrib/perl5/lib/Term/ANSIColor.pm
index e7a2157..b61efcb 100644
--- a/contrib/perl5/lib/Term/ANSIColor.pm
+++ b/contrib/perl5/lib/Term/ANSIColor.pm
@@ -1,11 +1,14 @@
# Term::ANSIColor -- Color screen output using ANSI escape sequences.
-# $Id: ANSIColor.pm,v 1.1 1997/12/10 20:05:29 eagle Exp $
+# $Id: ANSIColor.pm,v 1.3 2000/08/06 18:28:10 eagle Exp $
#
-# Copyright 1996, 1997 by Russ Allbery <rra@stanford.edu>
-# and Zenin <zenin@best.com>
+# Copyright 1996, 1997, 1998, 2000
+# by Russ Allbery <rra@stanford.edu> and Zenin <zenin@best.com>
#
# This program is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
+#
+# Ah, September, when the sysadmins turn colors and fall off the trees....
+# -- Dave Van Domelen
############################################################################
# Modules and declarations
@@ -27,8 +30,10 @@ use Exporter ();
ON_GREEN ON_YELLOW ON_BLUE ON_MAGENTA
ON_CYAN ON_WHITE)]);
Exporter::export_ok_tags ('constants');
-
-($VERSION = (split (' ', q$Revision: 1.1 $ ))[1]) =~ s/\.(\d)$/.0$1/;
+
+# Don't use the CVS revision as the version, since this module is also in
+# Perl core and too many things could munge CVS magic revision strings.
+$VERSION = 1.03;
############################################################################
@@ -38,6 +43,7 @@ Exporter::export_ok_tags ('constants');
%attributes = ('clear' => 0,
'reset' => 0,
'bold' => 1,
+ 'dark' => 2,
'underline' => 4,
'underscore' => 4,
'blink' => 5,
@@ -92,7 +98,8 @@ sub AUTOLOAD {
};
goto &$AUTOLOAD;
} else {
- die "undefined subroutine &$AUTOLOAD called";
+ require Carp;
+ Carp::croak ("undefined subroutine &$AUTOLOAD called");
}
}
@@ -119,19 +126,28 @@ sub color {
# Given a string and a set of attributes, returns the string surrounded by
# escape codes to set those attributes and then clear them at the end of the
-# string. If $EACHLINE is set, insert a reset before each occurrence of the
-# string $EACHLINE and the starting attribute code after the string
-# $EACHLINE, so that no attribute crosses line delimiters (this is often
-# desirable if the output is to be piped to a pager or some other program).
+# string. The attributes can be given either as an array ref as the first
+# argument or as a list as the second and subsequent arguments. If
+# $EACHLINE is set, insert a reset before each occurrence of the string
+# $EACHLINE and the starting attribute code after the string $EACHLINE, so
+# that no attribute crosses line delimiters (this is often desirable if the
+# output is to be piped to a pager or some other program).
sub colored {
- my $string = shift;
+ my ($string, @codes);
+ if (ref $_[0]) {
+ @codes = @{+shift};
+ $string = join ('', @_);
+ } else {
+ $string = shift;
+ @codes = @_;
+ }
if (defined $EACHLINE) {
- my $attr = color (@_);
+ my $attr = color (@codes);
join '',
map { $_ && $_ ne $EACHLINE ? $attr . $_ . "\e[0m" : $_ }
split (/(\Q$EACHLINE\E)/, $string);
} else {
- color (@_) . $string . "\e[0m";
+ color (@codes) . $string . "\e[0m";
}
}
@@ -157,6 +173,7 @@ Term::ANSIColor - Color screen output using ANSI escape sequences
print "This text is normal.\n";
print colored ("Yellow on magenta.\n", 'yellow on_magenta');
print "This text is normal.\n";
+ print colored ['yellow on_magenta'], "Yellow on magenta.\n";
use Term::ANSIColor qw(:constants);
print BOLD, BLUE, "This text is in bold blue.\n", RESET;
@@ -179,22 +196,30 @@ you can save it as a string, pass it to something else, send it to a file
handle, or do anything else with it that you might care to).
The recognized attributes (all of which should be fairly intuitive) are
-clear, reset, bold, underline, underscore, blink, reverse, concealed,
-black, red, green, yellow, blue, magenta, on_black, on_red, on_green,
-on_yellow, on_blue, on_magenta, on_cyan, and on_white. Case is not
-significant. Underline and underscore are equivalent, as are clear and
-reset, so use whichever is the most intuitive to you. The color alone
+clear, reset, dark, bold, underline, underscore, blink, reverse,
+concealed, black, red, green, yellow, blue, magenta, on_black, on_red,
+on_green, on_yellow, on_blue, on_magenta, on_cyan, and on_white. Case is
+not significant. Underline and underscore are equivalent, as are clear
+and reset, so use whichever is the most intuitive to you. The color alone
sets the foreground color, and on_color sets the background color.
-Note that attributes, once set, last until they are unset (by sending the
-attribute "reset"). Be careful to do this, or otherwise your attribute will
-last after your script is done running, and people get very annoyed at
-having their prompt and typing changed to weird colors.
+Note that not all attributes are supported by all terminal types, and some
+terminals may not support any of these sequences. Dark, blink, and
+concealed in particular are frequently not implemented.
+
+Attributes, once set, last until they are unset (by sending the attribute
+"reset"). Be careful to do this, or otherwise your attribute will last
+after your script is done running, and people get very annoyed at having
+their prompt and typing changed to weird colors.
As an aid to help with this, colored() takes a scalar as the first
argument and any number of attribute strings as the second argument and
returns the scalar wrapped in escape codes so that the attributes will be
set as requested before the string and reset to normal after the string.
+Alternately, you can pass a reference to an array as the first argument,
+and then the contents of that array will be taken as attributes and color
+codes and the remainder of the arguments as text to colorize.
+
Normally, colored() just puts attribute codes at the beginning and end of
the string, but if you set $Term::ANSIColor::EACHLINE to some string,
that string will be considered the line delimiter and the attribute will
@@ -205,10 +230,10 @@ Normally you'll want to set $Term::ANSIColor::EACHLINE to C<"\n"> to use
this feature.
Alternately, if you import C<:constants>, you can use the constants CLEAR,
-RESET, BOLD, UNDERLINE, UNDERSCORE, BLINK, REVERSE, CONCEALED, BLACK, RED,
-GREEN, YELLOW, BLUE, MAGENTA, ON_BLACK, ON_RED, ON_GREEN, ON_YELLOW,
-ON_BLUE, ON_MAGENTA, ON_CYAN, and ON_WHITE directly. These are the same
-as color('attribute') and can be used if you prefer typing:
+RESET, BOLD, DARK, UNDERLINE, UNDERSCORE, BLINK, REVERSE, CONCEALED,
+BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, ON_BLACK, ON_RED, ON_GREEN,
+ON_YELLOW, ON_BLUE, ON_MAGENTA, ON_CYAN, and ON_WHITE directly. These are
+the same as color('attribute') and can be used if you prefer typing:
print BOLD BLUE ON_WHITE "Text\n", RESET;
@@ -231,14 +256,14 @@ will reset the display mode afterwards, whereas:
will not.
The subroutine interface has the advantage over the constants interface in
-that only 2 soubrutines are exported into your namespace, verses 22 in the
-constants interface. On the flip side, the constants interface has the
-advantage of better compile time error checking, since misspelled names of
-colors or attributes in calls to color() and colored() won't be caught
-until runtime whereas misspelled names of constants will be caught at
-compile time. So, polute your namespace with almost two dozen subrutines
-that you may not even use that oftin, or risk a silly bug by mistyping an
-attribute. Your choice, TMTOWTDI after all.
+that only two subroutines are exported into your namespace, versus
+twenty-two in the constants interface. On the flip side, the constants
+interface has the advantage of better compile time error checking, since
+misspelled names of colors or attributes in calls to color() and colored()
+won't be caught until runtime whereas misspelled names of constants will
+be caught at compile time. So, polute your namespace with almost two
+dozen subroutines that you may not even use that often, or risk a silly
+bug by mistyping an attribute. Your choice, TMTOWTDI after all.
=head1 DIAGNOSTICS
@@ -246,11 +271,11 @@ attribute. Your choice, TMTOWTDI after all.
=item Invalid attribute name %s
-You passed an invalid attribute name to either color() or colored().
+(F) You passed an invalid attribute name to either color() or colored().
-=item Identifier %s used only once: possible typo
+=item Name "%s" used only once: possible typo
-You probably mistyped a constant color name such as:
+(W) You probably mistyped a constant color name such as:
print FOOBAR "This text is color FOOBAR\n";
@@ -259,7 +284,7 @@ force the next error.
=item No comma allowed after filehandle
-You probably mistyped a constant color name such as:
+(F) You probably mistyped a constant color name such as:
print FOOBAR, "This text is color FOOBAR\n";
@@ -267,9 +292,9 @@ Generating this fatal compile error is one of the main advantages of using
the constants interface, since you'll immediately know if you mistype a
color name.
-=item Bareword %s not allowed while "strict subs" in use
+=item Bareword "%s" not allowed while "strict subs" in use
-You probably mistyped a constant color name such as:
+(F) You probably mistyped a constant color name such as:
$Foobar = FOOBAR . "This line should be blue\n";
@@ -298,6 +323,25 @@ For easier debuging, you may prefer to always use the commas when not
setting $Term::ANSIColor::AUTORESET so that you'll get a fatal compile
error rather than a warning.
+=head1 NOTES
+
+Jean Delvare provided the following table of different common terminal
+emulators and their support for the various attributes:
+
+ clear bold dark under blink reverse conceal
+ ------------------------------------------------------------------------
+ xterm yes yes no yes bold yes yes
+ linux yes yes yes bold yes yes no
+ rxvt yes yes no yes bold/black yes no
+ dtterm yes yes yes yes reverse yes yes
+ teraterm yes reverse no yes rev/red yes no
+ aixterm kinda normal no yes no yes yes
+
+Where the entry is other than yes or no, that emulator interpret the given
+attribute as something else instead. Note that on an aixterm, clear
+doesn't reset colors; you have to explicitly set the colors back to what
+you want. More entries in this table are welcome.
+
=head1 AUTHORS
Original idea (using constants) by Zenin (zenin@best.com), reimplemented
diff --git a/contrib/perl5/lib/Term/ReadLine.pm b/contrib/perl5/lib/Term/ReadLine.pm
index 8bb8205..fc78d7b 100644
--- a/contrib/perl5/lib/Term/ReadLine.pm
+++ b/contrib/perl5/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/contrib/perl5/lib/Test.pm b/contrib/perl5/lib/Test.pm
index c708f57..4a38d54 100644
--- a/contrib/perl5/lib/Test.pm
+++ b/contrib/perl5/lib/Test.pm
@@ -1,11 +1,10 @@
use strict;
package Test;
-use 5.005_64;
use Test::Harness 1.1601 ();
use Carp;
our($VERSION, @ISA, @EXPORT, @EXPORT_OK, $ntest, $TestLevel); #public-ish
our($TESTOUT, $ONFAIL, %todo, %history, $planned, @FAILDETAIL); #private-ish
-$VERSION = '1.13';
+$VERSION = '1.15';
require Exporter;
@ISA=('Exporter');
@EXPORT=qw(&plan &ok &skip);
@@ -82,8 +81,16 @@ sub ok ($;$$) {
$context .= ' TODO?!' if $todo;
print $TESTOUT "ok $ntest # ($context)\n";
} else {
- print $TESTOUT "not " if !$ok;
- print $TESTOUT "ok $ntest\n";
+ # Issuing two separate print()s causes severe trouble with
+ # Test::Harness on VMS. The "not "'s for failed tests occur
+ # on a separate line and would not get counted as failures.
+ #print $TESTOUT "not " if !$ok;
+ #print $TESTOUT "ok $ntest\n";
+ # Replace with a single print() as a workaround:
+ my $okline = '';
+ $okline = "not " if !$ok;
+ $okline .= "ok $ntest\n";
+ print $TESTOUT $okline;
if (!$ok) {
my $detail = { 'repetition' => $repetition, 'package' => $pkg,
@@ -178,9 +185,9 @@ __END__
=head1 DESCRIPTION
-L<Test::Harness> expects to see particular output when it executes
-tests. This module aims to make writing proper test scripts just a
-little bit easier (and less error prone :-).
+L<Test::Harness|Test::Harness> expects to see particular output when it
+executes tests. This module aims to make writing proper test scripts just
+a little bit easier (and less error prone :-).
=head1 TEST TYPES
diff --git a/contrib/perl5/lib/Test/Harness.pm b/contrib/perl5/lib/Test/Harness.pm
index 9902741..f446e65 100644
--- a/contrib/perl5/lib/Test/Harness.pm
+++ b/contrib/perl5/lib/Test/Harness.pm
@@ -8,7 +8,7 @@ use FileHandle;
use strict;
our($VERSION, $verbose, $switches, $have_devel_corestack, $curtest,
- @ISA, @EXPORT, @EXPORT_OK);
+ $columns, @ISA, @EXPORT, @EXPORT_OK);
$have_devel_corestack = 0;
$VERSION = "1.1604";
@@ -27,36 +27,18 @@ my $subtests_skipped = 0;
@EXPORT= qw(&runtests);
@EXPORT_OK= qw($verbose $switches);
-format STDOUT_TOP =
-Failed Test Status Wstat Total Fail Failed List of failed
--------------------------------------------------------------------------------
-.
-
-format STDOUT =
-@<<<<<<<<<<<<<< @>> @>>>> @>>>> @>>> ^##.##% ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-{ $curtest->{name},
- $curtest->{estat},
- $curtest->{wstat},
- $curtest->{max},
- $curtest->{failed},
- $curtest->{percent},
- $curtest->{canon}
-}
-~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- $curtest->{canon}
-.
-
-
$verbose = 0;
$switches = "-w";
+$columns = $ENV{HARNESS_COLUMNS} || $ENV{COLUMNS} || 80;
sub globdir { opendir DIRH, shift; my @f = readdir DIRH; closedir DIRH; @f }
sub runtests {
my(@tests) = @_;
local($|) = 1;
- my($test,$te,$ok,$next,$max,$pct,$totok,$totbonus,@failed,%failedtests);
+ my($test,$te,$ok,$next,$max,$pct,$totbonus,@failed,%failedtests);
my $totmax = 0;
+ my $totok = 0;
my $files = 0;
my $bad = 0;
my $good = 0;
@@ -102,7 +84,7 @@ sub runtests {
$fh->close or print "can't close $test. $!\n";
my $cmd = ($ENV{'HARNESS_COMPILE_TEST'})
? "./perl -I../lib ../utils/perlcc $test "
- . "-run 2>> ./compilelog |"
+ . "-r 2>> ./compilelog |"
: "$^X $s $test|";
$cmd = "MCR $cmd" if $^O eq 'VMS';
$fh->open($cmd) or print "can't run $test. $!\n";
@@ -158,12 +140,12 @@ sub runtests {
$bonus++, $totbonus++ if $todo{$this};
}
if ($this > $next) {
- # warn "Test output counter mismatch [test $this]\n";
+ # print "Test output counter mismatch [test $this]\n";
# no need to warn probably
push @failed, $next..$this-1;
} elsif ($this < $next) {
#we have seen more "ok" lines than the number suggests
- warn "Confused test output: test $this answered after test ", $next-1, "\n";
+ print "Confused test output: test $this answered after test ", $next-1, "\n";
$next = $this;
}
$next = $this + 1;
@@ -230,7 +212,7 @@ sub runtests {
}
if (@failed) {
my ($txt, $canon) = canonfailed($max,$skipped,@failed);
- print $txt;
+ print "${ml}$txt";
$failedtests{$test} = { canon => $canon, max => $max,
failed => scalar @failed,
name => $test, percent => 100*(scalar @failed)/$max,
@@ -304,7 +286,54 @@ sub runtests {
$pct = sprintf("%.2f", $good / $total * 100);
my $subpct = sprintf " %d/%d subtests failed, %.2f%% okay.",
$totmax - $totok, $totmax, 100*$totok/$totmax;
+ # Create formats
+ # First, figure out max length of test names
+ my $failed_str = "Failed Test";
+ my $middle_str = " Status Wstat Total Fail Failed ";
+ my $list_str = "List of Failed";
+ my $max_namelen = length($failed_str);
my $script;
+ foreach $script (keys %failedtests) {
+ $max_namelen =
+ (length $failedtests{$script}->{name} > $max_namelen) ?
+ length $failedtests{$script}->{name} : $max_namelen;
+ }
+ my $list_len = $columns - length($middle_str) - $max_namelen;
+ if ($list_len < length($list_str)) {
+ $list_len = length($list_str);
+ $max_namelen = $columns - length($middle_str) - $list_len;
+ if ($max_namelen < length($failed_str)) {
+ $max_namelen = length($failed_str);
+ $columns = $max_namelen + length($middle_str) + $list_len;
+ }
+ }
+
+ my $fmt_top = "format STDOUT_TOP =\n"
+ . sprintf("%-${max_namelen}s", $failed_str)
+ . $middle_str
+ . $list_str . "\n"
+ . "-" x $columns
+ . "\n.\n";
+ my $fmt = "format STDOUT =\n"
+ . "@" . "<" x ($max_namelen - 1)
+ . " @>> @>>>> @>>>> @>>> ^##.##% "
+ . "^" . "<" x ($list_len - 1) . "\n"
+ . '{ $curtest->{name}, $curtest->{estat},'
+ . ' $curtest->{wstat}, $curtest->{max},'
+ . ' $curtest->{failed}, $curtest->{percent},'
+ . ' $curtest->{canon}'
+ . "\n}\n"
+ . "~~" . " " x ($columns - $list_len - 2) . "^"
+ . "<" x ($list_len - 1) . "\n"
+ . '$curtest->{canon}'
+ . "\n.\n";
+
+ eval $fmt_top;
+ die $@ if $@;
+ eval $fmt;
+ die $@ if $@;
+
+ # Now write to formats
for $script (sort keys %failedtests) {
$curtest = $failedtests{$script};
write;
@@ -323,16 +352,9 @@ sub runtests {
my $tried_devel_corestack;
sub corestatus {
my($st) = @_;
- my($ret);
eval {require 'wait.ph'};
- if ($@) {
- SWITCH: {
- $ret = ($st & 0200); # Tim says, this is for 90%
- }
- } else {
- $ret = WCOREDUMP($st);
- }
+ my $ret = defined &WCOREDUMP ? WCOREDUMP($st) : $st & 0200;
eval { require Devel::CoreStack; $have_devel_corestack++ }
unless $tried_devel_corestack++;
@@ -516,6 +538,12 @@ switches used to invoke perl on each test. For example, setting
C<HARNESS_PERL_SWITCHES> to "-W" will run all tests with all
warnings enabled.
+If C<HARNESS_COLUMNS> is set, then this value will be used for the
+width of the terminal. If it is not set then it will default to
+C<COLUMNS>. If this is not set, it will default to 80. Note that users
+of Bourne-sh based shells will need to C<export COLUMNS> for this
+module to use that variable.
+
Harness sets C<HARNESS_ACTIVE> before executing the individual tests.
This allows the tests to determine if they are being executed through the
harness or by any other means.
diff --git a/contrib/perl5/lib/Text/ParseWords.pm b/contrib/perl5/lib/Text/ParseWords.pm
index 2a6afc3..23eace9 100644
--- a/contrib/perl5/lib/Text/ParseWords.pm
+++ b/contrib/perl5/lib/Text/ParseWords.pm
@@ -214,21 +214,27 @@ demonstrating:
=over 4
=item 0
+
a simple word
=item 1
+
multiple spaces are skipped because of our $delim
=item 2
+
use of quotes to include a space in a word
=item 3
+
use of a backslash to include a space in a word
=item 4
+
use of a backslash to remove the special meaning of a double-quote
=item 5
+
another simple word (note the lack of effect of the
backslashed double-quote)
diff --git a/contrib/perl5/lib/Text/Soundex.pm b/contrib/perl5/lib/Text/Soundex.pm
index 3079b90..d588764 100644
--- a/contrib/perl5/lib/Text/Soundex.pm
+++ b/contrib/perl5/lib/Text/Soundex.pm
@@ -108,7 +108,7 @@ many people seem to prefer an I<unlikely> value like C<Z000>
can be assigned to C<$soundex_nocode>.
In scalar context C<soundex> returns the soundex code of its first
-argument, and in array context a list is returned in which each element is the
+argument, and in list context a list is returned in which each element is the
soundex code for the corresponding argument passed to C<soundex> e.g.
@codes = soundex qw(Mike Stok);
diff --git a/contrib/perl5/lib/Text/Tabs.pm b/contrib/perl5/lib/Text/Tabs.pm
index 933f917..c431019 100644
--- a/contrib/perl5/lib/Text/Tabs.pm
+++ b/contrib/perl5/lib/Text/Tabs.pm
@@ -73,11 +73,11 @@ Text::Tabs -- expand and unexpand tabs per the unix expand(1) and unexpand(1)
=head1 SYNOPSIS
- use Text::Tabs;
+use Text::Tabs;
- $tabstop = 4;
- @lines_without_tabs = expand(@lines_with_tabs);
- @lines_with_tabs = unexpand(@lines_without_tabs);
+$tabstop = 4;
+@lines_without_tabs = expand(@lines_with_tabs);
+@lines_with_tabs = unexpand(@lines_without_tabs);
=head1 DESCRIPTION
diff --git a/contrib/perl5/lib/Text/Wrap.pm b/contrib/perl5/lib/Text/Wrap.pm
index 5f95edb..579e09b 100644
--- a/contrib/perl5/lib/Text/Wrap.pm
+++ b/contrib/perl5/lib/Text/Wrap.pm
@@ -6,7 +6,7 @@ require Exporter;
@EXPORT = qw(wrap fill);
@EXPORT_OK = qw($columns $break $huge);
-$VERSION = 98.112902;
+$VERSION = 2001.0131;
use vars qw($VERSION $columns $debug $break $huge);
use strict;
@@ -15,7 +15,7 @@ BEGIN {
$columns = 76; # <= screen width
$debug = 0;
$break = '\s';
- $huge = 'wrap'; # alternatively: 'die'
+ $huge = 'wrap'; # alternatively: 'die' or 'overflow'
}
use Text::Tabs qw(expand unexpand);
@@ -25,20 +25,25 @@ sub wrap
my ($ip, $xp, @t) = @_;
my $r = "";
- my $t = expand(join(" ",@t));
+ my $tail = pop(@t);
+ my $t = expand(join("", (map { /\s+\Z/ ? ( $_ ) : ($_, ' ') } @t), $tail));
my $lead = $ip;
my $ll = $columns - length(expand($ip)) - 1;
my $nll = $columns - length(expand($xp)) - 1;
my $nl = "";
my $remainder = "";
- while ($t !~ /^\s*$/) {
- if ($t =~ s/^([^\n]{0,$ll})($break|\Z(?!\n))//xm) {
+ pos($t) = 0;
+ while ($t !~ /\G\s*\Z/gc) {
+ if ($t =~ /\G([^\n]{0,$ll})($break|\Z(?!\n))/xmgc) {
$r .= unexpand($nl . $lead . $1);
$remainder = $2;
- } elsif ($huge eq 'wrap' && $t =~ s/^([^\n]{$ll})//) {
+ } elsif ($huge eq 'wrap' && $t =~ /\G([^\n]{$ll})/gc) {
$r .= unexpand($nl . $lead . $1);
$remainder = "\n";
+ } elsif ($huge eq 'overflow' && $t =~ /\G([^\n]*?)($break|\Z(?!\n))/xmgc) {
+ $r .= unexpand($nl . $lead . $1);
+ $remainder = $2;
} elsif ($huge eq 'die') {
die "couldn't wrap '$t'";
} else {
@@ -53,11 +58,13 @@ sub wrap
print "-----------$r---------\n" if $debug;
- print "Finish up with '$lead', '$t'\n" if $debug;
+ print "Finish up with '$lead'\n" if $debug;
- $r .= $lead . $t if $t ne "";
+ $r .= $lead . substr($t, pos($t), length($t)-pos($t))
+ if pos($t) ne length($t);
print "-----------$r---------\n" if $debug;;
+
return $r;
}
@@ -76,7 +83,8 @@ sub fill
# if paragraph_indent is the same as line_indent,
# separate paragraphs with blank lines
- return join ($ip eq $xp ? "\n\n" : "\n", @para);
+ my $ps = ($ip eq $xp) ? "\n\n" : "\n";
+ return join ($ps, @para);
}
1;
@@ -88,38 +96,73 @@ Text::Wrap - line wrapping to form simple paragraphs
=head1 SYNOPSIS
+B<Example 1>
+
use Text::Wrap
+ $initial_tab = "\t"; # Tab before first line
+ $subsequent_tab = ""; # All other lines flush left
+
print wrap($initial_tab, $subsequent_tab, @text);
print fill($initial_tab, $subsequent_tab, @text);
+ @lines = wrap($initial_tab, $subsequent_tab, @text);
+
+ @paragraphs = fill($initial_tab, $subsequent_tab, @text);
+
+B<Example 2>
+
use Text::Wrap qw(wrap $columns $huge);
- $columns = 132;
+ $columns = 132; # Wrap at 132 characters
$huge = 'die';
$huge = 'wrap';
+ $huge = 'overflow';
-=head1 DESCRIPTION
+B<Example 3>
+
+ use Text::Wrap
-Text::Wrap::wrap() is a very simple paragraph formatter. It formats a
-single paragraph at a time by breaking lines at word boundaries.
-Indentation is controlled for the first line ($initial_tab) and
-all subsequent lines ($subsequent_tab) independently.
+ $Text::Wrap::columns = 72;
+ print wrap('', '', @text);
-Lines are wrapped at $Text::Wrap::columns columns.
-$Text::Wrap::columns should be set to the full width of your output device.
+=head1 DESCRIPTION
-When words that are longer than $columns are encountered, they
-are broken up. Previous versions of wrap() die()ed instead.
-To restore the old (dying) behavior, set $Text::Wrap::huge to
-'die'.
+Text::Wrap::wrap() is a very simple paragraph formatter. It formats a
+single paragraph at a time by breaking lines at word boundries.
+Indentation is controlled for the first line (C<$initial_tab>) and
+all subsquent lines (C<$subsequent_tab>) independently. Please note:
+C<$initial_tab> and C<$subsequent_tab> are the literal strings that will
+be used: it is unlikley you would want to pass in a number.
+
+Lines are wrapped at C<$Text::Wrap::columns> columns. C<$Text::Wrap::columns>
+should be set to the full width of your output device. In fact,
+every resulting line will have length of no more than C<$columns - 1>.
+
+Beginner note: In example 2, above C<$columns> is imported into
+the local namespace, and set locally. In example 3,
+C<$Text::Wrap::columns> is set in its own namespace without importing it.
+
+When words that are longer than C<$columns> are encountered, they
+are broken up. C<wrap()> adds a C<"\n"> at column C<$columns>.
+This behavior can be overridden by setting C<$huge> to
+'die' or to 'overflow'. When set to 'die', large words will cause
+C<die()> to be called. When set to 'overflow', large words will be
+left intact.
Text::Wrap::fill() is a simple multi-paragraph formatter. It formats
each paragraph separately and then joins them together when it's done. It
-will destroy any whitespace in the original text. It breaks text into
+will destory any whitespace in the original text. It breaks text into
paragraphs by looking for whitespace after a newline. In other respects
it acts like wrap().
+When called in list context, C<wrap()> will return a list of lines and
+C<fill()> will return a list of paragraphs.
+
+Historical notes: Older versions of C<wrap()> and C<fill()> always
+returned strings. Also, 'die' used to be the default value of
+C<$huge>. Now, 'wrap' is the default value.
+
=head1 EXAMPLE
print wrap("\t","","This is a bit of text that forms
diff --git a/contrib/perl5/lib/Tie/Array.pm b/contrib/perl5/lib/Tie/Array.pm
index eb83aae..f4c6193 100644
--- a/contrib/perl5/lib/Tie/Array.pm
+++ b/contrib/perl5/lib/Tie/Array.pm
@@ -8,73 +8,70 @@ our $VERSION = '1.01';
# Pod documentation after __END__ below.
sub DESTROY { }
-sub EXTEND { }
-sub UNSHIFT { shift->SPLICE(0,0,@_) }
-sub SHIFT { shift->SPLICE(0,1) }
+sub EXTEND { }
+sub UNSHIFT { scalar shift->SPLICE(0,0,@_) }
+sub SHIFT { shift->SPLICE(0,1) }
+#sub SHIFT { (shift->SPLICE(0,1))[0] }
sub CLEAR { shift->STORESIZE(0) }
-sub PUSH
-{
+sub PUSH
+{
my $obj = shift;
my $i = $obj->FETCHSIZE;
$obj->STORE($i++, shift) while (@_);
}
-sub POP
+sub POP
{
my $obj = shift;
my $newsize = $obj->FETCHSIZE - 1;
my $val;
- if ($newsize >= 0)
+ if ($newsize >= 0)
{
$val = $obj->FETCH($newsize);
$obj->STORESIZE($newsize);
}
$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 {
my $pkg = ref $_[0];
@@ -91,21 +88,21 @@ use vars qw(@ISA);
@ISA = 'Tie::Array';
sub TIEARRAY { bless [], $_[0] }
-sub FETCHSIZE { scalar @{$_[0]} }
-sub STORESIZE { $#{$_[0]} = $_[1]-1 }
+sub FETCHSIZE { scalar @{$_[0]} }
+sub STORESIZE { $#{$_[0]} = $_[1]-1 }
sub STORE { $_[0]->[$_[1]] = $_[2] }
sub FETCH { $_[0]->[$_[1]] }
sub CLEAR { @{$_[0]} = () }
-sub POP { pop(@{$_[0]}) }
+sub POP { pop(@{$_[0]}) }
sub PUSH { my $o = shift; push(@$o,@_) }
-sub SHIFT { shift(@{$_[0]}) }
-sub UNSHIFT { my $o = shift; unshift(@$o,@_) }
+sub SHIFT { shift(@{$_[0]}) }
+sub UNSHIFT { my $o = shift; unshift(@$o,@_) }
sub EXISTS { exists $_[0]->[$_[1]] }
sub DELETE { delete $_[0]->[$_[1]] }
sub SPLICE
{
- my $ob = shift;
+ my $ob = shift;
my $sz = $ob->FETCHSIZE;
my $off = @_ ? shift : 0;
$off += $sz if $off < 0;
@@ -121,16 +118,16 @@ __END__
Tie::Array - base class for tied arrays
-=head1 SYNOPSIS
+=head1 SYNOPSIS
package NewArray;
use Tie::Array;
@ISA = ('Tie::Array');
# mandatory methods
- sub TIEARRAY { ... }
- sub FETCH { ... }
- sub FETCHSIZE { ... }
+ sub TIEARRAY { ... }
+ sub FETCH { ... }
+ sub FETCHSIZE { ... }
sub STORE { ... } # mandatory if elements writeable
sub STORESIZE { ... } # mandatory if elements can be added/deleted
@@ -138,13 +135,13 @@ Tie::Array - base class for tied arrays
sub DELETE { ... } # mandatory if delete() expected to work
# optional methods - for efficiency
- sub CLEAR { ... }
- sub PUSH { ... }
- sub POP { ... }
- sub SHIFT { ... }
- sub UNSHIFT { ... }
- sub SPLICE { ... }
- sub EXTEND { ... }
+ sub CLEAR { ... }
+ sub PUSH { ... }
+ sub POP { ... }
+ sub SHIFT { ... }
+ sub UNSHIFT { ... }
+ sub SPLICE { ... }
+ sub EXTEND { ... }
sub DESTROY { ... }
package NewStdArray;
@@ -162,7 +159,7 @@ Tie::Array - base class for tied arrays
-=head1 DESCRIPTION
+=head1 DESCRIPTION
This module provides methods for array-tying classes. See
L<perltie> for a list of the functions required in order to tie an array
@@ -173,16 +170,16 @@ on the tied array, and implementations of C<PUSH>, C<POP>, C<SHIFT>,
C<UNSHIFT>, C<SPLICE> and C<CLEAR> in terms of basic C<FETCH>, C<STORE>,
C<FETCHSIZE>, C<STORESIZE>.
-The B<Tie::StdArray> package provides efficient methods required for tied arrays
+The B<Tie::StdArray> package provides efficient methods required for tied arrays
which are implemented as blessed references to an "inner" perl array.
-It inherits from B<Tie::Array>, and should cause tied arrays to behave exactly
-like standard arrays, allowing for selective overloading of methods.
+It inherits from B<Tie::Array>, and should cause tied arrays to behave exactly
+like standard arrays, allowing for selective overloading of methods.
For developers wishing to write their own tied arrays, the required methods
are briefly defined below. See the L<perltie> section for more detailed
descriptive, as well as example code:
-=over
+=over
=item TIEARRAY classname, LIST
@@ -190,7 +187,7 @@ The class method is invoked by the command C<tie @array, classname>. Associates
an array instance with the specified class. C<LIST> would represent
additional arguments (along the lines of L<AnyDBM_File> and compatriots) needed
to complete the association. The method should return an object of a class which
-provides the methods below.
+provides the methods below.
=item STORE this, index, value
@@ -214,7 +211,7 @@ Sets the total number of items in the tied array associated with
object I<this> to be I<count>. If this makes the array larger then
class's mapping of C<undef> should be returned for new positions.
If the array becomes smaller then entries beyond count should be
-deleted.
+deleted.
=item EXTEND this, count
@@ -242,7 +239,7 @@ object I<this>.
Normal object destructor method.
-=item PUSH this, LIST
+=item PUSH this, LIST
Append elements of LIST to the array.
@@ -255,17 +252,17 @@ Remove last element of the array and return it.
Remove the first element of the array (shifting other elements down)
and return it.
-=item UNSHIFT this, LIST
+=item UNSHIFT this, LIST
Insert LIST elements at the beginning of the array, moving existing elements
up to make room.
=item SPLICE this, offset, length, LIST
-Perform the equivalent of C<splice> on the array.
+Perform the equivalent of C<splice> on the array.
-I<offset> is optional and defaults to zero, negative values count back
-from the end of the array.
+I<offset> is optional and defaults to zero, negative values count back
+from the end of the array.
I<length> is optional and defaults to rest of the array.
@@ -277,16 +274,15 @@ Returns a list of the original I<length> elements at I<offset>.
=head1 CAVEATS
-There is no support at present for tied @ISA. There is a potential conflict
+There is no support at present for tied @ISA. There is a potential conflict
between magic entries needed to notice setting of @ISA, and those needed to
-implement 'tie'.
+implement 'tie'.
Very little consideration has been given to the behaviour of tied arrays
when C<$[> is not default value of zero.
-=head1 AUTHOR
+=head1 AUTHOR
Nick Ing-Simmons E<lt>nik@tiuk.ti.comE<gt>
-=cut
-
+=cut
diff --git a/contrib/perl5/lib/Tie/Handle.pm b/contrib/perl5/lib/Tie/Handle.pm
index 588ecea..81b0792 100644
--- a/contrib/perl5/lib/Tie/Handle.pm
+++ b/contrib/perl5/lib/Tie/Handle.pm
@@ -1,7 +1,7 @@
package Tie::Handle;
use 5.005_64;
-our $VERSION = '1.0';
+our $VERSION = '4.0';
=head1 NAME
@@ -105,6 +105,15 @@ destruction of an instance.
The L<perltie> section contains an example of tying handles.
+=head1 COMPATIBILITY
+
+This version of Tie::Handle is neither related to nor compatible with
+the Tie::Handle (3.0) module available on CPAN. It was due to an
+accident that two modules with the same name appeared. The namespace
+clash has been cleared in favor of this module that comes with the
+perl core in September 2000 and accordingly the version number has
+been bumped up to 4.0.
+
=cut
use Carp;
@@ -120,8 +129,7 @@ sub new {
sub TIEHANDLE {
my $pkg = shift;
if (defined &{"{$pkg}::new"}) {
- warnings::warn "WARNING: calling ${pkg}->new since ${pkg}->TIEHANDLE is missing"
- if warnings::enabled();
+ warnings::warnif("WARNING: calling ${pkg}->new since ${pkg}->TIEHANDLE is missing");
$pkg->new(@_);
}
else {
@@ -184,10 +192,10 @@ sub WRITE {
sub CLOSE {
my $pkg = ref $_[0];
croak "$pkg doesn't define a CLOSE method";
-}
+}
package Tie::StdHandle;
-our @ISA = 'Tie::Handle';
+our @ISA = 'Tie::Handle';
use Carp;
sub TIEHANDLE
@@ -197,7 +205,7 @@ sub TIEHANDLE
bless $fh,$class;
$fh->OPEN(@_) if (@_);
return $fh;
-}
+}
sub EOF { eof($_[0]) }
sub TELL { tell($_[0]) }
@@ -207,9 +215,9 @@ sub CLOSE { close($_[0]) }
sub BINMODE { binmode($_[0]) }
sub OPEN
-{
+{
$_[0]->CLOSE if defined($_[0]->FILENO);
- open($_[0],$_[1]);
+ @_ == 2 ? open($_[0], $_[1]) : open($_[0], $_[1], $_[2]);
}
sub READ { read($_[0],$_[1],$_[2]) }
@@ -217,7 +225,7 @@ sub READLINE { my $fh = $_[0]; <$fh> }
sub GETC { getc($_[0]) }
sub WRITE
-{
+{
my $fh = $_[0];
print $fh substr($_[1],0,$_[2])
}
diff --git a/contrib/perl5/lib/Tie/Hash.pm b/contrib/perl5/lib/Tie/Hash.pm
index c6ec3d4..2244711 100644
--- a/contrib/perl5/lib/Tie/Hash.pm
+++ b/contrib/perl5/lib/Tie/Hash.pm
@@ -114,8 +114,7 @@ sub new {
sub TIEHASH {
my $pkg = shift;
if (defined &{"${pkg}::new"}) {
- warnings::warn "WARNING: calling ${pkg}->new since ${pkg}->TIEHASH is missing"
- if warnings::enabled();
+ warnings::warnif("WARNING: calling ${pkg}->new since ${pkg}->TIEHASH is missing");
$pkg->new(@_);
}
else {
diff --git a/contrib/perl5/lib/Tie/RefHash.pm b/contrib/perl5/lib/Tie/RefHash.pm
index ffa9eb2..4611488 100644
--- a/contrib/perl5/lib/Tie/RefHash.pm
+++ b/contrib/perl5/lib/Tie/RefHash.pm
@@ -9,17 +9,26 @@ Tie::RefHash - use references as hash keys
require 5.004;
use Tie::RefHash;
tie HASHVARIABLE, 'Tie::RefHash', LIST;
+ tie HASHVARIABLE, 'Tie::RefHash::Nestable', LIST;
untie HASHVARIABLE;
=head1 DESCRIPTION
-This module provides the ability to use references as hash keys if
-you first C<tie> the hash variable to this module.
+This module provides the ability to use references as hash keys if you
+first C<tie> the hash variable to this module. Normally, only the
+keys of the tied hash itself are preserved as references; to use
+references as keys in hashes-of-hashes, use Tie::RefHash::Nestable,
+included as part of Tie::RefHash.
It is implemented using the standard perl TIEHASH interface. Please
see the C<tie> entry in perlfunc(1) and perltie(1) for more information.
+The Nestable version works by looking for hash references being stored
+and converting them to tied hashes so that they too can have
+references as keys. This will happen without warning whenever you
+store a reference to one of your own hashes in the tied hash.
+
=head1 EXAMPLE
use Tie::RefHash;
@@ -36,6 +45,11 @@ see the C<tie> entry in perlfunc(1) and perltie(1) for more information.
print ref($_), "\n";
}
+ tie %h, 'Tie::RefHash::Nestable';
+ $h{$a}->{$b} = 1;
+ for (keys %h, keys %{$h{$a}}) {
+ print ref($_), "\n";
+ }
=head1 AUTHOR
@@ -43,7 +57,7 @@ Gurusamy Sarathy gsar@activestate.com
=head1 VERSION
-Version 1.21 22 Jun 1999
+Version 1.3 8 Apr 2001
=head1 SEE ALSO
@@ -51,11 +65,13 @@ perl(1), perlfunc(1), perltie(1)
=cut
-require 5.003_11;
+use v5.6.0;
use Tie::Hash;
-@ISA = qw(Tie::Hash);
use strict;
+our @ISA = qw(Tie::Hash);
+our $VERSION = '1.3';
+
sub TIEHASH {
my $c = shift;
my $s = [];
@@ -68,7 +84,17 @@ sub TIEHASH {
sub FETCH {
my($s, $k) = @_;
- (ref $k) ? $s->[0]{"$k"}[1] : $s->[1]{$k};
+ if (ref $k) {
+ if (defined $s->[0]{"$k"}) {
+ $s->[0]{"$k"}[1];
+ }
+ else {
+ undef;
+ }
+ }
+ else {
+ $s->[1]{$k};
+ }
}
sub STORE {
@@ -121,4 +147,16 @@ sub CLEAR {
%{$s->[1]} = ();
}
+package Tie::RefHash::Nestable;
+our @ISA = qw(Tie::RefHash);
+
+sub STORE {
+ my($s, $k, $v) = @_;
+ if (ref($v) eq 'HASH' and not tied %$v) {
+ my @elems = %$v;
+ tie %$v, ref($s), @elems;
+ }
+ $s->SUPER::STORE($k, $v);
+}
+
1;
diff --git a/contrib/perl5/lib/Tie/Scalar.pm b/contrib/perl5/lib/Tie/Scalar.pm
index 0c67590..89ad03e 100644
--- a/contrib/perl5/lib/Tie/Scalar.pm
+++ b/contrib/perl5/lib/Tie/Scalar.pm
@@ -91,8 +91,7 @@ sub new {
sub TIESCALAR {
my $pkg = shift;
if (defined &{"{$pkg}::new"}) {
- warnings::warn "WARNING: calling ${pkg}->new since ${pkg}->TIESCALAR is missing"
- if warnings::enabled();
+ warnings::warnif("WARNING: calling ${pkg}->new since ${pkg}->TIESCALAR is missing");
$pkg->new(@_);
}
else {
diff --git a/contrib/perl5/lib/Tie/SubstrHash.pm b/contrib/perl5/lib/Tie/SubstrHash.pm
index 4b18a58..1c04c6f 100644
--- a/contrib/perl5/lib/Tie/SubstrHash.pm
+++ b/contrib/perl5/lib/Tie/SubstrHash.pm
@@ -33,6 +33,8 @@ Because the current implementation uses the table and key sizes for the
hashing algorithm, there is no means by which to dynamically change the
value of any of the initialization parameters.
+The hash does not support exists().
+
=cut
use Carp;
@@ -41,12 +43,20 @@ sub TIEHASH {
my $pack = shift;
my ($klen, $vlen, $tsize) = @_;
my $rlen = 1 + $klen + $vlen;
- $tsize = findprime($tsize * 1.1); # Allow 10% empty.
+ $tsize = [$tsize,
+ findgteprime($tsize * 1.1)]; # Allow 10% empty.
$self = bless ["\0", $klen, $vlen, $tsize, $rlen, 0, -1];
- $$self[0] x= $rlen * $tsize;
+ $$self[0] x= $rlen * $tsize->[1];
$self;
}
+sub CLEAR {
+ local($self) = @_;
+ $$self[0] = "\0" x ($$self[4] * $$self[3]->[1]);
+ $$self[5] = 0;
+ $$self[6] = -1;
+}
+
sub FETCH {
local($self,$key) = @_;
local($klen, $vlen, $tsize, $rlen) = @$self[1..4];
@@ -69,8 +79,8 @@ sub FETCH {
sub STORE {
local($self,$key,$val) = @_;
local($klen, $vlen, $tsize, $rlen) = @$self[1..4];
- croak("Table is full") if $$self[5] == $tsize;
- croak(qq/Value "$val" is not $vlen characters long./)
+ croak("Table is full ($tsize->[0] elements)") if $$self[5] > $tsize->[0];
+ croak(qq/Value "$val" is not $vlen characters long/)
if length($val) != $vlen;
my $writeoffset;
@@ -129,7 +139,7 @@ sub FIRSTKEY {
sub NEXTKEY {
local($self) = @_;
local($klen, $vlen, $tsize, $rlen, $entries, $iterix) = @$self[1..6];
- for (++$iterix; $iterix < $tsize; ++$iterix) {
+ for (++$iterix; $iterix < $tsize->[1]; ++$iterix) {
next unless substr($$self[0], $iterix * $rlen, 1) eq "\2";
$$self[6] = $iterix;
return substr($$self[0], $iterix * $rlen + 1, $klen);
@@ -138,42 +148,65 @@ sub NEXTKEY {
undef;
}
+sub EXISTS {
+ croak "Tie::SubstrHash does not support exists()";
+}
+
sub hashkey {
- croak(qq/Key "$key" is not $klen characters long.\n/)
+ croak(qq/Key "$key" is not $klen characters long/)
if length($key) != $klen;
$hash = 2;
for (unpack('C*', $key)) {
$hash = $hash * 33 + $_;
&_hashwrap if $hash >= 1e13;
}
- &_hashwrap if $hash >= $tsize;
+ &_hashwrap if $hash >= $tsize->[1];
$hash = 1 unless $hash;
$hashbase = $hash;
}
sub _hashwrap {
- $hash -= int($hash / $tsize) * $tsize;
+ $hash -= int($hash / $tsize->[1]) * $tsize->[1];
}
sub rehash {
$hash += $hashbase;
- $hash -= $tsize if $hash >= $tsize;
+ $hash -= $tsize->[1] if $hash >= $tsize->[1];
}
-sub findprime {
+# using POSIX::ceil() would be too heavy, and not all platforms have it.
+sub ceil {
+ my $num = shift;
+ $num = int($num + 1) unless $num == int $num;
+ return $num;
+}
+
+# See:
+#
+# http://www-groups.dcs.st-andrews.ac.uk/~history/HistTopics/Prime_numbers.html
+#
+
+sub findgteprime { # find the smallest prime integer greater than or equal to
use integer;
- my $num = shift;
- $num++ unless $num % 2;
+ my $num = ceil(shift);
+ return 2 if $num <= 2;
- $max = int sqrt $num;
+ $num++ unless $num % 2;
+ my $i;
+ my $sqrtnum = int sqrt $num;
+ my $sqrtnumsquared = $sqrtnum * $sqrtnum;
NUM:
for (;; $num += 2) {
- for ($i = 3; $i <= $max; $i += 2) {
- next NUM unless $num % $i;
+ if ($sqrtnumsquared < $num) {
+ $sqrtnum++;
+ $sqrtnumsquared = $sqrtnum * $sqrtnum;
}
- return $num;
+ for ($i = 3; $i <= $sqrtnum; $i += 2) {
+ next NUM unless $num % $i;
+ }
+ return $num;
}
}
diff --git a/contrib/perl5/lib/base.pm b/contrib/perl5/lib/base.pm
index 3cb42f5..d055129 100644
--- a/contrib/perl5/lib/base.pm
+++ b/contrib/perl5/lib/base.pm
@@ -30,7 +30,7 @@ C<require>s them. Whether to C<require> a base class package is
determined by the absence of a global $VERSION in the base package.
If $VERSION is not detected even after loading it, <base> will
define $VERSION in the base package, setting it to the string
-C<-1, defined by base.pm>.
+C<-1, set by base.pm>.
=head1 HISTORY
diff --git a/contrib/perl5/lib/bigint.pl b/contrib/perl5/lib/bigint.pl
index 4044f7f..9a3d50d 100644
--- a/contrib/perl5/lib/bigint.pl
+++ b/contrib/perl5/lib/bigint.pl
@@ -42,6 +42,12 @@ package bigint;
# bnorm(BINT) return BINT normalization
#
+# overcome a floating point problem on certain osnames (posix-bc, os390)
+BEGIN {
+ my $x = 100000.0;
+ my $use_mult = int($x*1e-5)*1e5 == $x ? 1 : 0;
+}
+
$zero = 0;
@@ -212,8 +218,14 @@ sub main'bmul { #(num_str, num_str) return num_str
($car, $cty) = (0, $[);
for $y (@y) {
$prod = $x * $y + $prod[$cty] + $car;
- $prod[$cty++] =
- $prod - ($car = int($prod * 1e-5)) * 1e5;
+ if ($use_mult) {
+ $prod[$cty++] =
+ $prod - ($car = int($prod * 1e-5)) * 1e5;
+ }
+ else {
+ $prod[$cty++] =
+ $prod - ($car = int($prod / 1e5)) * 1e5;
+ }
}
$prod[$cty] += $car if $car;
$x = shift @prod;
@@ -239,12 +251,22 @@ sub main'bdiv { #(dividend: num_str, divisor: num_str) return num_str
if (($dd = int(1e5/($y[$#y]+1))) != 1) {
for $x (@x) {
$x = $x * $dd + $car;
+ if ($use_mult) {
$x -= ($car = int($x * 1e-5)) * 1e5;
+ }
+ else {
+ $x -= ($car = int($x / 1e5)) * 1e5;
+ }
}
push(@x, $car); $car = 0;
for $y (@y) {
$y = $y * $dd + $car;
+ if ($use_mult) {
$y -= ($car = int($y * 1e-5)) * 1e5;
+ }
+ else {
+ $y -= ($car = int($y / 1e5)) * 1e5;
+ }
}
}
else {
@@ -259,7 +281,12 @@ sub main'bdiv { #(dividend: num_str, divisor: num_str) return num_str
($car, $bar) = (0,0);
for ($y = $[, $x = $#x-$#y+$[-1; $y <= $#y; ++$y,++$x) {
$prd = $q * $y[$y] + $car;
+ if ($use_mult) {
$prd -= ($car = int($prd * 1e-5)) * 1e5;
+ }
+ else {
+ $prd -= ($car = int($prd / 1e5)) * 1e5;
+ }
$x[$x] += 1e5 if ($bar = (($x[$x] -= $prd + $bar) < 0));
}
if ($x[$#x] < $car + $bar) {
diff --git a/contrib/perl5/lib/bytes.pm b/contrib/perl5/lib/bytes.pm
index f93d615..f2f7e01 100644
--- a/contrib/perl5/lib/bytes.pm
+++ b/contrib/perl5/lib/bytes.pm
@@ -38,11 +38,28 @@ 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
-been marked as being of a particular character encoding).
-
-To understand the implications and differences between character
+Perl normally assumes character semantics in the presence of character
+data (i.e. data that has come from a source that has been marked as
+being of a particular character encoding). When C<use bytes> is in
+effect, the encoding is temporarily ignored, and each string is treated
+as a series of bytes.
+
+As an example, when Perl sees C<$x = chr(400)>, it encodes the character
+in UTF8 and stores it in $x. Then it is marked as character data, so,
+for instance, C<length $x> returns C<1>. However, in the scope of the
+C<bytes> pragma, $x is treated as a series of bytes - the bytes that make
+up the UTF8 encoding - and C<length $x> returns C<2>:
+
+ $x = chr(400);
+ print "Length is ", length $x, "\n"; # "Length is 1"
+ printf "Contents are %vd\n", $x; # "Contents are 400"
+ {
+ use bytes;
+ print "Length is ", length $x, "\n"; # "Length is 2"
+ printf "Contents are %vd\n", $x; # "Contents are 198.144"
+ }
+
+For more on the implications and differences between character
semantics and byte semantics, see L<perlunicode>.
=head1 SEE ALSO
diff --git a/contrib/perl5/lib/charnames.pm b/contrib/perl5/lib/charnames.pm
index 7c2209b..5f0c95f 100644
--- a/contrib/perl5/lib/charnames.pm
+++ b/contrib/perl5/lib/charnames.pm
@@ -1,5 +1,6 @@
package charnames;
use bytes (); # for $bytes::hint_bits
+use warnings();
$charnames::hint_bits = 0x20000;
my $txt;
@@ -29,8 +30,11 @@ sub charnames {
}
}
die "Unknown charname '$name'" unless @off;
-
- my $ord = hex substr $txt, $off[0] - 4, 4;
+
+ my $hexlen = 4; # Unicode guarantees 4-, 5-, or 6-digit format
+ $hexlen++ while
+ $hexlen < 6 && substr($txt, $off[0] - $hexlen - 1, 1) =~ /[0-9a-f]/;
+ my $ord = hex substr $txt, $off[0] - $hexlen, $hexlen;
if ($^H & $bytes::hint_bits) { # "use bytes" in effect?
use bytes;
return chr $ord if $ord <= 255;
@@ -51,6 +55,13 @@ sub import {
$^H{charnames_full} = delete $h{':full'};
$^H{charnames_short} = delete $h{':short'};
$^H{charnames_scripts} = [map uc, keys %h];
+ if (warnings::enabled('utf8') && @{$^H{charnames_scripts}}) {
+ $txt = do "unicode/Name.pl" unless $txt;
+ for (@{$^H{charnames_scripts}}) {
+ warnings::warn('utf8', "No such script: '$_'") unless
+ $txt =~ m/\t\t$_ (?:CAPITAL |SMALL )?LETTER /;
+ }
+ }
}
diff --git a/contrib/perl5/lib/diagnostics.pm b/contrib/perl5/lib/diagnostics.pm
index a2c927b..884ea3c 100755
--- a/contrib/perl5/lib/diagnostics.pm
+++ b/contrib/perl5/lib/diagnostics.pm
@@ -44,7 +44,7 @@ These still go out B<STDERR>.
Due to the interaction between runtime and compiletime issues,
and because it's probably not a very good idea anyway,
you may not use C<no diagnostics> to turn them off at compiletime.
-However, you may control there behaviour at runtime using the
+However, you may control their behaviour at runtime using the
disable() and enable() methods to turn them off and on respectively.
The B<-verbose> flag first prints out the L<perldiag> introduction before
@@ -167,19 +167,23 @@ Tom Christiansen <F<tchrist@mox.perl.com>>, 25 June 1995.
=cut
+use strict;
use 5.005_64;
use Carp;
-$VERSION = v1.0;
+our $VERSION = v1.0;
+our $DEBUG;
+our $VERBOSE;
+our $PRETTY;
use Config;
-($privlib, $archlib) = @Config{qw(privlibexp archlibexp)};
+my($privlib, $archlib) = @Config{qw(privlibexp archlibexp)};
if ($^O eq 'VMS') {
require VMS::Filespec;
$privlib = VMS::Filespec::unixify($privlib);
$archlib = VMS::Filespec::unixify($archlib);
}
-@trypod = (
+my @trypod = (
"$archlib/pod/perldiag.pod",
"$privlib/pod/perldiag-$Config{version}.pod",
"$privlib/pod/perldiag.pod",
@@ -189,21 +193,21 @@ if ($^O eq 'VMS') {
);
# handy for development testing of new warnings etc
unshift @trypod, "./pod/perldiag.pod" if -e "pod/perldiag.pod";
-($PODFILE) = ((grep { -e } @trypod), $trypod[$#trypod])[0];
+(my $PODFILE) = ((grep { -e } @trypod), $trypod[$#trypod])[0];
$DEBUG ||= 0;
my $WHOAMI = ref bless []; # nobody's business, prolly not even mine
-$| = 1;
-
+local $| = 1;
local $_;
+my $standalone;
+my(%HTML_2_Troff, %HTML_2_Latin_1, %HTML_2_ASCII_7);
+
CONFIG: {
- $opt_p = $opt_d = $opt_v = $opt_f = '';
- %HTML_2_Troff = %HTML_2_Latin_1 = %HTML_2_ASCII_7 = ();
- %exact_duplicate = ();
+ our $opt_p = our $opt_d = our $opt_v = our $opt_f = '';
- unless (caller) {
+ unless (caller) {
$standalone++;
require Getopt::Std;
Getopt::Std::getopts('pdvf:')
@@ -212,7 +216,7 @@ CONFIG: {
$DEBUG = 2 if $opt_d;
$VERBOSE = $opt_v;
$PRETTY = $opt_p;
- }
+ }
if (open(POD_DIAG, $PODFILE)) {
warn "Happy happy podfile from real $PODFILE\n" if $DEBUG;
@@ -221,11 +225,12 @@ CONFIG: {
if (caller) {
INCPATH: {
- for $file ( (map { "$_/$WHOAMI.pm" } @INC), $0) {
+ for my $file ( (map { "$_/$WHOAMI.pm" } @INC), $0) {
warn "Checking $file\n" if $DEBUG;
if (open(POD_DIAG, $file)) {
while (<POD_DIAG>) {
- next unless /^__END__\s*# wish diag dbase were more accessible/;
+ next unless
+ /^__END__\s*# wish diag dbase were more accessible/;
print STDERR "podfile is $file\n" if $DEBUG;
last INCPATH;
}
@@ -274,6 +279,7 @@ if (eof(POD_DIAG)) {
# etc
);
+our %HTML_Escapes;
*HTML_Escapes = do {
if ($standalone) {
$PRETTY ? \%HTML_2_Latin_1 : \%HTML_2_ASCII_7;
@@ -284,20 +290,20 @@ if (eof(POD_DIAG)) {
*THITHER = $standalone ? *STDOUT : *STDERR;
-$transmo = <<EOFUNC;
+my $transmo = <<EOFUNC;
sub transmo {
#local \$^W = 0; # recursive warnings we do NOT need!
study;
EOFUNC
-### sub finish_compilation { # 5.001e panic: top_level for embedded version
+my %msg;
+{
print STDERR "FINISHING COMPILATION for $_\n" if $DEBUG;
- ### local
- $RS = '';
+ local $/ = '';
local $_;
+ my $header;
+ my $for_item;
while (<POD_DIAG>) {
- #s/(.*)\n//;
- #$header = $1;
unescape();
if ($PRETTY) {
@@ -321,29 +327,35 @@ EOFUNC
}
s/^/ /gm;
$msg{$header} .= $_;
+ undef $for_item;
}
next;
}
- unless ( s/=item (.*)\s*\Z//) {
+ unless ( s/=item (.*?)\s*\z//) {
if ( s/=head1\sDESCRIPTION//) {
$msg{$header = 'DESCRIPTION'} = '';
+ undef $for_item;
}
+ elsif( s/^=for\s+diagnostics\s*\n(.*?)\s*\z// ) {
+ $for_item = $1;
+ }
next;
}
# strip formatting directives in =item line
- ($header = $1) =~ s/[A-Z]<(.*?)>/$1/g;
+ $header = $for_item || $1;
+ undef $for_item;
+ $header =~ s/[A-Z]<(.*?)>/$1/g;
if ($header =~ /%[csd]/) {
- $rhs = $lhs = $header;
- #if ($lhs =~ s/(.*?)%d(?!%d)(.*)/\Q$1\E\\d+\Q$2\E\$/g) {
- if ($lhs =~ s/(.*?)%d(?!%d)(.*)/\Q$1\E\\d+\Q$2\E/g) {
+ my $rhs = my $lhs = $header;
+ if ($lhs =~ s/(.*?)%d(?!%d)(.*)/\Q$1\E-?\\d+\Q$2\E/g) {
$lhs =~ s/\\%s/.*?/g;
} else {
- # if i had lookbehind negations, i wouldn't have to do this \377 noise
+ # if i had lookbehind negations,
+ # i wouldn't have to do this \377 noise
$lhs =~ s/(.*?)%s/\Q$1\E.*?\377/g;
- #$lhs =~ s/\377([^\377]*)$/\Q$1\E\$/;
$lhs =~ s/\377([^\377]*)$/\Q$1\E/;
$lhs =~ s/\377//g;
$lhs =~ s/\.\*\?$/.*/; # Allow %s at the end to eat it all
@@ -369,25 +381,23 @@ EOFUNC
print STDERR $transmo if $DEBUG;
eval $transmo;
die $@ if $@;
- $RS = "\n";
-### }
+}
if ($standalone) {
if (!@ARGV and -t STDIN) { print STDERR "$0: Reading from STDIN\n" }
- while (defined ($error = <>)) {
+ while (defined (my $error = <>)) {
splainthis($error) || print THITHER $error;
}
exit;
-} else {
- #$old_w = 0;
- $oldwarn = ''; $olddie = '';
-}
+}
+
+my $olddie;
+my $oldwarn;
sub import {
shift;
- #$old_w = $^W;
- $^W = 1; # yup, clobbered the global variable; tough, if you
- # want diags, you want diags.
+ $^W = 1; # yup, clobbered the global variable;
+ # tough, if you want diags, you want diags.
return if $SIG{__WARN__} eq \&warn_trap;
for (@_) {
@@ -421,10 +431,9 @@ sub enable { &import }
sub disable {
shift;
- #$^W = $old_w;
return unless $SIG{__WARN__} eq \&warn_trap;
- $SIG{__WARN__} = $oldwarn;
- $SIG{__DIE__} = $olddie;
+ $SIG{__WARN__} = $oldwarn || '';
+ $SIG{__DIE__} = $olddie || '';
}
sub warn_trap {
@@ -465,6 +474,10 @@ sub death_trap {
# into an indirect recursion loop
};
+my %exact_duplicate;
+my %old_diag;
+my $count;
+my $wantspace;
sub splainthis {
local $_ = shift;
local $\;
@@ -473,7 +486,7 @@ sub splainthis {
my $orig = $_;
# return unless defined;
s/, <.*?> (?:line|chunk).*$//;
- $real = s/(.*?) at .*? (?:line|chunk) \d+.*/$1/;
+ my $real = s/(.*?) at .*? (?:line|chunk) \d+.*/$1/;
s/^\((.*)\)$/$1/;
if ($exact_duplicate{$orig}++) {
return &transmo;
@@ -542,8 +555,5 @@ sub shorten {
}
-# have to do this: RS isn't set until run time, but we're executing at compiletime
-$RS = "\n";
-
1 unless $standalone; # or it'll complain about itself
__END__ # wish diag dbase were more accessible
diff --git a/contrib/perl5/lib/fields.pm b/contrib/perl5/lib/fields.pm
index ac45810..37ff99d 100644
--- a/contrib/perl5/lib/fields.pm
+++ b/contrib/perl5/lib/fields.pm
@@ -172,8 +172,7 @@ sub import {
if ($fno and $fno != $next) {
require Carp;
if ($fno < $fattr->[0]) {
- warnings::warn("Hides field '$f' in base class")
- if warnings::enabled();
+ warnings::warnif("Hides field '$f' in base class") ;
} else {
Carp::croak("Field name '$f' already in use");
}
diff --git a/contrib/perl5/lib/ftp.pl b/contrib/perl5/lib/ftp.pl
index aa6a489..3f0af1a 100644
--- a/contrib/perl5/lib/ftp.pl
+++ b/contrib/perl5/lib/ftp.pl
@@ -74,7 +74,7 @@
# No longer call die expect on fatal errors. Just return fail codes.
# Changed returns so higher up routines can tell whats happening.
# Get expect/accept in correct order for dir listing.
-# When ftp_show is set then print hashes every 1k transfered (like ftp).
+# When ftp_show is set then print hashes every 1k transferred (like ftp).
# Allow for stripping returns out of incoming data.
# Save last error in a global string.
#
diff --git a/contrib/perl5/lib/getopts.pl b/contrib/perl5/lib/getopts.pl
index 2595819..4a50b8f 100644
--- a/contrib/perl5/lib/getopts.pl
+++ b/contrib/perl5/lib/getopts.pl
@@ -16,41 +16,50 @@ sub Getopts {
local($argumentative) = @_;
local(@args,$_,$first,$rest);
local($errs) = 0;
+ local($[) = 0;
@args = split( / */, $argumentative );
while(@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) {
- ($first,$rest) = ($1,$2);
- $pos = index($argumentative,$first);
- if($pos >= 0) {
- if($pos < $#args && $args[$pos+1] eq ':') {
- shift(@ARGV);
- if($rest eq '') {
- ++$errs unless @ARGV;
- $rest = shift(@ARGV);
- }
- ${"opt_$first"} = $rest;
- }
- else {
- ${"opt_$first"} = 1;
- if($rest eq '') {
- shift(@ARGV);
+ ($first,$rest) = ($1,$2);
+ $pos = index($argumentative,$first);
+ if($pos >= $[) {
+ if($args[$pos+1] eq ':') {
+ shift(@ARGV);
+ if($rest eq '') {
+ ++$errs unless(@ARGV);
+ $rest = shift(@ARGV);
+ }
+ eval "
+ push(\@opt_$first, \$rest);
+ if(\$opt_$first eq '') {
+ \$opt_$first = \$rest;
+ }
+ else {
+ \$opt_$first .= ' ' . \$rest;
+ }
+ ";
+ }
+ else {
+ eval "\$opt_$first = 1";
+ if($rest eq '') {
+ shift(@ARGV);
+ }
+ else {
+ $ARGV[0] = "-$rest";
+ }
+ }
}
else {
- $ARGV[0] = "-$rest";
+ print STDERR "Unknown option: $first\n";
+ ++$errs;
+ if($rest ne '') {
+ $ARGV[0] = "-$rest";
+ }
+ else {
+ shift(@ARGV);
+ }
}
- }
- }
- else {
- print STDERR "Unknown option: $first\n";
- ++$errs;
- if($rest ne '') {
- $ARGV[0] = "-$rest";
- }
- else {
- shift(@ARGV);
- }
}
- }
$errs == 0;
}
diff --git a/contrib/perl5/lib/integer.pm b/contrib/perl5/lib/integer.pm
index 86afcaf..998574f 100644
--- a/contrib/perl5/lib/integer.pm
+++ b/contrib/perl5/lib/integer.pm
@@ -2,7 +2,7 @@ package integer;
=head1 NAME
-integer - Perl pragma to compute arithmetic in integer instead of double
+integer - Perl pragma to use integer arithmetic instead of floating point
=head1 SYNOPSIS
@@ -12,34 +12,69 @@ integer - Perl pragma to compute arithmetic in integer instead of double
=head1 DESCRIPTION
-This tells the compiler to use integer operations
-from here to the end of the enclosing BLOCK. On many machines,
-this doesn't matter a great deal for most computations, but on those
-without floating point hardware, it can make a big difference.
-
-Note that this affects the operations, not the numbers. If you run this
-code
+This tells the compiler to use integer operations from here to the end
+of the enclosing BLOCK. On many machines, this doesn't matter a great
+deal for most computations, but on those without floating point
+hardware, it can make a big difference in performance.
+
+Note that this only affects how most of the arithmetic and relational
+B<operators> handle their operands and results, and B<not> how all
+numbers everywhere are treated. Specifically, C<use integer;> has the
+effect that before computing the results of the arithmetic operators
+(+, -, *, /, %, +=, -=, *=, /=, %=, and unary minus), the comparison
+operators (<, <=, >, >=, ==, !=, <=>), and the bitwise operators (|, &,
+^, <<, >>, |=, &=, ^=, <<=, >>=), the operands have their fractional
+portions truncated (or floored), and the result will have its
+fractional portion truncated as well. In addition, the range of
+operands and results is restricted to that of familiar two's complement
+integers, i.e., -(2**31) .. (2**31-1) on 32-bit architectures, and
+-(2**63) .. (2**63-1) on 64-bit architectures. For example, this code
use integer;
- $x = 1.5;
- $y = $x + 1;
- $z = -1.5;
-
-you'll be left with C<$x == 1.5>, C<$y == 2> and C<$z == -1>. The $z
-case happens because unary C<-> counts as an operation.
-
-Native integer arithmetic (as provided by your C compiler) is used.
-This means that Perl's own semantics for arithmetic operations may
-not be preserved. One common source of trouble is the modulus of
-negative numbers, which Perl does one way, but your hardware may do
-another.
-
- % perl -le 'print (4 % -3)'
- -2
- % perl -Minteger -le 'print (4 % -3)'
- 1
-
-See L<perlmod/Pragmatic Modules>.
+ $x = 5.8;
+ $y = 2.5;
+ $z = 2.7;
+ $a = 2**31 - 1; # Largest positive integer on 32-bit machines
+ $, = ", ";
+ print $x, -$x, $x + $y, $x - $y, $x / $y, $x * $y, $y == $z, $a, $a + 1;
+
+will print: 5.8, -5, 7, 3, 2, 10, 1, 2147483647, -2147483648
+
+Note that $x is still printed as having its true non-integer value of
+5.8 since it wasn't operated on. And note too the wrap-around from the
+largest positive integer to the largest negative one. Also, arguments
+passed to functions and the values returned by them are B<not> affected
+by C<use integer;>. E.g.,
+
+ srand(1.5);
+ $, = ", ";
+ print sin(.5), cos(.5), atan2(1,2), sqrt(2), rand(10);
+
+will give the same result with or without C<use integer;> The power
+operator C<**> is also not affected, so that 2 ** .5 is always the
+square root of 2. Now, it so happens that the pre- and post- increment
+and decrement operators, ++ and --, are not affected by C<use integer;>
+either. Some may rightly consider this to be a bug -- but at least it's
+a long-standing one.
+
+Finally, C<use integer;> also has an additional affect on the bitwise
+operators. Normally, the operands and results are treated as
+B<unsigned> integers, but with C<use integer;> the operands and results
+are B<signed>. This means, among other things, that ~0 is -1, and -2 &
+-5 is -6.
+
+Internally, native integer arithmetic (as provided by your C compiler)
+is used. This means that Perl's own semantics for arithmetic
+operations may not be preserved. One common source of trouble is the
+modulus of negative numbers, which Perl does one way, but your hardware
+may do another.
+
+ % perl -le 'print (4 % -3)'
+ -2
+ % perl -Minteger -le 'print (4 % -3)'
+ 1
+
+See L<perlmodlib/"Pragmatic Modules">, L<perlop/"Integer Arithmetic">
=cut
diff --git a/contrib/perl5/lib/lib.pm b/contrib/perl5/lib/lib.pm
index 98e2f73..077dd63 100644
--- a/contrib/perl5/lib/lib.pm
+++ b/contrib/perl5/lib/lib.pm
@@ -32,6 +32,7 @@ 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";
}
@@ -49,6 +50,8 @@ sub unimport {
foreach (@_) {
++$names{$_};
++$names{"$_/$archname"} if -d "$_/$archname/auto";
+ ++$names{"$_/$ver"} if -d "$_/$ver";
+ ++$names{"$_/$ver/$archname"} if -d "$_/$ver/$archname";
}
# Remove ALL instances of each named directory.
diff --git a/contrib/perl5/lib/overload.pm b/contrib/perl5/lib/overload.pm
index ba96bc9..70a5f88 100644
--- a/contrib/perl5/lib/overload.pm
+++ b/contrib/perl5/lib/overload.pm
@@ -106,7 +106,7 @@ sub mycan { # Real can would leave stubs.
}
%constants = (
- 'integer' => 0x1000,
+ 'integer' => 0x1000,
'float' => 0x2000,
'binary' => 0x4000,
'q' => 0x8000,
@@ -127,11 +127,29 @@ sub mycan { # Real can would leave stubs.
dereferencing => '${} @{} %{} &{} *{}',
special => 'nomethod fallback =');
+use warnings::register;
sub constant {
# Arguments: what, sub
while (@_) {
- $^H{$_[0]} = $_[1];
- $^H |= $constants{$_[0]} | $overload::hint_bits;
+ if (@_ == 1) {
+ warnings::warnif ("Odd number of arguments for overload::constant");
+ last;
+ }
+ elsif (!exists $constants {$_ [0]}) {
+ warnings::warnif ("`$_[0]' is not an overloadable type");
+ }
+ elsif (!ref $_ [1] || "$_[1]" !~ /CODE\(0x[\da-f]+\)$/) {
+ # Can't use C<ref $_[1] eq "CODE"> above as code references can be
+ # blessed, and C<ref> would return the package the ref is blessed into.
+ if (warnings::enabled) {
+ $_ [1] = "undef" unless defined $_ [1];
+ warnings::warn ("`$_[1]' is not a code reference");
+ }
+ }
+ else {
+ $^H{$_[0]} = $_[1];
+ $^H |= $constants{$_[0]} | $overload::hint_bits;
+ }
shift, shift;
}
}
@@ -149,7 +167,7 @@ sub remove_constant {
__END__
-=head1 NAME
+=head1 NAME
overload - Package for overloading perl operations
@@ -157,7 +175,7 @@ overload - Package for overloading perl operations
package SomeThing;
- use overload
+ use overload
'+' => \&myadd,
'-' => \&mysub;
# etc
@@ -179,12 +197,12 @@ The compilation directive
package Number;
use overload
- "+" => \&add,
+ "+" => \&add,
"*=" => "muas";
declares function Number::add() for addition, and method muas() in
the "class" C<Number> (or one of its base classes)
-for the assignment form C<*=> of multiplication.
+for the assignment form C<*=> of multiplication.
Arguments of this directive come in (key, value) pairs. Legal values
are values legal inside a C<&{ ... }> call, so the name of a
@@ -279,20 +297,20 @@ if C<+=> is not overloaded.
=back
B<Warning.> Due to the presense of assignment versions of operations,
-routines which may be called in assignment context may create
-self-referential structures. Currently Perl will not free self-referential
+routines which may be called in assignment context may create
+self-referential structures. Currently Perl will not free self-referential
structures until cycles are C<explicitly> broken. You may get problems
when traversing your structures too.
-Say,
+Say,
use overload '+' => sub { bless [ \$_[0], \$_[1] ] };
is asking for trouble, since for code C<$obj += $foo> the subroutine
-is called as C<$obj = add($obj, $foo, undef)>, or C<$obj = [\$obj,
+is called as C<$obj = add($obj, $foo, undef)>, or C<$obj = [\$obj,
\$foo]>. If using such a subroutine is an important optimization, one
can overload C<+=> explicitly by a non-"optimized" version, or switch
-to non-optimized version if C<not defined $_[2]> (see
+to non-optimized version if C<not defined $_[2]> (see
L<Calling Conventions for Binary Operations>).
Even if no I<explicit> assignment-variants of operators are present in
@@ -365,6 +383,11 @@ be used instead. C<bool> is used in the flow control operators
return any arbitrary Perl value. If the corresponding operation for this value
is overloaded too, that operation will be called again with this value.
+As a special case if the overload returns the object itself then it will
+be used directly. An overloaded conversion returning the object is
+probably a bug, because you're likely to get something that looks like
+C<YourPackage=HASH(0x8172b34)>.
+
=item * I<Iteration>
"<>"
@@ -382,6 +405,12 @@ If not overloaded, the argument will be dereferenced I<as is>, thus
should be of correct type. These functions should return a reference
of correct type, or another object with overloaded dereferencing.
+As a special case if the overload returns the object itself then it
+will be used directly (provided it is the correct type).
+
+The dereference operators must be specified explicitly they will not be passed to
+"nomethod".
+
=item * I<Special>
"nomethod", "fallback", "=",
@@ -464,11 +493,16 @@ the last one is used. Say, C<1-$a> can be equivalent to
if the pair C<"nomethod" =E<gt> "nomethodMethod"> was specified in the
C<use overload> directive.
+The C<"nomethod"> mechanism is I<not> used for the dereference operators
+( ${} @{} %{} &{} *{} ).
+
+
If some operation cannot be resolved, and there is no function
assigned to C<"nomethod">, then an exception will be raised via die()--
unless C<"fallback"> was specified as a key in C<use overload> directive.
-=head2 Fallback
+
+=head2 Fallback
The key C<"fallback"> governs what to do if a method for a particular
operation is not found. Three different cases are possible depending on
@@ -492,7 +526,7 @@ present.
=item * defined, but FALSE
No autogeneration is tried. Perl tries to call
-C<"nomethod"> value, and if this is missing, raises an exception.
+C<"nomethod"> value, and if this is missing, raises an exception.
=back
@@ -510,7 +544,7 @@ This operation is called in the situations when a mutator is applied
to a reference that shares its object with some other reference, such
as
- $a=$b;
+ $a=$b;
++$a;
To make this change $a and not change $b, a copy of C<$$a> is made,
@@ -521,7 +555,7 @@ done if C<++> is expressed via a method for C<'++'> or C<'+='> (or
C<nomethod>). Note that if this operation is expressed via C<'+'>
a nonmutator, i.e., as in
- $a=$b;
+ $a=$b;
$a=$a+1;
then C<$a> does not reference a new copy of C<$$a>, since $$a does not
@@ -535,15 +569,15 @@ string copy if the object is a plain scalar.
=item B<Example>
-The actually executed code for
+The actually executed code for
- $a=$b;
+ $a=$b;
Something else which does not modify $a or $b....
++$a;
may be
- $a=$b;
+ $a=$b;
Something else which does not modify $a or $b....
$a = $a->clone(undef,"");
$a->incr(undef,"");
@@ -570,7 +604,7 @@ substitutions are possible for the following operations:
C<$a+=$b> can use the method for C<"+"> if the method for C<"+=">
is not defined.
-=item I<Conversion operations>
+=item I<Conversion operations>
String, numeric, and boolean conversion are calculated in terms of one
another if not all of them are defined.
@@ -597,7 +631,7 @@ string or numerical conversion.
can be expressed in terms of string conversion.
-=item I<Comparison operations>
+=item I<Comparison operations>
can be expressed in terms of its "spaceship" counterpart: either
C<E<lt>=E<gt>> or C<cmp>:
@@ -705,20 +739,20 @@ to overload constant pieces of regular expressions.
The corresponding values are references to functions which take three arguments:
the first one is the I<initial> string form of the constant, the second one
-is how Perl interprets this constant, the third one is how the constant is used.
+is how Perl interprets this constant, the third one is how the constant is used.
Note that the initial string form does not
-contain string delimiters, and has backslashes in backslash-delimiter
+contain string delimiters, and has backslashes in backslash-delimiter
combinations stripped (thus the value of delimiter is not relevant for
-processing of this string). The return value of this function is how this
+processing of this string). The return value of this function is how this
constant is going to be interpreted by Perl. The third argument is undefined
unless for overloaded C<q>- and C<qr>- constants, it is C<q> in single-quote
context (comes from strings, regular expressions, and single-quote HERE
-documents), it is C<tr> for arguments of C<tr>/C<y> operators,
+documents), it is C<tr> for arguments of C<tr>/C<y> operators,
it is C<s> for right-hand side of C<s>-operator, and it is C<qq> otherwise.
Since an expression C<"ab$cd,,"> is just a shortcut for C<'ab' . $cd . ',,'>,
it is expected that overloaded constant strings are equipped with reasonable
-overloaded catenation operator, otherwise absurd results will result.
+overloaded catenation operator, otherwise absurd results will result.
Similarly, negative numbers are considered as negations of positive constants.
Note that it is probably meaningless to call the functions overload::constant()
@@ -732,7 +766,7 @@ From these methods they may be called as
overload::constant integer => sub {Math::BigInt->new(shift)};
}
-B<BUGS> Currently overloaded-ness of constants does not propagate
+B<BUGS> Currently overloaded-ness of constants does not propagate
into C<eval '...'>.
=head1 IMPLEMENTATION
@@ -774,7 +808,7 @@ packages acquire a magic during the next C<bless>ing into the
package. This magic is three-words-long for packages without
overloading, and carries the cache table if the package is overloaded.
-Copying (C<$a=$b>) is shallow; however, a one-level-deep copying is
+Copying (C<$a=$b>) is shallow; however, a one-level-deep copying is
carried out before any operation that can imply an assignment to the
object $a (or $b) refers to, like C<$a++>. You can override this
behavior by defining your own copy constructor (see L<"Copy Constructor">).
@@ -785,8 +819,8 @@ to be changed are constant (but this is not enforced).
=head1 Metaphor clash
One may wonder why the semantic of overloaded C<=> is so counter intuitive.
-If it I<looks> counter intuitive to you, you are subject to a metaphor
-clash.
+If it I<looks> counter intuitive to you, you are subject to a metaphor
+clash.
Here is a Perl object metaphor:
@@ -805,10 +839,10 @@ that $a and $b are separate entities.
The difference is not relevant in the absence of mutators. After
a Perl-way assignment an operation which mutates the data referenced by $a
-would change the data referenced by $b too. Effectively, after
+would change the data referenced by $b too. Effectively, after
C<$a = $b> values of $a and $b become I<indistinguishable>.
-On the other hand, anyone who has used algebraic notation knows the
+On the other hand, anyone who has used algebraic notation knows the
expressive power of the arithmetic metaphor. Overloading works hard
to enable this metaphor while preserving the Perlian way as far as
possible. Since it is not not possible to freely mix two contradicting
@@ -817,7 +851,7 @@ far as all the mutators are called via overloaded access only>. The
way it is done is described in L<Copy Constructor>.
If some mutator methods are directly applied to the overloaded values,
-one may need to I<explicitly unlink> other values which references the
+one may need to I<explicitly unlink> other values which references the
same value:
$a = new Data 23;
@@ -841,7 +875,7 @@ However, it would not make
preserve "objectness" of $a. But Perl I<has> a way to make assignments
to an object do whatever you want. It is just not the overload, but
tie()ing interface (see L<perlfunc/tie>). Adding a FETCH() method
-which returns the object itself, and STORE() method which changes the
+which returns the object itself, and STORE() method which changes the
value of the object, one can reproduce the arithmetic metaphor in its
completeness, at least for variables which were tie()d from the start.
@@ -878,16 +912,15 @@ numeric value.) This prints:
=head2 Two-face references
Suppose you want to create an object which is accessible as both an
-array reference, and a hash reference, similar to the builtin
-L<array-accessible-as-a-hash|perlref/"Pseudo-hashes: Using an array as
-a hash"> builtin Perl type. Let us make it better than the builtin
-type, there will be no restriction that you cannot use the index 0 of
-your array.
+array reference and a hash reference, similar to the
+L<pseudo-hash|perlref/"Pseudo-hashes: Using an array as a hash">
+builtin Perl type. Let's make it better than a pseudo-hash by
+allowing index 0 to be treated as a normal element.
package two_refs;
use overload '%{}' => \&gethash, '@{}' => sub { $ {shift()} };
- sub new {
- my $p = shift;
+ sub new {
+ my $p = shift;
bless \ [@_], $p;
}
sub gethash {
@@ -901,13 +934,13 @@ your array.
my %fields;
my $i = 0;
$fields{$_} = $i++ foreach qw{zero one two three};
- sub STORE {
+ sub STORE {
my $self = ${shift()};
my $key = $fields{shift()};
defined $key or die "Out of band access";
$$self->[$key] = shift;
}
- sub FETCH {
+ sub FETCH {
my $self = ${shift()};
my $key = $fields{shift()};
defined $key or die "Out of band access";
@@ -934,26 +967,26 @@ would would lead to a memory leak.
Both these problems can be cured. Say, if we want to overload hash
dereference on a reference to an object which is I<implemented> as a
hash itself, the only problem one has to circumvent is how to access
-this I<actual> hash (as opposed to the I<virtual> exhibited by
+this I<actual> hash (as opposed to the I<virtual> hash exhibited by the
overloaded dereference operator). Here is one possible fetching routine:
sub access_hash {
my ($self, $key) = (shift, shift);
my $class = ref $self;
- bless $self, 'overload::dummy'; # Disable overloading of %{}
+ bless $self, 'overload::dummy'; # Disable overloading of %{}
my $out = $self->{$key};
bless $self, $class; # Restore overloading
$out;
}
-To move creation of the tied hash on each access, one may an extra
+To remove creation of the tied hash on each access, one may an extra
level of indirection which allows a non-circular structure of references:
package two_refs1;
use overload '%{}' => sub { ${shift()}->[1] },
'@{}' => sub { ${shift()}->[0] };
- sub new {
- my $p = shift;
+ sub new {
+ my $p = shift;
my $a = [@_];
my %h;
tie %h, $p, $a;
@@ -970,23 +1003,23 @@ level of indirection which allows a non-circular structure of references:
my %fields;
my $i = 0;
$fields{$_} = $i++ foreach qw{zero one two three};
- sub STORE {
+ sub STORE {
my $a = ${shift()};
my $key = $fields{shift()};
defined $key or die "Out of band access";
$a->[$key] = shift;
}
- sub FETCH {
+ sub FETCH {
my $a = ${shift()};
my $key = $fields{shift()};
defined $key or die "Out of band access";
$a->[$key];
}
-Now if $baz is overloaded like this, then C<$bar> is a reference to a
+Now if $baz is overloaded like this, then C<$baz> is a reference to a
reference to the intermediate array, which keeps a reference to an
actual array, and the access hash. The tie()ing object for the access
-hash is also a reference to a reference to the actual array, so
+hash is a reference to a reference to the actual array, so
=over
@@ -1061,7 +1094,7 @@ Add a pretty-printer method to the module F<symbolic.pm>:
$a = $a->pretty if ref $a;
$b = $b->pretty if ref $b;
"[$meth $a $b]";
- }
+ }
Now one can finish the script by
@@ -1073,7 +1106,7 @@ inside such a method it is not necessary to pretty-print the
I<components> $a and $b of an object. In the above subroutine
C<"[$meth $a $b]"> is a catenation of some strings and components $a
and $b. If these components use overloading, the catenation operator
-will look for an overloaded operator C<.>, if not present, it will
+will look for an overloaded operator C<.>; if not present, it will
look for an overloaded operator C<"">. Thus it is enough to use
use overload nomethod => \&wrap, '""' => \&str;
@@ -1082,7 +1115,7 @@ look for an overloaded operator C<"">. Thus it is enough to use
$a = 'u' unless defined $a;
$b = 'u' unless defined $b;
"[$meth $a $b]";
- }
+ }
Now one can change the last line of the script to
@@ -1093,7 +1126,7 @@ which outputs
side = [/ [- [sqrt [+ 1 [** [n 1 u] 2]] u] 1] [n 1 u]]
and one can inspect the value in debugger using all the possible
-methods.
+methods.
Something is is still amiss: consider the loop variable $cnt of the
script. It was a number, not an object. We cannot make this value of
@@ -1127,9 +1160,9 @@ slightly modified str()):
} else {
"[$meth $a]";
}
- }
- my %subr = ( n => sub {$_[0]},
- sqrt => sub {sqrt $_[0]},
+ }
+ my %subr = ( n => sub {$_[0]},
+ sqrt => sub {sqrt $_[0]},
'-' => sub {shift() - shift()},
'+' => sub {shift() + shift()},
'/' => sub {shift() / shift()},
@@ -1138,7 +1171,7 @@ slightly modified str()):
);
sub num {
my ($meth, $a, $b) = @{+shift};
- my $subr = $subr{$meth}
+ my $subr = $subr{$meth}
or die "Do not know how to ($meth) in symbolic";
$a = $a->num if ref $a eq __PACKAGE__;
$b = $b->num if ref $b eq __PACKAGE__;
@@ -1176,7 +1209,7 @@ mutator methods (C<++>, C<-=> and so on), does not do deep copying
(not required without mutators!), and implements only those arithmetic
operations which are used in the example.
-To implement most arithmetic operations is easy, one should just use
+To implement most arithmetic operations is easy; one should just use
the tables of operations, and change the code which fills %subr to
my %subr = ( 'n' => sub {$_[0]} );
@@ -1198,7 +1231,7 @@ special to make C<+=> and friends work, except filling C<+=> entry of
way to know that the implementation of C<'+='> does not mutate
the argument, compare L<Copy Constructor>).
-To implement a copy constructor, add C<'=' => \&cpy> to C<use overload>
+To implement a copy constructor, add C<< '=' => \&cpy >> to C<use overload>
line, and code (this code assumes that mutators change things one level
deep only, so recursive copying is not needed):
@@ -1207,7 +1240,7 @@ deep only, so recursive copying is not needed):
bless [@$self], ref $self;
}
-To make C<++> and C<--> work, we need to implement actual mutators,
+To make C<++> and C<--> work, we need to implement actual mutators,
either directly, or in C<nomethod>. We continue to do things inside
C<nomethod>, thus add
@@ -1216,7 +1249,7 @@ C<nomethod>, thus add
return $obj;
}
-after the first line of wrap(). This is not a most effective
+after the first line of wrap(). This is not a most effective
implementation, one may consider
sub inc { $_[0] = bless ['++', shift, 1]; }
@@ -1239,8 +1272,8 @@ As a final remark, note that one can fill %subr by
$subr{'++'} = $subr{'+'};
$subr{'--'} = $subr{'-'};
-This finishes implementation of a primitive symbolic calculator in
-50 lines of Perl code. Since the numeric values of subexpressions
+This finishes implementation of a primitive symbolic calculator in
+50 lines of Perl code. Since the numeric values of subexpressions
are not cached, the calculator is very slow.
Here is the answer for the exercise: In the case of str(), we need no
@@ -1266,9 +1299,9 @@ until the value is I<used>.
To see it in action, add a method
- sub STORE {
- my $obj = shift;
- $#$obj = 1;
+ sub STORE {
+ my $obj = shift;
+ $#$obj = 1;
@$obj->[0,1] = ('=', shift);
}
@@ -1337,6 +1370,27 @@ key (in fact a presence of this method shows that this package has
overloading enabled, and it is what is used by the C<Overloaded>
function of module C<overload>).
+The module might issue the following warnings:
+
+=over 4
+
+=item Odd number of arguments for overload::constant
+
+(W) The call to overload::constant contained an odd number of arguments.
+The arguments should come in pairs.
+
+=item `%s' is not an overloadable type
+
+(W) You tried to overload a constant type the overload package is unaware of.
+
+=item `%s' is not a code reference
+
+(W) The second (fourth, sixth, ...) argument of overload::constant needs
+to be a code reference. Either an anonymous subroutine, or a reference
+to a subroutine.
+
+=back
+
=head1 BUGS
Because it is used for overloading, the per-package hash %OVERLOAD now
@@ -1348,12 +1402,12 @@ C<fallback> is present (possibly undefined). This may create
interesting effects if some package is not overloaded, but inherits
from two overloaded packages.
-Relation between overloading and tie()ing is broken. Overloading is
+Relation between overloading and tie()ing is broken. Overloading is
triggered or not basing on the I<previous> class of tie()d value.
-This happens because the presence of overloading is checked too early,
+This happens because the presence of overloading is checked too early,
before any tie()d access is attempted. If the FETCH()ed class of the
-tie()d value does not change, a simple workaround is to access the value
+tie()d value does not change, a simple workaround is to access the value
immediately after tie()ing, so that after this call the I<previous> class
coincides with the current one.
diff --git a/contrib/perl5/lib/perl5db.pl b/contrib/perl5/lib/perl5db.pl
index 132e08e..63b4381 100644
--- a/contrib/perl5/lib/perl5db.pl
+++ b/contrib/perl5/lib/perl5db.pl
@@ -25,7 +25,7 @@ $header = "perl5db.pl version $VERSION";
# if caller() is called from the package DB, it provides some
# additional data.
#
-# The array @{$main::{'_<'.$filename} is the line-by-line contents of
+# The array @{$main::{'_<'.$filename}} is the line-by-line contents of
# $filename.
#
# The hash %{'_<'.$filename} contains breakpoints and action (it is
@@ -34,7 +34,7 @@ $header = "perl5db.pl version $VERSION";
# interpreter, though the values used by perl5db.pl have the form
# "$break_condition\0$action". Values are magical in numeric context.
#
-# The scalar ${'_<'.$filename} contains "_<$filename".
+# The scalar ${'_<'.$filename} contains $filename.
#
# Note that no subroutine call is possible until &DB::sub is defined
# (for subroutines defined outside of the package DB). In fact the same is
@@ -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";
}
@@ -426,7 +432,7 @@ if ($notty) {
PeerAddr => $remoteport,
Proto => 'tcp',
);
- if (!$OUT) { die "Could not create socket to connect to remote host."; }
+ if (!$OUT) { die "Unable to connect to remote host: $remoteport\n"; }
$IN = $OUT;
}
else {
@@ -617,7 +623,7 @@ EOP
next CMD;
}
}
- $cmd =~ /^q$/ && ($exiting = 1) && exit 0;
+ $cmd =~ /^q$/ && ($fall_off_end = 1) && exit $?;
$cmd =~ /^h$/ && do {
print_help($help);
next CMD; };
@@ -899,9 +905,9 @@ EOP
print $OUT "Will stop on load of `@{[join '\', `', sort keys %break_on_load]}'.\n";
next CMD; };
$cmd =~ /^b\b\s*(postpone|compile)\b\s*([':A-Za-z_][':\w]*)\s*(.*)/ && do {
- my $cond = $3 || '1';
+ my $cond = length $3 ? $3 : '1';
my ($subname, $break) = ($2, $1 eq 'postpone');
- $subname =~ s/\'/::/;
+ $subname =~ s/\'/::/g;
$subname = "${'package'}::" . $subname
unless $subname =~ /::/;
$subname = "main".$subname if substr($subname,0,2) eq "::";
@@ -910,8 +916,8 @@ EOP
next CMD; };
$cmd =~ /^b\b\s*([':A-Za-z_][':\w]*(?:\[.*\])?)\s*(.*)/ && do {
$subname = $1;
- $cond = $2 || '1';
- $subname =~ s/\'/::/;
+ $cond = length $2 ? $2 : '1';
+ $subname =~ s/\'/::/g;
$subname = "${'package'}::" . $subname
unless $subname =~ /::/;
$subname = "main".$subname if substr($subname,0,2) eq "::";
@@ -931,7 +937,7 @@ EOP
next CMD; };
$cmd =~ /^b\b\s*(\d*)\s*(.*)/ && do {
$i = $1 || $line;
- $cond = $2 || '1';
+ $cond = length $2 ? $2 : '1';
if ($dbline[$i] == 0) {
print $OUT "Line $i not breakable.\n";
} else {
@@ -941,8 +947,12 @@ EOP
next CMD; };
$cmd =~ /^d\b\s*(\d*)/ && do {
$i = $1 || $line;
- $dbline{$i} =~ s/^[^\0]*//;
- delete $dbline{$i} if $dbline{$i} eq '';
+ if ($dbline[$i] == 0) {
+ print $OUT "Line $i not breakable.\n";
+ } else {
+ $dbline{$i} =~ s/^[^\0]*//;
+ delete $dbline{$i} if $dbline{$i} eq '';
+ }
next CMD; };
$cmd =~ /^A$/ && do {
print $OUT "Deleting all actions...\n";
@@ -980,18 +990,18 @@ EOP
next CMD; };
$cmd =~ /^<\s*(.*)/ && do {
unless ($1) {
- print OUT "All < actions cleared.\n";
+ print $OUT "All < actions cleared.\n";
$pre = [];
next CMD;
}
if ($1 eq '?') {
unless (@$pre) {
- print OUT "No pre-prompt Perl actions.\n";
+ print $OUT "No pre-prompt Perl actions.\n";
next CMD;
}
- print OUT "Perl commands run before each prompt:\n";
+ print $OUT "Perl commands run before each prompt:\n";
for my $action ( @$pre ) {
- print "\t< -- $action\n";
+ print $OUT "\t< -- $action\n";
}
next CMD;
}
@@ -999,18 +1009,18 @@ EOP
next CMD; };
$cmd =~ /^>\s*(.*)/ && do {
unless ($1) {
- print OUT "All > actions cleared.\n";
+ print $OUT "All > actions cleared.\n";
$post = [];
next CMD;
}
if ($1 eq '?') {
unless (@$post) {
- print OUT "No post-prompt Perl actions.\n";
+ print $OUT "No post-prompt Perl actions.\n";
next CMD;
}
- print OUT "Perl commands run after each prompt:\n";
+ print $OUT "Perl commands run after each prompt:\n";
for my $action ( @$post ) {
- print "\t> -- $action\n";
+ print $OUT "\t> -- $action\n";
}
next CMD;
}
@@ -1018,7 +1028,7 @@ EOP
next CMD; };
$cmd =~ /^\{\{\s*(.*)/ && do {
if ($cmd =~ /^\{.*\}$/ && unbalanced(substr($cmd,2))) {
- print OUT "{{ is now a debugger command\n",
+ print $OUT "{{ is now a debugger command\n",
"use `;{{' if you mean Perl code\n";
$cmd = "h {{";
redo CMD;
@@ -1027,23 +1037,23 @@ EOP
next CMD; };
$cmd =~ /^\{\s*(.*)/ && do {
unless ($1) {
- print OUT "All { actions cleared.\n";
+ print $OUT "All { actions cleared.\n";
$pretype = [];
next CMD;
}
if ($1 eq '?') {
unless (@$pretype) {
- print OUT "No pre-prompt debugger actions.\n";
+ print $OUT "No pre-prompt debugger actions.\n";
next CMD;
}
- print OUT "Debugger commands run before each prompt:\n";
+ print $OUT "Debugger commands run before each prompt:\n";
for my $action ( @$pretype ) {
- print "\t{ -- $action\n";
+ print $OUT "\t{ -- $action\n";
}
next CMD;
}
if ($cmd =~ /^\{.*\}$/ && unbalanced(substr($cmd,1))) {
- print OUT "{ is now a debugger command\n",
+ print $OUT "{ is now a debugger command\n",
"use `;{' if you mean Perl code\n";
$cmd = "h {";
redo CMD;
@@ -1426,7 +1436,7 @@ EOP
$piped= "";
}
} # CMD:
- $exiting = 1 unless defined $cmd;
+ $fall_off_end = 1 unless defined $cmd; # Emulate `q' on EOF
foreach $evalarg (@$post) {
&eval;
}
@@ -1507,6 +1517,7 @@ sub eval {
local $otrace = $trace;
local $osingle = $single;
local $od = $^D;
+ { ($evalarg) = $evalarg =~ /(.*)/s; }
@res = eval "$usercontext $evalarg;\n"; # '\n' for nice recursive debug
$trace = $otrace;
$single = $osingle;
@@ -1698,8 +1709,6 @@ sub unbalanced {
}
sub gets {
- local($.);
- #<IN>;
&readline("cont: ");
}
@@ -1804,6 +1813,7 @@ EOP
}
sub readline {
+ local $.;
if (@typeahead) {
my $left = @typeahead;
my $got = shift @typeahead;
@@ -1815,7 +1825,7 @@ sub readline {
local $frame = 0;
local $doret = -2;
if (ref $OUT and UNIVERSAL::isa($OUT, 'IO::Socket::INET')) {
- print $OUT @_;
+ $OUT->write(join('', @_));
my $stuff;
$IN->recv( $stuff, 2048 ); # XXX: what's wrong with sysread?
$stuff;
@@ -2161,8 +2171,8 @@ B<W> Delete all watch-expressions.
B<V> [I<pkg> [I<vars>]] List some (default all) variables in package (default current).
Use B<~>I<pattern> and B<!>I<pattern> for positive and negative regexps.
B<X> [I<vars>] Same as \"B<V> I<currentpackage> [I<vars>]\".
-B<x> I<expr> Evals expression in array context, dumps the result.
-B<m> I<expr> Evals expression in array context, prints methods callable
+B<x> I<expr> Evals expression in list context, dumps the result.
+B<m> I<expr> Evals expression in list context, prints methods callable
on the first element of the result.
B<m> I<class> Prints methods callable via the given class.
@@ -2257,7 +2267,7 @@ I<Debugger controls:> B<L> List break/watch/act
B<|>[B<|>]I<db_cmd> Send output to pager B<$psh>\[B<$psh>\] I<syscmd> Run cmd in a subprocess
B<q> or B<^D> Quit B<R> Attempt a restart
I<Data Examination:> B<expr> Execute perl code, also see: B<s>,B<n>,B<t> I<expr>
- B<x>|B<m> I<expr> Evals expr in array context, dumps the result or lists methods.
+ B<x>|B<m> I<expr> Evals expr in list context, dumps the result or lists methods.
B<p> I<expr> Print expression (uses script's current package).
B<S> [[B<!>]I<pat>] List subroutine names [not] matching pattern
B<V> [I<Pk> [I<Vars>]] List Variables in Package. Vars can be ~pattern or !pattern.
@@ -2680,10 +2690,11 @@ sub end_report {
}
END {
- $finished = $inhibit_exit; # So that some keys may be disabled.
+ $finished = 1 if $inhibit_exit; # So that some keys may be disabled.
+ $fall_off_end = 1 unless $inhibit_exit;
# Do not stop in at_exit() and destructors on exit:
- $DB::single = !$exiting && !$runnonstop;
- DB::fake::at_exit() unless $exiting or $runnonstop;
+ $DB::single = !$fall_off_end && !$runnonstop;
+ DB::fake::at_exit() unless $fall_off_end or $runnonstop;
}
package DB::fake;
diff --git a/contrib/perl5/lib/strict.pm b/contrib/perl5/lib/strict.pm
index 042227f..8afb9a3 100644
--- a/contrib/perl5/lib/strict.pm
+++ b/contrib/perl5/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/contrib/perl5/lib/syslog.pl b/contrib/perl5/lib/syslog.pl
index 70c439b..f0dbb1c 100644
--- a/contrib/perl5/lib/syslog.pl
+++ b/contrib/perl5/lib/syslog.pl
@@ -34,7 +34,7 @@ use warnings::register;
$host = 'localhost' unless $host; # set $syslog'host to change
if ($] >= 5 && warnings::enabled()) {
- warnings::warn "You should 'use Sys::Syslog' instead; continuing";
+ warnings::warn("You should 'use Sys::Syslog' instead; continuing");
}
require 'syslog.ph';
diff --git a/contrib/perl5/lib/termcap.pl b/contrib/perl5/lib/termcap.pl
index 06da956..f295a2d 100644
--- a/contrib/perl5/lib/termcap.pl
+++ b/contrib/perl5/lib/termcap.pl
@@ -22,7 +22,7 @@ sub Tgetent {
local($TERM) = @_;
local($TERMCAP,$_,$entry,$loop,$field);
- warn "Tgetent: no ospeed set" unless $ospeed;
+ # warn "Tgetent: no ospeed set" unless $ospeed;
foreach $key (keys %TC) {
delete $TC{$key};
}
diff --git a/contrib/perl5/lib/unicode/ArabLink.pl b/contrib/perl5/lib/unicode/ArabLink.pl
index fd5ed8a..2ad1871 100644
--- a/contrib/perl5/lib/unicode/ArabLink.pl
+++ b/contrib/perl5/lib/unicode/ArabLink.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0622 0625 R
@@ -12,10 +12,9 @@ return <<'END';
0633 063a D
0640 C
0641 0647 D
-0648 0649 R
-064a D
-0671 U
-0672 0673 R
+0648 R
+0649 064a D
+0671 0673 R
0674 U
0675 0677 R
0678 0687 D
diff --git a/contrib/perl5/lib/unicode/ArabLnkGrp.pl b/contrib/perl5/lib/unicode/ArabLnkGrp.pl
index 61f30d4..1581a04 100644
--- a/contrib/perl5/lib/unicode/ArabLnkGrp.pl
+++ b/contrib/perl5/lib/unicode/ArabLnkGrp.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0622 0623 ALEF
@@ -27,8 +27,7 @@ return <<'END';
0647 HEH
0648 WAW
0649 064a YEH
-0671 <no shaping>
-0672 0673 ALEF
+0671 0673 ALEF
0674 <no shaping>
0675 ALEF
0676 0677 WAW
diff --git a/contrib/perl5/lib/unicode/ArabShap.txt b/contrib/perl5/lib/unicode/ArabShap.txt
index 6092d62..9b60290 100644
--- a/contrib/perl5/lib/unicode/ArabShap.txt
+++ b/contrib/perl5/lib/unicode/ArabShap.txt
@@ -1,5 +1,32 @@
-# Unicode; Schematic Name; Link; Link Group
+# ArabicShaping-3.txt
+#
+# This file is a normative contributory data file in the
+# Unicode Character Database.
+#
+# This file defines the shaping classes for Arabic and Syriac
+# positional shaping, repeating in machine readable form the
+# information printed in Tables 8-6, 8-7, 8-8, 8-10, 8-11, and
+# 8-13 of The Unicode Standard, Version 3.0.
+#
+# See sections 8.2 and 8.3 of The Unicode Standard, Version 3.0
+# for more information.
+#
+# Each line contains four fields, separated by a semicolon.
+#
+# The first field gives the code point, in 4-digit hexadecimal
+# form, of an Arabic or Syriac character.
+# The second field gives a short schematic name for that character,
+# abbreviated from the normative Unicode character name.
+# The third field defines the joining type: R right-joining,
+# D dual-joining, U non-joining
+# The fourth field defines the joining group.
+#
+# #############################################################
+
+# Unicode; Schematic Name; Joining Type; Joining Group
+
# Arabic characters
+
0622; MADDA ON ALEF; R; ALEF
0623; HAMZA ON ALEF; R; ALEF
0624; HAMZA ON WAW; R; WAW
@@ -34,9 +61,9 @@
0646; NOON; D; NOON
0647; HEH; D; HEH
0648; WAW; R; WAW
-0649; ALEF MAKSURA; R; YEH
+0649; ALEF MAKSURA; D; YEH
064A; YEH; D; YEH
-0671; HAMZAT WASL ON ALEF; U; <no shaping>
+0671; HAMZAT WASL ON ALEF; R; ALEF
0672; WAVY HAMZA ON ALEF; R; ALEF
0673; WAVY HAMZA UNDER ALEF; R; ALEF
0674; HIGH HAMZA; U; <no shaping>
@@ -139,7 +166,9 @@
06FA; SEEN WITH DOT BELOW AND 3 DOTS ABOVE; D; SEEN
06FB; DAD WITH DOT BELOW; D; SAD
06FC; GHAIN WITH DOT BELOW; D; AIN
+
# Syriac characters
+
0710; ALAPH; R; ALAPH
0712; BETH; D; BETH
0713; GAMAL; D; GAMAL
diff --git a/contrib/perl5/lib/unicode/Bidirectional.pl b/contrib/perl5/lib/unicode/Bidirectional.pl
index 73898b8..3cc2d0a 100644
--- a/contrib/perl5/lib/unicode/Bidirectional.pl
+++ b/contrib/perl5/lib/unicode/Bidirectional.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0000 0008 BN
@@ -635,4 +635,6 @@ ffe5 ffe6 ET
ffe8 ffee ON
fff9 fffb BN
fffc fffd ON
+f0000 ffffd L
+100000 10fffd L
END
diff --git a/contrib/perl5/lib/unicode/Block.pl b/contrib/perl5/lib/unicode/Block.pl
index ee680b7..2b5bfce 100644
--- a/contrib/perl5/lib/unicode/Block.pl
+++ b/contrib/perl5/lib/unicode/Block.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0000 007F Basic Latin
diff --git a/contrib/perl5/lib/unicode/Category.pl b/contrib/perl5/lib/unicode/Category.pl
index bffd116..9c81514 100644
--- a/contrib/perl5/lib/unicode/Category.pl
+++ b/contrib/perl5/lib/unicode/Category.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0000 001f Cc
@@ -1503,4 +1503,6 @@ ffe9 ffec Sm
ffed ffee So
fff9 fffb Cf
fffc fffd So
+f0000 ffffd Co
+100000 10fffd Co
END
diff --git a/contrib/perl5/lib/unicode/CombiningClass.pl b/contrib/perl5/lib/unicode/CombiningClass.pl
index a409498..628b9c6 100644
--- a/contrib/perl5/lib/unicode/CombiningClass.pl
+++ b/contrib/perl5/lib/unicode/CombiningClass.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0300 0314 230
diff --git a/contrib/perl5/lib/unicode/CompExcl.txt b/contrib/perl5/lib/unicode/CompExcl.txt
index 5ea46af..53f8467 100644
--- a/contrib/perl5/lib/unicode/CompExcl.txt
+++ b/contrib/perl5/lib/unicode/CompExcl.txt
@@ -1,3 +1,5 @@
+# CompositionExclusions-2.txt
+#
# Composition Exclusions
# This file lists the characters from the UTR #15 Composition Exclusion Table.
#
@@ -133,8 +135,8 @@ FB4E # HEBREW LETTER PE WITH RAFE
# (4) Non-Starter Decompositions
# These characters can be derived from the UnicodeData file
# by including all characters whose canonical decomposition consists
-# of a sequence of characters, the first of which has a canonical
-# class of zero.
+# of a sequence of characters, the first of which has a non-zero
+# combining class.
# These characters are simply quoted here for reference.
# 0344 COMBINING GREEK DIALYTIKA TONOS
diff --git a/contrib/perl5/lib/unicode/Decomposition.pl b/contrib/perl5/lib/unicode/Decomposition.pl
index ecc30b2..1fe29cd 100644
--- a/contrib/perl5/lib/unicode/Decomposition.pl
+++ b/contrib/perl5/lib/unicode/Decomposition.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
00a0 <noBreak> 0020
diff --git a/contrib/perl5/lib/unicode/In/AlphabeticPresentationForms.pl b/contrib/perl5/lib/unicode/In/AlphabeticPresentationForms.pl
index c42e944..a85b9ca 100644
--- a/contrib/perl5/lib/unicode/In/AlphabeticPresentationForms.pl
+++ b/contrib/perl5/lib/unicode/In/AlphabeticPresentationForms.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
FB00 FB4F
diff --git a/contrib/perl5/lib/unicode/In/Arabic.pl b/contrib/perl5/lib/unicode/In/Arabic.pl
index 5010ab7..5fbbbfa 100644
--- a/contrib/perl5/lib/unicode/In/Arabic.pl
+++ b/contrib/perl5/lib/unicode/In/Arabic.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0600 06FF
diff --git a/contrib/perl5/lib/unicode/In/ArabicPresentationForms-A.pl b/contrib/perl5/lib/unicode/In/ArabicPresentationForms-A.pl
index 6edd74d..62521bb 100644
--- a/contrib/perl5/lib/unicode/In/ArabicPresentationForms-A.pl
+++ b/contrib/perl5/lib/unicode/In/ArabicPresentationForms-A.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
FB50 FDFF
diff --git a/contrib/perl5/lib/unicode/In/ArabicPresentationForms-B.pl b/contrib/perl5/lib/unicode/In/ArabicPresentationForms-B.pl
index 9640739..6b2d447 100644
--- a/contrib/perl5/lib/unicode/In/ArabicPresentationForms-B.pl
+++ b/contrib/perl5/lib/unicode/In/ArabicPresentationForms-B.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
FE70 FEFE
diff --git a/contrib/perl5/lib/unicode/In/Armenian.pl b/contrib/perl5/lib/unicode/In/Armenian.pl
index 19b74ac..d4736a7 100644
--- a/contrib/perl5/lib/unicode/In/Armenian.pl
+++ b/contrib/perl5/lib/unicode/In/Armenian.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0530 058F
diff --git a/contrib/perl5/lib/unicode/In/Arrows.pl b/contrib/perl5/lib/unicode/In/Arrows.pl
index 7ce4418..a7ef468 100644
--- a/contrib/perl5/lib/unicode/In/Arrows.pl
+++ b/contrib/perl5/lib/unicode/In/Arrows.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2190 21FF
diff --git a/contrib/perl5/lib/unicode/In/BasicLatin.pl b/contrib/perl5/lib/unicode/In/BasicLatin.pl
index 39987f1..36d6456 100644
--- a/contrib/perl5/lib/unicode/In/BasicLatin.pl
+++ b/contrib/perl5/lib/unicode/In/BasicLatin.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0000 007F
diff --git a/contrib/perl5/lib/unicode/In/Bengali.pl b/contrib/perl5/lib/unicode/In/Bengali.pl
index c0a47d3..07dc6ac 100644
--- a/contrib/perl5/lib/unicode/In/Bengali.pl
+++ b/contrib/perl5/lib/unicode/In/Bengali.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0980 09FF
diff --git a/contrib/perl5/lib/unicode/In/BlockElements.pl b/contrib/perl5/lib/unicode/In/BlockElements.pl
index e96e64f..495629b 100644
--- a/contrib/perl5/lib/unicode/In/BlockElements.pl
+++ b/contrib/perl5/lib/unicode/In/BlockElements.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2580 259F
diff --git a/contrib/perl5/lib/unicode/In/Bopomofo.pl b/contrib/perl5/lib/unicode/In/Bopomofo.pl
index 5535606..3dbf73a 100644
--- a/contrib/perl5/lib/unicode/In/Bopomofo.pl
+++ b/contrib/perl5/lib/unicode/In/Bopomofo.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
3100 312F
diff --git a/contrib/perl5/lib/unicode/In/BopomofoExtended.pl b/contrib/perl5/lib/unicode/In/BopomofoExtended.pl
index d0ee43a..f2ca6de 100644
--- a/contrib/perl5/lib/unicode/In/BopomofoExtended.pl
+++ b/contrib/perl5/lib/unicode/In/BopomofoExtended.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
31A0 31BF
diff --git a/contrib/perl5/lib/unicode/In/BoxDrawing.pl b/contrib/perl5/lib/unicode/In/BoxDrawing.pl
index d580199..a3cd897 100644
--- a/contrib/perl5/lib/unicode/In/BoxDrawing.pl
+++ b/contrib/perl5/lib/unicode/In/BoxDrawing.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2500 257F
diff --git a/contrib/perl5/lib/unicode/In/BraillePatterns.pl b/contrib/perl5/lib/unicode/In/BraillePatterns.pl
index e5c9e4c..58afc05 100644
--- a/contrib/perl5/lib/unicode/In/BraillePatterns.pl
+++ b/contrib/perl5/lib/unicode/In/BraillePatterns.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2800 28FF
diff --git a/contrib/perl5/lib/unicode/In/CJKCompatibility.pl b/contrib/perl5/lib/unicode/In/CJKCompatibility.pl
index 07ab8ed..793520f 100644
--- a/contrib/perl5/lib/unicode/In/CJKCompatibility.pl
+++ b/contrib/perl5/lib/unicode/In/CJKCompatibility.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
3300 33FF
diff --git a/contrib/perl5/lib/unicode/In/CJKCompatibilityForms.pl b/contrib/perl5/lib/unicode/In/CJKCompatibilityForms.pl
index 122ccd7..a9ba270 100644
--- a/contrib/perl5/lib/unicode/In/CJKCompatibilityForms.pl
+++ b/contrib/perl5/lib/unicode/In/CJKCompatibilityForms.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
FE30 FE4F
diff --git a/contrib/perl5/lib/unicode/In/CJKCompatibilityIdeographs.pl b/contrib/perl5/lib/unicode/In/CJKCompatibilityIdeographs.pl
index 59c8e5d..d841bc5 100644
--- a/contrib/perl5/lib/unicode/In/CJKCompatibilityIdeographs.pl
+++ b/contrib/perl5/lib/unicode/In/CJKCompatibilityIdeographs.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
F900 FAFF
diff --git a/contrib/perl5/lib/unicode/In/CJKRadicalsSupplement.pl b/contrib/perl5/lib/unicode/In/CJKRadicalsSupplement.pl
index d4c0c82..2d13707 100644
--- a/contrib/perl5/lib/unicode/In/CJKRadicalsSupplement.pl
+++ b/contrib/perl5/lib/unicode/In/CJKRadicalsSupplement.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2E80 2EFF
diff --git a/contrib/perl5/lib/unicode/In/CJKSymbolsandPunctuation.pl b/contrib/perl5/lib/unicode/In/CJKSymbolsandPunctuation.pl
index 24ecc37..ca525ae 100644
--- a/contrib/perl5/lib/unicode/In/CJKSymbolsandPunctuation.pl
+++ b/contrib/perl5/lib/unicode/In/CJKSymbolsandPunctuation.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
3000 303F
diff --git a/contrib/perl5/lib/unicode/In/CJKUnifiedIdeographs.pl b/contrib/perl5/lib/unicode/In/CJKUnifiedIdeographs.pl
index 351cf74..729f4c6 100644
--- a/contrib/perl5/lib/unicode/In/CJKUnifiedIdeographs.pl
+++ b/contrib/perl5/lib/unicode/In/CJKUnifiedIdeographs.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
4E00 9FFF
diff --git a/contrib/perl5/lib/unicode/In/CJKUnifiedIdeographsExtensionA.pl b/contrib/perl5/lib/unicode/In/CJKUnifiedIdeographsExtensionA.pl
index 012f54c..e92f091 100644
--- a/contrib/perl5/lib/unicode/In/CJKUnifiedIdeographsExtensionA.pl
+++ b/contrib/perl5/lib/unicode/In/CJKUnifiedIdeographsExtensionA.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
3400 4DB5
diff --git a/contrib/perl5/lib/unicode/In/Cherokee.pl b/contrib/perl5/lib/unicode/In/Cherokee.pl
index 10cae1a..1e9ad74 100644
--- a/contrib/perl5/lib/unicode/In/Cherokee.pl
+++ b/contrib/perl5/lib/unicode/In/Cherokee.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
13A0 13FF
diff --git a/contrib/perl5/lib/unicode/In/CombiningDiacriticalMarks.pl b/contrib/perl5/lib/unicode/In/CombiningDiacriticalMarks.pl
index a32f974..d3a45d4 100644
--- a/contrib/perl5/lib/unicode/In/CombiningDiacriticalMarks.pl
+++ b/contrib/perl5/lib/unicode/In/CombiningDiacriticalMarks.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0300 036F
diff --git a/contrib/perl5/lib/unicode/In/CombiningHalfMarks.pl b/contrib/perl5/lib/unicode/In/CombiningHalfMarks.pl
index 100471b..4f0a573 100644
--- a/contrib/perl5/lib/unicode/In/CombiningHalfMarks.pl
+++ b/contrib/perl5/lib/unicode/In/CombiningHalfMarks.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
FE20 FE2F
diff --git a/contrib/perl5/lib/unicode/In/CombiningMarksforSymbols.pl b/contrib/perl5/lib/unicode/In/CombiningMarksforSymbols.pl
index f45e7e0..9dde706 100644
--- a/contrib/perl5/lib/unicode/In/CombiningMarksforSymbols.pl
+++ b/contrib/perl5/lib/unicode/In/CombiningMarksforSymbols.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
20D0 20FF
diff --git a/contrib/perl5/lib/unicode/In/ControlPictures.pl b/contrib/perl5/lib/unicode/In/ControlPictures.pl
index 77a759f..78113e8 100644
--- a/contrib/perl5/lib/unicode/In/ControlPictures.pl
+++ b/contrib/perl5/lib/unicode/In/ControlPictures.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2400 243F
diff --git a/contrib/perl5/lib/unicode/In/CurrencySymbols.pl b/contrib/perl5/lib/unicode/In/CurrencySymbols.pl
index 567ae97..8cbc160 100644
--- a/contrib/perl5/lib/unicode/In/CurrencySymbols.pl
+++ b/contrib/perl5/lib/unicode/In/CurrencySymbols.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
20A0 20CF
diff --git a/contrib/perl5/lib/unicode/In/Cyrillic.pl b/contrib/perl5/lib/unicode/In/Cyrillic.pl
index 9ca104c..f057731 100644
--- a/contrib/perl5/lib/unicode/In/Cyrillic.pl
+++ b/contrib/perl5/lib/unicode/In/Cyrillic.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0400 04FF
diff --git a/contrib/perl5/lib/unicode/In/Devanagari.pl b/contrib/perl5/lib/unicode/In/Devanagari.pl
index 61372b5..c99eff1 100644
--- a/contrib/perl5/lib/unicode/In/Devanagari.pl
+++ b/contrib/perl5/lib/unicode/In/Devanagari.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0900 097F
diff --git a/contrib/perl5/lib/unicode/In/Dingbats.pl b/contrib/perl5/lib/unicode/In/Dingbats.pl
index 0f820ca..1bbb102 100644
--- a/contrib/perl5/lib/unicode/In/Dingbats.pl
+++ b/contrib/perl5/lib/unicode/In/Dingbats.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2700 27BF
diff --git a/contrib/perl5/lib/unicode/In/EnclosedAlphanumerics.pl b/contrib/perl5/lib/unicode/In/EnclosedAlphanumerics.pl
index de52aa8..46b4cf5 100644
--- a/contrib/perl5/lib/unicode/In/EnclosedAlphanumerics.pl
+++ b/contrib/perl5/lib/unicode/In/EnclosedAlphanumerics.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2460 24FF
diff --git a/contrib/perl5/lib/unicode/In/EnclosedCJKLettersandMonths.pl b/contrib/perl5/lib/unicode/In/EnclosedCJKLettersandMonths.pl
index e4de0e0..da5a7a1 100644
--- a/contrib/perl5/lib/unicode/In/EnclosedCJKLettersandMonths.pl
+++ b/contrib/perl5/lib/unicode/In/EnclosedCJKLettersandMonths.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
3200 32FF
diff --git a/contrib/perl5/lib/unicode/In/Ethiopic.pl b/contrib/perl5/lib/unicode/In/Ethiopic.pl
index 13c3090..5b472c4 100644
--- a/contrib/perl5/lib/unicode/In/Ethiopic.pl
+++ b/contrib/perl5/lib/unicode/In/Ethiopic.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
1200 137F
diff --git a/contrib/perl5/lib/unicode/In/GeneralPunctuation.pl b/contrib/perl5/lib/unicode/In/GeneralPunctuation.pl
index 81c7699..aa82c30 100644
--- a/contrib/perl5/lib/unicode/In/GeneralPunctuation.pl
+++ b/contrib/perl5/lib/unicode/In/GeneralPunctuation.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2000 206F
diff --git a/contrib/perl5/lib/unicode/In/GeometricShapes.pl b/contrib/perl5/lib/unicode/In/GeometricShapes.pl
index 170422d..6cf8ea7 100644
--- a/contrib/perl5/lib/unicode/In/GeometricShapes.pl
+++ b/contrib/perl5/lib/unicode/In/GeometricShapes.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
25A0 25FF
diff --git a/contrib/perl5/lib/unicode/In/Georgian.pl b/contrib/perl5/lib/unicode/In/Georgian.pl
index 773ed156..493f570 100644
--- a/contrib/perl5/lib/unicode/In/Georgian.pl
+++ b/contrib/perl5/lib/unicode/In/Georgian.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
10A0 10FF
diff --git a/contrib/perl5/lib/unicode/In/Greek.pl b/contrib/perl5/lib/unicode/In/Greek.pl
index ff753d1..ac4bbee 100644
--- a/contrib/perl5/lib/unicode/In/Greek.pl
+++ b/contrib/perl5/lib/unicode/In/Greek.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0370 03FF
diff --git a/contrib/perl5/lib/unicode/In/GreekExtended.pl b/contrib/perl5/lib/unicode/In/GreekExtended.pl
index b8f02e7..acd43be 100644
--- a/contrib/perl5/lib/unicode/In/GreekExtended.pl
+++ b/contrib/perl5/lib/unicode/In/GreekExtended.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
1F00 1FFF
diff --git a/contrib/perl5/lib/unicode/In/Gujarati.pl b/contrib/perl5/lib/unicode/In/Gujarati.pl
index ff6c650..0e3c8e9 100644
--- a/contrib/perl5/lib/unicode/In/Gujarati.pl
+++ b/contrib/perl5/lib/unicode/In/Gujarati.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0A80 0AFF
diff --git a/contrib/perl5/lib/unicode/In/Gurmukhi.pl b/contrib/perl5/lib/unicode/In/Gurmukhi.pl
index b888df6..32ff239 100644
--- a/contrib/perl5/lib/unicode/In/Gurmukhi.pl
+++ b/contrib/perl5/lib/unicode/In/Gurmukhi.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0A00 0A7F
diff --git a/contrib/perl5/lib/unicode/In/HalfwidthandFullwidthForms.pl b/contrib/perl5/lib/unicode/In/HalfwidthandFullwidthForms.pl
index e452653..fd3ba32 100644
--- a/contrib/perl5/lib/unicode/In/HalfwidthandFullwidthForms.pl
+++ b/contrib/perl5/lib/unicode/In/HalfwidthandFullwidthForms.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
FF00 FFEF
diff --git a/contrib/perl5/lib/unicode/In/HangulCompatibilityJamo.pl b/contrib/perl5/lib/unicode/In/HangulCompatibilityJamo.pl
index c15379f..744e572 100644
--- a/contrib/perl5/lib/unicode/In/HangulCompatibilityJamo.pl
+++ b/contrib/perl5/lib/unicode/In/HangulCompatibilityJamo.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
3130 318F
diff --git a/contrib/perl5/lib/unicode/In/HangulJamo.pl b/contrib/perl5/lib/unicode/In/HangulJamo.pl
index c329b54..a1d1c67 100644
--- a/contrib/perl5/lib/unicode/In/HangulJamo.pl
+++ b/contrib/perl5/lib/unicode/In/HangulJamo.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
1100 11FF
diff --git a/contrib/perl5/lib/unicode/In/HangulSyllables.pl b/contrib/perl5/lib/unicode/In/HangulSyllables.pl
index 7d91a36..80cd4a4 100644
--- a/contrib/perl5/lib/unicode/In/HangulSyllables.pl
+++ b/contrib/perl5/lib/unicode/In/HangulSyllables.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
AC00 D7A3
diff --git a/contrib/perl5/lib/unicode/In/Hebrew.pl b/contrib/perl5/lib/unicode/In/Hebrew.pl
index abe7b9e..2e29a28 100644
--- a/contrib/perl5/lib/unicode/In/Hebrew.pl
+++ b/contrib/perl5/lib/unicode/In/Hebrew.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0590 05FF
diff --git a/contrib/perl5/lib/unicode/In/HighPrivateUseSurrogates.pl b/contrib/perl5/lib/unicode/In/HighPrivateUseSurrogates.pl
index 6ed7ac9..0e1320d 100644
--- a/contrib/perl5/lib/unicode/In/HighPrivateUseSurrogates.pl
+++ b/contrib/perl5/lib/unicode/In/HighPrivateUseSurrogates.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
DB80 DBFF
diff --git a/contrib/perl5/lib/unicode/In/HighSurrogates.pl b/contrib/perl5/lib/unicode/In/HighSurrogates.pl
index 924a0c9..6acc6c4 100644
--- a/contrib/perl5/lib/unicode/In/HighSurrogates.pl
+++ b/contrib/perl5/lib/unicode/In/HighSurrogates.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
D800 DB7F
diff --git a/contrib/perl5/lib/unicode/In/Hiragana.pl b/contrib/perl5/lib/unicode/In/Hiragana.pl
index 7a65302..5905fe9 100644
--- a/contrib/perl5/lib/unicode/In/Hiragana.pl
+++ b/contrib/perl5/lib/unicode/In/Hiragana.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
3040 309F
diff --git a/contrib/perl5/lib/unicode/In/IPAExtensions.pl b/contrib/perl5/lib/unicode/In/IPAExtensions.pl
index 20906d6..5365373 100644
--- a/contrib/perl5/lib/unicode/In/IPAExtensions.pl
+++ b/contrib/perl5/lib/unicode/In/IPAExtensions.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0250 02AF
diff --git a/contrib/perl5/lib/unicode/In/IdeographicDescriptionCharacters.pl b/contrib/perl5/lib/unicode/In/IdeographicDescriptionCharacters.pl
index 4baae88..dafb5b4 100644
--- a/contrib/perl5/lib/unicode/In/IdeographicDescriptionCharacters.pl
+++ b/contrib/perl5/lib/unicode/In/IdeographicDescriptionCharacters.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2FF0 2FFF
diff --git a/contrib/perl5/lib/unicode/In/Kanbun.pl b/contrib/perl5/lib/unicode/In/Kanbun.pl
index 57d6bd2..9ad03a6 100644
--- a/contrib/perl5/lib/unicode/In/Kanbun.pl
+++ b/contrib/perl5/lib/unicode/In/Kanbun.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
3190 319F
diff --git a/contrib/perl5/lib/unicode/In/KangxiRadicals.pl b/contrib/perl5/lib/unicode/In/KangxiRadicals.pl
index d26fd6c..165398c 100644
--- a/contrib/perl5/lib/unicode/In/KangxiRadicals.pl
+++ b/contrib/perl5/lib/unicode/In/KangxiRadicals.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2F00 2FDF
diff --git a/contrib/perl5/lib/unicode/In/Kannada.pl b/contrib/perl5/lib/unicode/In/Kannada.pl
index 109197a..a679445 100644
--- a/contrib/perl5/lib/unicode/In/Kannada.pl
+++ b/contrib/perl5/lib/unicode/In/Kannada.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0C80 0CFF
diff --git a/contrib/perl5/lib/unicode/In/Katakana.pl b/contrib/perl5/lib/unicode/In/Katakana.pl
index 93bd5a0..2976d25 100644
--- a/contrib/perl5/lib/unicode/In/Katakana.pl
+++ b/contrib/perl5/lib/unicode/In/Katakana.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
30A0 30FF
diff --git a/contrib/perl5/lib/unicode/In/Khmer.pl b/contrib/perl5/lib/unicode/In/Khmer.pl
index f3e8685..6a85224 100644
--- a/contrib/perl5/lib/unicode/In/Khmer.pl
+++ b/contrib/perl5/lib/unicode/In/Khmer.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
1780 17FF
diff --git a/contrib/perl5/lib/unicode/In/Lao.pl b/contrib/perl5/lib/unicode/In/Lao.pl
index 41ff11f..fdddd86 100644
--- a/contrib/perl5/lib/unicode/In/Lao.pl
+++ b/contrib/perl5/lib/unicode/In/Lao.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0E80 0EFF
diff --git a/contrib/perl5/lib/unicode/In/Latin-1Supplement.pl b/contrib/perl5/lib/unicode/In/Latin-1Supplement.pl
index 1b252eb..6a901fb 100644
--- a/contrib/perl5/lib/unicode/In/Latin-1Supplement.pl
+++ b/contrib/perl5/lib/unicode/In/Latin-1Supplement.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0080 00FF
diff --git a/contrib/perl5/lib/unicode/In/LatinExtended-A.pl b/contrib/perl5/lib/unicode/In/LatinExtended-A.pl
index b8be987..a042350 100644
--- a/contrib/perl5/lib/unicode/In/LatinExtended-A.pl
+++ b/contrib/perl5/lib/unicode/In/LatinExtended-A.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0100 017F
diff --git a/contrib/perl5/lib/unicode/In/LatinExtended-B.pl b/contrib/perl5/lib/unicode/In/LatinExtended-B.pl
index b9aff43..b7106c6 100644
--- a/contrib/perl5/lib/unicode/In/LatinExtended-B.pl
+++ b/contrib/perl5/lib/unicode/In/LatinExtended-B.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0180 024F
diff --git a/contrib/perl5/lib/unicode/In/LatinExtendedAdditional.pl b/contrib/perl5/lib/unicode/In/LatinExtendedAdditional.pl
index d309e90..e17cc3d 100644
--- a/contrib/perl5/lib/unicode/In/LatinExtendedAdditional.pl
+++ b/contrib/perl5/lib/unicode/In/LatinExtendedAdditional.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
1E00 1EFF
diff --git a/contrib/perl5/lib/unicode/In/LetterlikeSymbols.pl b/contrib/perl5/lib/unicode/In/LetterlikeSymbols.pl
index 1768740..c2249a7 100644
--- a/contrib/perl5/lib/unicode/In/LetterlikeSymbols.pl
+++ b/contrib/perl5/lib/unicode/In/LetterlikeSymbols.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2100 214F
diff --git a/contrib/perl5/lib/unicode/In/LowSurrogates.pl b/contrib/perl5/lib/unicode/In/LowSurrogates.pl
index 752b264..025bd13 100644
--- a/contrib/perl5/lib/unicode/In/LowSurrogates.pl
+++ b/contrib/perl5/lib/unicode/In/LowSurrogates.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
DC00 DFFF
diff --git a/contrib/perl5/lib/unicode/In/Malayalam.pl b/contrib/perl5/lib/unicode/In/Malayalam.pl
index 8fb57cd..5a01d40 100644
--- a/contrib/perl5/lib/unicode/In/Malayalam.pl
+++ b/contrib/perl5/lib/unicode/In/Malayalam.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0D00 0D7F
diff --git a/contrib/perl5/lib/unicode/In/MathematicalOperators.pl b/contrib/perl5/lib/unicode/In/MathematicalOperators.pl
index 055f19e..8b45e18 100644
--- a/contrib/perl5/lib/unicode/In/MathematicalOperators.pl
+++ b/contrib/perl5/lib/unicode/In/MathematicalOperators.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2200 22FF
diff --git a/contrib/perl5/lib/unicode/In/MiscellaneousSymbols.pl b/contrib/perl5/lib/unicode/In/MiscellaneousSymbols.pl
index 9dcdd26..cc5b02f 100644
--- a/contrib/perl5/lib/unicode/In/MiscellaneousSymbols.pl
+++ b/contrib/perl5/lib/unicode/In/MiscellaneousSymbols.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2600 26FF
diff --git a/contrib/perl5/lib/unicode/In/MiscellaneousTechnical.pl b/contrib/perl5/lib/unicode/In/MiscellaneousTechnical.pl
index 370c00f..a1058a0 100644
--- a/contrib/perl5/lib/unicode/In/MiscellaneousTechnical.pl
+++ b/contrib/perl5/lib/unicode/In/MiscellaneousTechnical.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2300 23FF
diff --git a/contrib/perl5/lib/unicode/In/Mongolian.pl b/contrib/perl5/lib/unicode/In/Mongolian.pl
index 394014d..98a4914 100644
--- a/contrib/perl5/lib/unicode/In/Mongolian.pl
+++ b/contrib/perl5/lib/unicode/In/Mongolian.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
1800 18AF
diff --git a/contrib/perl5/lib/unicode/In/Myanmar.pl b/contrib/perl5/lib/unicode/In/Myanmar.pl
index 4b3f318..3aa2f41 100644
--- a/contrib/perl5/lib/unicode/In/Myanmar.pl
+++ b/contrib/perl5/lib/unicode/In/Myanmar.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
1000 109F
diff --git a/contrib/perl5/lib/unicode/In/NumberForms.pl b/contrib/perl5/lib/unicode/In/NumberForms.pl
index d33ece0..2a606a6 100644
--- a/contrib/perl5/lib/unicode/In/NumberForms.pl
+++ b/contrib/perl5/lib/unicode/In/NumberForms.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2150 218F
diff --git a/contrib/perl5/lib/unicode/In/Ogham.pl b/contrib/perl5/lib/unicode/In/Ogham.pl
index e097d90..de320a9 100644
--- a/contrib/perl5/lib/unicode/In/Ogham.pl
+++ b/contrib/perl5/lib/unicode/In/Ogham.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
1680 169F
diff --git a/contrib/perl5/lib/unicode/In/OpticalCharacterRecognition.pl b/contrib/perl5/lib/unicode/In/OpticalCharacterRecognition.pl
index be1d981..7f0aff8 100644
--- a/contrib/perl5/lib/unicode/In/OpticalCharacterRecognition.pl
+++ b/contrib/perl5/lib/unicode/In/OpticalCharacterRecognition.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2440 245F
diff --git a/contrib/perl5/lib/unicode/In/Oriya.pl b/contrib/perl5/lib/unicode/In/Oriya.pl
index 5a680f6..771a245 100644
--- a/contrib/perl5/lib/unicode/In/Oriya.pl
+++ b/contrib/perl5/lib/unicode/In/Oriya.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0B00 0B7F
diff --git a/contrib/perl5/lib/unicode/In/PrivateUse.pl b/contrib/perl5/lib/unicode/In/PrivateUse.pl
index 0c118f4..0b0c004 100644
--- a/contrib/perl5/lib/unicode/In/PrivateUse.pl
+++ b/contrib/perl5/lib/unicode/In/PrivateUse.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
E000 F8FF
diff --git a/contrib/perl5/lib/unicode/In/Runic.pl b/contrib/perl5/lib/unicode/In/Runic.pl
index 0bd42df..52ca7aa 100644
--- a/contrib/perl5/lib/unicode/In/Runic.pl
+++ b/contrib/perl5/lib/unicode/In/Runic.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
16A0 16FF
diff --git a/contrib/perl5/lib/unicode/In/Sinhala.pl b/contrib/perl5/lib/unicode/In/Sinhala.pl
index 37e007c..5a892fd 100644
--- a/contrib/perl5/lib/unicode/In/Sinhala.pl
+++ b/contrib/perl5/lib/unicode/In/Sinhala.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0D80 0DFF
diff --git a/contrib/perl5/lib/unicode/In/SmallFormVariants.pl b/contrib/perl5/lib/unicode/In/SmallFormVariants.pl
index 736415e..148e6e8 100644
--- a/contrib/perl5/lib/unicode/In/SmallFormVariants.pl
+++ b/contrib/perl5/lib/unicode/In/SmallFormVariants.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
FE50 FE6F
diff --git a/contrib/perl5/lib/unicode/In/SpacingModifierLetters.pl b/contrib/perl5/lib/unicode/In/SpacingModifierLetters.pl
index 6e9cdf0..0e31fea 100644
--- a/contrib/perl5/lib/unicode/In/SpacingModifierLetters.pl
+++ b/contrib/perl5/lib/unicode/In/SpacingModifierLetters.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
02B0 02FF
diff --git a/contrib/perl5/lib/unicode/In/Specials.pl b/contrib/perl5/lib/unicode/In/Specials.pl
index f9f730f..03f69a3 100644
--- a/contrib/perl5/lib/unicode/In/Specials.pl
+++ b/contrib/perl5/lib/unicode/In/Specials.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
FFF0 FFFD
diff --git a/contrib/perl5/lib/unicode/In/SuperscriptsandSubscripts.pl b/contrib/perl5/lib/unicode/In/SuperscriptsandSubscripts.pl
index efcec0b..b0f90cd 100644
--- a/contrib/perl5/lib/unicode/In/SuperscriptsandSubscripts.pl
+++ b/contrib/perl5/lib/unicode/In/SuperscriptsandSubscripts.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2070 209F
diff --git a/contrib/perl5/lib/unicode/In/Syriac.pl b/contrib/perl5/lib/unicode/In/Syriac.pl
index 7c81fb6..f85f1a9 100644
--- a/contrib/perl5/lib/unicode/In/Syriac.pl
+++ b/contrib/perl5/lib/unicode/In/Syriac.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0700 074F
diff --git a/contrib/perl5/lib/unicode/In/Tamil.pl b/contrib/perl5/lib/unicode/In/Tamil.pl
index e65ed2f..71fa923 100644
--- a/contrib/perl5/lib/unicode/In/Tamil.pl
+++ b/contrib/perl5/lib/unicode/In/Tamil.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0B80 0BFF
diff --git a/contrib/perl5/lib/unicode/In/Telugu.pl b/contrib/perl5/lib/unicode/In/Telugu.pl
index d5ed236..ff09b1e 100644
--- a/contrib/perl5/lib/unicode/In/Telugu.pl
+++ b/contrib/perl5/lib/unicode/In/Telugu.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0C00 0C7F
diff --git a/contrib/perl5/lib/unicode/In/Thaana.pl b/contrib/perl5/lib/unicode/In/Thaana.pl
index 361bd4d..f88768c 100644
--- a/contrib/perl5/lib/unicode/In/Thaana.pl
+++ b/contrib/perl5/lib/unicode/In/Thaana.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0780 07BF
diff --git a/contrib/perl5/lib/unicode/In/Thai.pl b/contrib/perl5/lib/unicode/In/Thai.pl
index 3376de4..e77c0c5 100644
--- a/contrib/perl5/lib/unicode/In/Thai.pl
+++ b/contrib/perl5/lib/unicode/In/Thai.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0E00 0E7F
diff --git a/contrib/perl5/lib/unicode/In/Tibetan.pl b/contrib/perl5/lib/unicode/In/Tibetan.pl
index 50837ad..35436b3 100644
--- a/contrib/perl5/lib/unicode/In/Tibetan.pl
+++ b/contrib/perl5/lib/unicode/In/Tibetan.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0F00 0FFF
diff --git a/contrib/perl5/lib/unicode/In/UnifiedCanadianAboriginalSyllabics.pl b/contrib/perl5/lib/unicode/In/UnifiedCanadianAboriginalSyllabics.pl
index ad4eb27..83c6a78 100644
--- a/contrib/perl5/lib/unicode/In/UnifiedCanadianAboriginalSyllabics.pl
+++ b/contrib/perl5/lib/unicode/In/UnifiedCanadianAboriginalSyllabics.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
1400 167F
diff --git a/contrib/perl5/lib/unicode/In/YiRadicals.pl b/contrib/perl5/lib/unicode/In/YiRadicals.pl
index f25c695..7350871 100644
--- a/contrib/perl5/lib/unicode/In/YiRadicals.pl
+++ b/contrib/perl5/lib/unicode/In/YiRadicals.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
A490 A4CF
diff --git a/contrib/perl5/lib/unicode/In/YiSyllables.pl b/contrib/perl5/lib/unicode/In/YiSyllables.pl
index f4e3a8b..baa038e 100644
--- a/contrib/perl5/lib/unicode/In/YiSyllables.pl
+++ b/contrib/perl5/lib/unicode/In/YiSyllables.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
A000 A48F
diff --git a/contrib/perl5/lib/unicode/Is/ASCII.pl b/contrib/perl5/lib/unicode/Is/ASCII.pl
index 63f95ae..1434a55 100644
--- a/contrib/perl5/lib/unicode/Is/ASCII.pl
+++ b/contrib/perl5/lib/unicode/Is/ASCII.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0000 007f
diff --git a/contrib/perl5/lib/unicode/Is/Alnum.pl b/contrib/perl5/lib/unicode/Is/Alnum.pl
index d44f744..a0aac62 100644
--- a/contrib/perl5/lib/unicode/Is/Alnum.pl
+++ b/contrib/perl5/lib/unicode/Is/Alnum.pl
@@ -1,22 +1,28 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0030 0039
0041 005a
0061 007a
00aa
+00b2 00b3
00b5
-00ba
+00b9 00ba
+00bc 00be
00c0 00d6
00d8 00f6
-00f8 01c4
-01c6 01c7
-01c9 01ca
-01cc 01f1
-01f3 021f
+00f8 021f
0222 0233
0250 02ad
+02b0 02b8
+02bb 02c1
+02d0 02d1
+02e0 02e4
+02ee
+0300 034e
+0360 0362
+037a
0386
0388 038a
038c
@@ -25,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
@@ -64,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
@@ -75,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
@@ -99,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
@@ -141,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
@@ -187,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
@@ -210,20 +281,20 @@ return <<'END';
1f5b
1f5d
1f5f 1f7d
-1f80 1f87
-1f90 1f97
-1fa0 1fa7
-1fb0 1fb4
-1fb6 1fbb
+1f80 1fb4
+1fb6 1fbc
1fbe
1fc2 1fc4
-1fc6 1fcb
+1fc6 1fcc
1fd0 1fd3
1fd6 1fdb
1fe0 1fec
1ff2 1ff4
-1ff6 1ffb
-207f
+1ff6 1ffc
+2070
+2074 2079
+207f 2089
+20d0 20e3
2102
2107
210a 2113
@@ -235,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
@@ -248,8 +332,7 @@ ac00 d7a3
f900 fa2d
fb00 fb06
fb13 fb17
-fb1d
-fb1f fb28
+fb1d fb28
fb2a fb36
fb38 fb3c
fb3e
@@ -260,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/contrib/perl5/lib/unicode/Is/Alpha.pl b/contrib/perl5/lib/unicode/Is/Alpha.pl
index 0e94688..13dc003 100644
--- a/contrib/perl5/lib/unicode/Is/Alpha.pl
+++ b/contrib/perl5/lib/unicode/Is/Alpha.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0041 005a
@@ -9,13 +9,17 @@ return <<'END';
00ba
00c0 00d6
00d8 00f6
-00f8 01c4
-01c6 01c7
-01c9 01ca
-01cc 01f1
-01f3 021f
+00f8 021f
0222 0233
0250 02ad
+02b0 02b8
+02bb 02c1
+02d0 02d1
+02e0 02e4
+02ee
+0300 034e
+0360 0362
+037a
0386
0388 038a
038c
@@ -24,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
@@ -61,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
@@ -71,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
@@ -93,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
@@ -130,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
@@ -178,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
@@ -193,20 +261,18 @@ return <<'END';
1f5b
1f5d
1f5f 1f7d
-1f80 1f87
-1f90 1f97
-1fa0 1fa7
-1fb0 1fb4
-1fb6 1fbb
+1f80 1fb4
+1fb6 1fbc
1fbe
1fc2 1fc4
-1fc6 1fcb
+1fc6 1fcc
1fd0 1fd3
1fd6 1fdb
1fe0 1fec
1ff2 1ff4
-1ff6 1ffb
+1ff6 1ffc
207f
+20d0 20e3
2102
2107
210a 2113
@@ -218,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
@@ -231,8 +302,7 @@ ac00 d7a3
f900 fa2d
fb00 fb06
fb13 fb17
-fb1d
-fb1f fb28
+fb1d fb28
fb2a fb36
fb38 fb3c
fb3e
@@ -243,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/contrib/perl5/lib/unicode/Is/BidiAN.pl b/contrib/perl5/lib/unicode/Is/BidiAN.pl
index 4a71ae5..4519c6d 100644
--- a/contrib/perl5/lib/unicode/Is/BidiAN.pl
+++ b/contrib/perl5/lib/unicode/Is/BidiAN.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0660 0669
diff --git a/contrib/perl5/lib/unicode/Is/BidiB.pl b/contrib/perl5/lib/unicode/Is/BidiB.pl
index e4ba165..33bdb45 100644
--- a/contrib/perl5/lib/unicode/Is/BidiB.pl
+++ b/contrib/perl5/lib/unicode/Is/BidiB.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
000a
diff --git a/contrib/perl5/lib/unicode/Is/BidiCS.pl b/contrib/perl5/lib/unicode/Is/BidiCS.pl
index f8d037d..e217653 100644
--- a/contrib/perl5/lib/unicode/Is/BidiCS.pl
+++ b/contrib/perl5/lib/unicode/Is/BidiCS.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
002c
diff --git a/contrib/perl5/lib/unicode/Is/BidiEN.pl b/contrib/perl5/lib/unicode/Is/BidiEN.pl
index d63270a..113de87 100644
--- a/contrib/perl5/lib/unicode/Is/BidiEN.pl
+++ b/contrib/perl5/lib/unicode/Is/BidiEN.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0030 0039
diff --git a/contrib/perl5/lib/unicode/Is/BidiES.pl b/contrib/perl5/lib/unicode/Is/BidiES.pl
index 5a1a36a..d1cd305 100644
--- a/contrib/perl5/lib/unicode/Is/BidiES.pl
+++ b/contrib/perl5/lib/unicode/Is/BidiES.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
002f
diff --git a/contrib/perl5/lib/unicode/Is/BidiET.pl b/contrib/perl5/lib/unicode/Is/BidiET.pl
index 5e7af2b..0a66fa8 100644
--- a/contrib/perl5/lib/unicode/Is/BidiET.pl
+++ b/contrib/perl5/lib/unicode/Is/BidiET.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0023 0025
diff --git a/contrib/perl5/lib/unicode/Is/BidiL.pl b/contrib/perl5/lib/unicode/Is/BidiL.pl
index 8dc4ca8..a08d8b8 100644
--- a/contrib/perl5/lib/unicode/Is/BidiL.pl
+++ b/contrib/perl5/lib/unicode/Is/BidiL.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0041 005a
@@ -320,4 +320,6 @@ ffc2 ffc7
ffca ffcf
ffd2 ffd7
ffda ffdc
+f0000 ffffd
+100000 10fffd
END
diff --git a/contrib/perl5/lib/unicode/Is/BidiON.pl b/contrib/perl5/lib/unicode/Is/BidiON.pl
index bde00ff..ec0f18f 100644
--- a/contrib/perl5/lib/unicode/Is/BidiON.pl
+++ b/contrib/perl5/lib/unicode/Is/BidiON.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0021 0022
diff --git a/contrib/perl5/lib/unicode/Is/BidiR.pl b/contrib/perl5/lib/unicode/Is/BidiR.pl
index fccc1f6..9f776ae 100644
--- a/contrib/perl5/lib/unicode/Is/BidiR.pl
+++ b/contrib/perl5/lib/unicode/Is/BidiR.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
05be
diff --git a/contrib/perl5/lib/unicode/Is/BidiS.pl b/contrib/perl5/lib/unicode/Is/BidiS.pl
index b28b331..ac2655d 100644
--- a/contrib/perl5/lib/unicode/Is/BidiS.pl
+++ b/contrib/perl5/lib/unicode/Is/BidiS.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0009
diff --git a/contrib/perl5/lib/unicode/Is/BidiWS.pl b/contrib/perl5/lib/unicode/Is/BidiWS.pl
index 25d8b8f..ebd24e5 100644
--- a/contrib/perl5/lib/unicode/Is/BidiWS.pl
+++ b/contrib/perl5/lib/unicode/Is/BidiWS.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
000c
diff --git a/contrib/perl5/lib/unicode/Is/C.pl b/contrib/perl5/lib/unicode/Is/C.pl
index 0db83c4..51e4ede 100644
--- a/contrib/perl5/lib/unicode/Is/C.pl
+++ b/contrib/perl5/lib/unicode/Is/C.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0000 001f
@@ -15,4 +15,6 @@ dc00 dfff
e000 f8ff
feff
fff9 fffb
+f0000 ffffd
+100000 10fffd
END
diff --git a/contrib/perl5/lib/unicode/Is/Cc.pl b/contrib/perl5/lib/unicode/Is/Cc.pl
index d7184e3..6b97adc 100644
--- a/contrib/perl5/lib/unicode/Is/Cc.pl
+++ b/contrib/perl5/lib/unicode/Is/Cc.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0000 001f
diff --git a/contrib/perl5/lib/unicode/Is/Cn.pl b/contrib/perl5/lib/unicode/Is/Cn.pl
index ec287c4..fb75e87 100644
--- a/contrib/perl5/lib/unicode/Is/Cn.pl
+++ b/contrib/perl5/lib/unicode/Is/Cn.pl
@@ -1,5 +1,373 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+0220 0221
+0234 024f
+02ae 02af
+02ef 02ff
+034f 035f
+0363 0373
+0376 0379
+037b 037d
+037f 0383
+038b
+038d
+03a2
+03cf
+03d8 03d9
+03f4 03ff
+0487
+048a 048b
+04c5 04c6
+04c9 04ca
+04cd 04cf
+04f6 04f7
+04fa 0530
+0557 0558
+0560
+0588
+058b 0590
+05a2
+05ba
+05c5 05cf
+05eb 05ef
+05f5 060b
+060d 061a
+061c 061e
+0620
+063b 063f
+0656 065f
+066e 066f
+06ee 06ef
+06ff
+070e
+072d 072f
+074b 077f
+07b1 0900
+0904
+093a 093b
+094e 094f
+0955 0957
+0971 0980
+0984
+098d 098e
+0991 0992
+09a9
+09b1
+09b3 09b5
+09ba 09bb
+09bd
+09c5 09c6
+09c9 09ca
+09ce 09d6
+09d8 09db
+09de
+09e4 09e5
+09fb 0a01
+0a03 0a04
+0a0b 0a0e
+0a11 0a12
+0a29
+0a31
+0a34
+0a37
+0a3a 0a3b
+0a3d
+0a43 0a46
+0a49 0a4a
+0a4e 0a58
+0a5d
+0a5f 0a65
+0a75 0a80
+0a84
+0a8c
+0a8e
+0a92
+0aa9
+0ab1
+0ab4
+0aba 0abb
+0ac6
+0aca
+0ace 0acf
+0ad1 0adf
+0ae1 0ae5
+0af0 0b00
+0b04
+0b0d 0b0e
+0b11 0b12
+0b29
+0b31
+0b34 0b35
+0b3a 0b3b
+0b44 0b46
+0b49 0b4a
+0b4e 0b55
+0b58 0b5b
+0b5e
+0b62 0b65
+0b71 0b81
+0b84
+0b8b 0b8d
+0b91
+0b96 0b98
+0b9b
+0b9d
+0ba0 0ba2
+0ba5 0ba7
+0bab 0bad
+0bb6
+0bba 0bbd
+0bc3 0bc5
+0bc9
+0bce 0bd6
+0bd8 0be6
+0bf3 0c00
+0c04
+0c0d
+0c11
+0c29
+0c34
+0c3a 0c3d
+0c45
+0c49
+0c4e 0c54
+0c57 0c5f
+0c62 0c65
+0c70 0c81
+0c84
+0c8d
+0c91
+0ca9
+0cb4
+0cba 0cbd
+0cc5
+0cc9
+0cce 0cd4
+0cd7 0cdd
+0cdf
+0ce2 0ce5
+0cf0 0d01
+0d04
+0d0d
+0d11
+0d29
+0d3a 0d3d
+0d44 0d45
+0d49
+0d4e 0d56
+0d58 0d5f
+0d62 0d65
+0d70 0d81
+0d84
+0d97 0d99
+0db2
+0dbc
+0dbe 0dbf
+0dc7 0dc9
+0dcb 0dce
+0dd5
+0dd7
+0de0 0df1
+0df5 0e00
+0e3b 0e3e
+0e5c 0e80
+0e83
+0e85 0e86
+0e89
+0e8b 0e8c
+0e8e 0e93
+0e98
+0ea0
+0ea4
+0ea6
+0ea8 0ea9
+0eac
+0eba
+0ebe 0ebf
+0ec5
+0ec7
+0ece 0ecf
+0eda 0edb
+0ede 0eff
+0f48
+0f6b 0f70
+0f8c 0f8f
+0f98
+0fbd
+0fcd 0fce
+0fd0 0fff
+1022
+1028
+102b
+1033 1035
+103a 103f
+105a 109f
+10c6 10cf
+10f7 10fa
+10fc 10ff
+115a 115e
+11a3 11a7
+11fa 11ff
+1207
+1247
+1249
+124e 124f
+1257
+1259
+125e 125f
+1287
+1289
+128e 128f
+12af
+12b1
+12b6 12b7
+12bf
+12c1
+12c6 12c7
+12cf
+12d7
+12ef
+130f
+1311
+1316 1317
+131f
+1347
+135b 1360
+137d 139f
+13f5 1400
+1677 167f
+169d 169f
+16f1 177f
+17dd 17df
+17ea 17ff
+180f
+181a 181f
+1878 187f
+18aa 1dff
+1e9c 1e9f
+1efa 1eff
+1f16 1f17
+1f1e 1f1f
+1f46 1f47
+1f4e 1f4f
+1f58
+1f5a
+1f5c
+1f5e
+1f7e 1f7f
+1fb5
+1fc5
+1fd4 1fd5
+1fdc
+1ff0 1ff1
+1ff5
+1fff
+2047
+204e 2069
+2071 2073
+208f 209f
+20b0 20cf
+20e4 20ff
+213b 2152
+2184 218f
+21f4 21ff
+22f2 22ff
+237c
+239b 23ff
+2427 243f
+244b 245f
+24eb 24ff
+2596 259f
+25f8 25ff
+2614 2618
+2672 2700
+2705
+270a 270b
+2728
+274c
+274e
+2753 2755
+2757
+275f 2760
+2768 2775
+2795 2797
+27b0
+27bf 27ff
+2900 2e7f
+2e9a
+2ef4 2eff
+2fd6 2fef
+2ffc 2fff
+303b 303d
+3040
+3095 3098
+309f 30a0
+30ff 3104
+312d 3130
+318f
+31b8 31ff
+321d 321f
+3244 325f
+327c 327e
+32b1 32bf
+32cc 32cf
+32ff
+3377 337a
+33de 33df
+33ff
+4db6 4dff
+9fa6 9fff
+a48d a48f
+a4a2 a4a3
+a4b4
+a4c1
+a4c5
+a4c7 abff
+d7a4 d7ff
+fa2e faff
+fb07 fb12
+fb18 fb1c
+fb37
+fb3d
+fb3f
+fb42
+fb45
+fbb2 fbd2
+fd40 fd4f
+fd90 fd91
+fdc8 fdef
+fdfc fe1f
+fe24 fe2f
+fe45 fe48
+fe53
+fe67
+fe6c fe6f
+fe73
+fe75
+fefd fefe
+ff00
+ff5f ff60
+ffbf ffc1
+ffc8 ffc9
+ffd0 ffd1
+ffd8 ffd9
+ffdd ffdf
+ffe7
+ffef fff8
+10000 1fffd
+20000 2fffd
+30000 3fffd
+40000 4fffd
+50000 5fffd
+60000 6fffd
+70000 7fffd
+80000 8fffd
+90000 9fffd
+a0000 afffd
+b0000 bfffd
+c0000 cfffd
+d0000 dfffd
+e0000 efffd
END
diff --git a/contrib/perl5/lib/unicode/Is/Cntrl.pl b/contrib/perl5/lib/unicode/Is/Cntrl.pl
index 0db83c4..51e4ede 100644
--- a/contrib/perl5/lib/unicode/Is/Cntrl.pl
+++ b/contrib/perl5/lib/unicode/Is/Cntrl.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0000 001f
@@ -15,4 +15,6 @@ dc00 dfff
e000 f8ff
feff
fff9 fffb
+f0000 ffffd
+100000 10fffd
END
diff --git a/contrib/perl5/lib/unicode/Is/Co.pl b/contrib/perl5/lib/unicode/Is/Co.pl
index c456d33..d077fd2 100644
--- a/contrib/perl5/lib/unicode/Is/Co.pl
+++ b/contrib/perl5/lib/unicode/Is/Co.pl
@@ -1,6 +1,8 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
e000 f8ff
+f0000 ffffd
+100000 10fffd
END
diff --git a/contrib/perl5/lib/unicode/Is/DCcircle.pl b/contrib/perl5/lib/unicode/Is/DCcircle.pl
index 4c47b28..82c9edc 100644
--- a/contrib/perl5/lib/unicode/Is/DCcircle.pl
+++ b/contrib/perl5/lib/unicode/Is/DCcircle.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2460 2473
diff --git a/contrib/perl5/lib/unicode/Is/DCcompat.pl b/contrib/perl5/lib/unicode/Is/DCcompat.pl
index 75d2569..5ae2b6a 100644
--- a/contrib/perl5/lib/unicode/Is/DCcompat.pl
+++ b/contrib/perl5/lib/unicode/Is/DCcompat.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
00a8
diff --git a/contrib/perl5/lib/unicode/Is/DCfinal.pl b/contrib/perl5/lib/unicode/Is/DCfinal.pl
index 33fbf6a..3c81bcc 100644
--- a/contrib/perl5/lib/unicode/Is/DCfinal.pl
+++ b/contrib/perl5/lib/unicode/Is/DCfinal.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
fb51
diff --git a/contrib/perl5/lib/unicode/Is/DCfont.pl b/contrib/perl5/lib/unicode/Is/DCfont.pl
index c72234b..7feff18 100644
--- a/contrib/perl5/lib/unicode/Is/DCfont.pl
+++ b/contrib/perl5/lib/unicode/Is/DCfont.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2102
diff --git a/contrib/perl5/lib/unicode/Is/DCinitial.pl b/contrib/perl5/lib/unicode/Is/DCinitial.pl
index 0145b7d..c6d7802 100644
--- a/contrib/perl5/lib/unicode/Is/DCinitial.pl
+++ b/contrib/perl5/lib/unicode/Is/DCinitial.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
fb54
diff --git a/contrib/perl5/lib/unicode/Is/DCisolated.pl b/contrib/perl5/lib/unicode/Is/DCisolated.pl
index cc8541e..e4e24f7 100644
--- a/contrib/perl5/lib/unicode/Is/DCisolated.pl
+++ b/contrib/perl5/lib/unicode/Is/DCisolated.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
fb50
diff --git a/contrib/perl5/lib/unicode/Is/DCnarrow.pl b/contrib/perl5/lib/unicode/Is/DCnarrow.pl
index 9417de1..78874521 100644
--- a/contrib/perl5/lib/unicode/Is/DCnarrow.pl
+++ b/contrib/perl5/lib/unicode/Is/DCnarrow.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
ff61 ffbe
diff --git a/contrib/perl5/lib/unicode/Is/DCnoBreak.pl b/contrib/perl5/lib/unicode/Is/DCnoBreak.pl
index 1fd9e87..18c0105 100644
--- a/contrib/perl5/lib/unicode/Is/DCnoBreak.pl
+++ b/contrib/perl5/lib/unicode/Is/DCnoBreak.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
00a0
diff --git a/contrib/perl5/lib/unicode/Is/DCsmall.pl b/contrib/perl5/lib/unicode/Is/DCsmall.pl
index f6c8069..3a37931 100644
--- a/contrib/perl5/lib/unicode/Is/DCsmall.pl
+++ b/contrib/perl5/lib/unicode/Is/DCsmall.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
fe50 fe52
diff --git a/contrib/perl5/lib/unicode/Is/DCsquare.pl b/contrib/perl5/lib/unicode/Is/DCsquare.pl
index b55fdd9..f27993d 100644
--- a/contrib/perl5/lib/unicode/Is/DCsquare.pl
+++ b/contrib/perl5/lib/unicode/Is/DCsquare.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
3300 3357
diff --git a/contrib/perl5/lib/unicode/Is/DCsub.pl b/contrib/perl5/lib/unicode/Is/DCsub.pl
index 98c4dfa..f709a22 100644
--- a/contrib/perl5/lib/unicode/Is/DCsub.pl
+++ b/contrib/perl5/lib/unicode/Is/DCsub.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2080 208e
diff --git a/contrib/perl5/lib/unicode/Is/DCsuper.pl b/contrib/perl5/lib/unicode/Is/DCsuper.pl
index 865a26d..1e6a0c5 100644
--- a/contrib/perl5/lib/unicode/Is/DCsuper.pl
+++ b/contrib/perl5/lib/unicode/Is/DCsuper.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
00aa
diff --git a/contrib/perl5/lib/unicode/Is/DCvertical.pl b/contrib/perl5/lib/unicode/Is/DCvertical.pl
index 5d55483..33b9feb 100644
--- a/contrib/perl5/lib/unicode/Is/DCvertical.pl
+++ b/contrib/perl5/lib/unicode/Is/DCvertical.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
fe30 fe44
diff --git a/contrib/perl5/lib/unicode/Is/DCwide.pl b/contrib/perl5/lib/unicode/Is/DCwide.pl
index 09dae19..afe1e06b 100644
--- a/contrib/perl5/lib/unicode/Is/DCwide.pl
+++ b/contrib/perl5/lib/unicode/Is/DCwide.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
3000
diff --git a/contrib/perl5/lib/unicode/Is/DecoCanon.pl b/contrib/perl5/lib/unicode/Is/DecoCanon.pl
index c5a59f6..57c167b 100644
--- a/contrib/perl5/lib/unicode/Is/DecoCanon.pl
+++ b/contrib/perl5/lib/unicode/Is/DecoCanon.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
00c0 00c5
diff --git a/contrib/perl5/lib/unicode/Is/DecoCompat.pl b/contrib/perl5/lib/unicode/Is/DecoCompat.pl
index 43d34fc..940d956 100644
--- a/contrib/perl5/lib/unicode/Is/DecoCompat.pl
+++ b/contrib/perl5/lib/unicode/Is/DecoCompat.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
00a0
diff --git a/contrib/perl5/lib/unicode/Is/Digit.pl b/contrib/perl5/lib/unicode/Is/Digit.pl
index 2ab8156..259bb89 100644
--- a/contrib/perl5/lib/unicode/Is/Digit.pl
+++ b/contrib/perl5/lib/unicode/Is/Digit.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0030 0039
diff --git a/contrib/perl5/lib/unicode/Is/Graph.pl b/contrib/perl5/lib/unicode/Is/Graph.pl
index 9c94bb7..238cc56 100644
--- a/contrib/perl5/lib/unicode/Is/Graph.pl
+++ b/contrib/perl5/lib/unicode/Is/Graph.pl
@@ -1,9 +1,9 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# 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,9 +265,8 @@ return <<'END';
1fdd 1fef
1ff2 1ff4
1ff6 1ffe
-2000 200b
-2010 2029
-202f 2046
+2010 2027
+2030 2046
2048 204d
2070
2074 208e
@@ -303,7 +302,7 @@ return <<'END';
2e9b 2ef3
2f00 2fd5
2ff0 2ffb
-3000 303a
+3001 303a
303e 303f
3041 3094
3099 309e
@@ -329,6 +328,7 @@ a4b5 a4c0
a4c2 a4c4
a4c6
ac00 d7a3
+e000 f8ff
f900 fa2d
fb00 fb06
fb13 fb17
@@ -359,4 +359,6 @@ ffda ffdc
ffe0 ffe6
ffe8 ffee
fffc fffd
+f0000 ffffd
+100000 10fffd
END
diff --git a/contrib/perl5/lib/unicode/Is/L.pl b/contrib/perl5/lib/unicode/Is/L.pl
index c32f830..bfe2c27 100644
--- a/contrib/perl5/lib/unicode/Is/L.pl
+++ b/contrib/perl5/lib/unicode/Is/L.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0041 005a
diff --git a/contrib/perl5/lib/unicode/Is/Ll.pl b/contrib/perl5/lib/unicode/Is/Ll.pl
index 2814794..03dafcc 100644
--- a/contrib/perl5/lib/unicode/Is/Ll.pl
+++ b/contrib/perl5/lib/unicode/Is/Ll.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0061 007a
diff --git a/contrib/perl5/lib/unicode/Is/Lm.pl b/contrib/perl5/lib/unicode/Is/Lm.pl
index 4380afe..23a3c55 100644
--- a/contrib/perl5/lib/unicode/Is/Lm.pl
+++ b/contrib/perl5/lib/unicode/Is/Lm.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
02b0 02b8
diff --git a/contrib/perl5/lib/unicode/Is/Lo.pl b/contrib/perl5/lib/unicode/Is/Lo.pl
index 78fab4c..d82c6bb 100644
--- a/contrib/perl5/lib/unicode/Is/Lo.pl
+++ b/contrib/perl5/lib/unicode/Is/Lo.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
01bb
diff --git a/contrib/perl5/lib/unicode/Is/Lower.pl b/contrib/perl5/lib/unicode/Is/Lower.pl
index 2814794..03dafcc 100644
--- a/contrib/perl5/lib/unicode/Is/Lower.pl
+++ b/contrib/perl5/lib/unicode/Is/Lower.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0061 007a
diff --git a/contrib/perl5/lib/unicode/Is/Lt.pl b/contrib/perl5/lib/unicode/Is/Lt.pl
index 809c37a..b19755c 100644
--- a/contrib/perl5/lib/unicode/Is/Lt.pl
+++ b/contrib/perl5/lib/unicode/Is/Lt.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
01c5
diff --git a/contrib/perl5/lib/unicode/Is/Lu.pl b/contrib/perl5/lib/unicode/Is/Lu.pl
index 8dde274..07dee48 100644
--- a/contrib/perl5/lib/unicode/Is/Lu.pl
+++ b/contrib/perl5/lib/unicode/Is/Lu.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0041 005a
diff --git a/contrib/perl5/lib/unicode/Is/M.pl b/contrib/perl5/lib/unicode/Is/M.pl
index 9367775..e3ef7f3 100644
--- a/contrib/perl5/lib/unicode/Is/M.pl
+++ b/contrib/perl5/lib/unicode/Is/M.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0300 034e
diff --git a/contrib/perl5/lib/unicode/Is/Mc.pl b/contrib/perl5/lib/unicode/Is/Mc.pl
index 937d8d4..a76d66c 100644
--- a/contrib/perl5/lib/unicode/Is/Mc.pl
+++ b/contrib/perl5/lib/unicode/Is/Mc.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0903
diff --git a/contrib/perl5/lib/unicode/Is/Mirrored.pl b/contrib/perl5/lib/unicode/Is/Mirrored.pl
index e2c55a6..d324f50 100644
--- a/contrib/perl5/lib/unicode/Is/Mirrored.pl
+++ b/contrib/perl5/lib/unicode/Is/Mirrored.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0028 0029
diff --git a/contrib/perl5/lib/unicode/Is/Mn.pl b/contrib/perl5/lib/unicode/Is/Mn.pl
index aba40af..803e038 100644
--- a/contrib/perl5/lib/unicode/Is/Mn.pl
+++ b/contrib/perl5/lib/unicode/Is/Mn.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0300 034e
diff --git a/contrib/perl5/lib/unicode/Is/N.pl b/contrib/perl5/lib/unicode/Is/N.pl
index 1291f27..8667e77 100644
--- a/contrib/perl5/lib/unicode/Is/N.pl
+++ b/contrib/perl5/lib/unicode/Is/N.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0030 0039
diff --git a/contrib/perl5/lib/unicode/Is/Nd.pl b/contrib/perl5/lib/unicode/Is/Nd.pl
index 2ab8156..259bb89 100644
--- a/contrib/perl5/lib/unicode/Is/Nd.pl
+++ b/contrib/perl5/lib/unicode/Is/Nd.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0030 0039
diff --git a/contrib/perl5/lib/unicode/Is/No.pl b/contrib/perl5/lib/unicode/Is/No.pl
index 6a57dc5..13cac3b 100644
--- a/contrib/perl5/lib/unicode/Is/No.pl
+++ b/contrib/perl5/lib/unicode/Is/No.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
00b2 00b3
diff --git a/contrib/perl5/lib/unicode/Is/P.pl b/contrib/perl5/lib/unicode/Is/P.pl
index 8fd1e8e..97330ec 100644
--- a/contrib/perl5/lib/unicode/Is/P.pl
+++ b/contrib/perl5/lib/unicode/Is/P.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0021 0023
diff --git a/contrib/perl5/lib/unicode/Is/Pd.pl b/contrib/perl5/lib/unicode/Is/Pd.pl
index 58997ca..b4a2ffb 100644
--- a/contrib/perl5/lib/unicode/Is/Pd.pl
+++ b/contrib/perl5/lib/unicode/Is/Pd.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
002d
diff --git a/contrib/perl5/lib/unicode/Is/Pe.pl b/contrib/perl5/lib/unicode/Is/Pe.pl
index 8879191..2b5bd3e 100644
--- a/contrib/perl5/lib/unicode/Is/Pe.pl
+++ b/contrib/perl5/lib/unicode/Is/Pe.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0029
diff --git a/contrib/perl5/lib/unicode/Is/Po.pl b/contrib/perl5/lib/unicode/Is/Po.pl
index e6b8b02..849ee17 100644
--- a/contrib/perl5/lib/unicode/Is/Po.pl
+++ b/contrib/perl5/lib/unicode/Is/Po.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0021 0023
diff --git a/contrib/perl5/lib/unicode/Is/Print.pl b/contrib/perl5/lib/unicode/Is/Print.pl
index 9560586..1229a28 100644
--- a/contrib/perl5/lib/unicode/Is/Print.pl
+++ b/contrib/perl5/lib/unicode/Is/Print.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0020 007e
@@ -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/contrib/perl5/lib/unicode/Is/Ps.pl b/contrib/perl5/lib/unicode/Is/Ps.pl
index a7dee37..90f1809 100644
--- a/contrib/perl5/lib/unicode/Is/Ps.pl
+++ b/contrib/perl5/lib/unicode/Is/Ps.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0028
diff --git a/contrib/perl5/lib/unicode/Is/Punct.pl b/contrib/perl5/lib/unicode/Is/Punct.pl
index 8fd1e8e..97330ec 100644
--- a/contrib/perl5/lib/unicode/Is/Punct.pl
+++ b/contrib/perl5/lib/unicode/Is/Punct.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0021 0023
diff --git a/contrib/perl5/lib/unicode/Is/S.pl b/contrib/perl5/lib/unicode/Is/S.pl
index 8851766..a304e17 100644
--- a/contrib/perl5/lib/unicode/Is/S.pl
+++ b/contrib/perl5/lib/unicode/Is/S.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0024
diff --git a/contrib/perl5/lib/unicode/Is/Sc.pl b/contrib/perl5/lib/unicode/Is/Sc.pl
index 5776bd6..adeb3e4 100644
--- a/contrib/perl5/lib/unicode/Is/Sc.pl
+++ b/contrib/perl5/lib/unicode/Is/Sc.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0024
diff --git a/contrib/perl5/lib/unicode/Is/Sm.pl b/contrib/perl5/lib/unicode/Is/Sm.pl
index ae9424c..540da63 100644
--- a/contrib/perl5/lib/unicode/Is/Sm.pl
+++ b/contrib/perl5/lib/unicode/Is/Sm.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
002b
diff --git a/contrib/perl5/lib/unicode/Is/So.pl b/contrib/perl5/lib/unicode/Is/So.pl
index 4e9dfc2..3caf617 100644
--- a/contrib/perl5/lib/unicode/Is/So.pl
+++ b/contrib/perl5/lib/unicode/Is/So.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
00a6 00a7
diff --git a/contrib/perl5/lib/unicode/Is/Space.pl b/contrib/perl5/lib/unicode/Is/Space.pl
index 4121ef4..9971082 100644
--- a/contrib/perl5/lib/unicode/Is/Space.pl
+++ b/contrib/perl5/lib/unicode/Is/Space.pl
@@ -1,9 +1,8 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
-0009 000a
-000c 000d
+0009 000d
0020
00a0
1680
diff --git a/contrib/perl5/lib/unicode/Is/SylA.pl b/contrib/perl5/lib/unicode/Is/SylA.pl
index ec287c4..6a3fc47 100644
--- a/contrib/perl5/lib/unicode/Is/SylA.pl
+++ b/contrib/perl5/lib/unicode/Is/SylA.pl
@@ -1,5 +1,158 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+1203
+120b
+1213
+121b
+1223
+122b
+1233
+123b
+1243
+1253
+1263
+126b
+1273
+127b
+1283
+1293
+129b
+12a3
+12ab
+12bb
+12cb
+12d3
+12db
+12e3
+12eb
+12f3
+12fb
+1303
+130b
+131b
+1323
+132b
+1333
+133b
+1343
+134b
+1353
+13a0
+13a6 13a7
+13ad
+13b3
+13b9
+13be 13bf
+13c6
+13cc
+13d3 13d4
+13dc 13dd
+13e3
+13e9
+13ef
+140a
+1438
+1455
+146a
+1472
+1490
+14aa
+14c7
+14da
+14f4
+1515
+152d
+154b
+154d
+1559
+1566
+156e
+1573
+1579
+1583
+1589
+158d
+1593
+159a
+159e
+15a4
+15ac
+15b3
+15b7
+15bb
+15bf
+15c3
+15c9
+15cf
+15d5
+15e1
+15e7
+15ed
+15f4
+15fa
+1600
+1607
+160d
+1613
+161b
+1621
+1627
+162d
+1633
+1639
+163f
+1645
+164d
+1653
+1659
+1660
+1666
+166c
+1675
+30a1 30a2
+30ab 30ac
+30b5 30b6
+30bf 30c0
+30ca
+30cf 30d1
+30de
+30e3 30e4
+30e9
+30ee 30ef
+30f5
+30f7
+32d0
+32d5
+32da
+32df
+32e4
+32e9
+32ee
+32f3
+32f6
+32fb
+ff67
+ff6c
+ff71
+ff76
+ff7b
+ff80
+ff85
+ff8a
+ff8f
+ff94
+ff97
+ff9c
+3041 3042
+304b 304c
+3055 3056
+305f 3060
+306a
+306f 3071
+307e
+3083 3084
+3089
+308e 308f
END
diff --git a/contrib/perl5/lib/unicode/Is/SylC.pl b/contrib/perl5/lib/unicode/Is/SylC.pl
index ec287c4..fb8b08e 100644
--- a/contrib/perl5/lib/unicode/Is/SylC.pl
+++ b/contrib/perl5/lib/unicode/Is/SylC.pl
@@ -1,5 +1,70 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+1205
+120d
+1215
+121d
+1225
+122d
+1235
+123d
+1245
+1255
+1265
+126d
+1275
+127d
+1285
+1295
+129d
+12a5
+12ad
+12bd
+12cd
+12d5
+12dd
+12e5
+12ed
+12f5
+12fd
+1305
+130d
+131d
+1325
+132d
+1335
+133d
+1345
+134d
+1355
+13c0
+13cd
+141d
+142b 142e
+1449 144b
+1466
+1483
+1485 1488
+14a1
+14bb 14bf
+14d0 14d2
+14ea 14ec
+1505 1506
+1508 150b
+1525
+153e 1540
+1550 1552
+155d
+156a
+156f
+157b 157d
+1585
+1595 1596
+159f
+15a6
+15ae 15af
+30f3
+ff9d
END
diff --git a/contrib/perl5/lib/unicode/Is/SylE.pl b/contrib/perl5/lib/unicode/Is/SylE.pl
index ec287c4..d762748 100644
--- a/contrib/perl5/lib/unicode/Is/SylE.pl
+++ b/contrib/perl5/lib/unicode/Is/SylE.pl
@@ -1,5 +1,147 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+1204
+120c
+1214
+121c
+1224
+122c
+1234
+123c
+1244
+1254
+1264
+126c
+1274
+127c
+1284
+1294
+129c
+12a4
+12ac
+12bc
+12cc
+12d4
+12dc
+12e4
+12ec
+12f4
+12fc
+1304
+130c
+131c
+1324
+132c
+1334
+133c
+1344
+134c
+1354
+13a1
+13a8
+13ae
+13b4
+13ba
+13c1
+13c7
+13ce
+13d5 13d6
+13de
+13e4
+13ea
+13f0
+1401
+142f
+144c
+1467
+146b
+1489
+14a3
+14c0
+14d3
+14ed
+1510
+1526
+1542 1544
+1553
+155e 155f
+156b
+1570
+1574
+1586
+158a
+1597
+159b
+15a7
+15b0
+15b4
+15b8
+15bc
+15c0
+15c6
+15cc
+15d2
+15de
+15e4
+15ea
+15f1
+15f7
+15fd
+1604
+160a
+1610
+1617
+161e
+1624
+162a
+1630
+1636
+163c
+1642
+164a
+1650
+1656
+165d
+1663
+1669
+30a7 30a8
+30b1 30b2
+30bb 30bc
+30c6 30c7
+30cd
+30d8 30da
+30e1
+30ec
+30f1
+30f6
+30f9
+32d3
+32d8
+32dd
+32e2
+32e7
+32ec
+32f1
+32f9
+32fd
+ff6a
+ff74
+ff79
+ff7e
+ff83
+ff88
+ff8d
+ff92
+ff9a
+3047 3048
+3051 3052
+305b 305c
+3066 3067
+306d
+3078 307a
+3081
+308c
+3091
END
diff --git a/contrib/perl5/lib/unicode/Is/SylI.pl b/contrib/perl5/lib/unicode/Is/SylI.pl
index ec287c4..29bc70f 100644
--- a/contrib/perl5/lib/unicode/Is/SylI.pl
+++ b/contrib/perl5/lib/unicode/Is/SylI.pl
@@ -1,5 +1,154 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+1202
+120a
+1212
+121a
+1222
+122a
+1232
+123a
+1242
+1252
+1262
+126a
+1272
+127a
+1282
+1292
+129a
+12a2
+12aa
+12ba
+12ca
+12d2
+12da
+12e2
+12ea
+12f2
+12fa
+1302
+130a
+131a
+1322
+132a
+1332
+133a
+1342
+134a
+1352
+13a2
+13a9
+13af
+13b5
+13bb
+13c2
+13c8
+13cf
+13d7 13d8
+13df
+13e5
+13eb
+13f1
+1403
+1409
+1431
+1437
+144e
+1454
+1468
+146d
+148b
+14a5
+14c2
+14d5
+14ef
+1511
+1528
+1541
+1546
+1555
+1560 1561
+156c
+1571
+1575
+157f
+1587
+158b
+158f
+1598
+159c
+15a0
+15a8
+15b1
+15b5
+15b9
+15bd
+15c1
+15c8
+15ce
+15d4
+15e0
+15e6
+15ec
+15f3
+15f9
+15ff
+1606
+160c
+1612
+1619 161a
+1620
+1626
+162c
+1632
+1638
+163e
+1644
+164c
+1652
+1658
+165f
+1665
+166b
+1671
+30a3 30a4
+30ad 30ae
+30b7 30b8
+30c1 30c2
+30cb
+30d2 30d4
+30df
+30ea
+30f0
+30f8
+32d1
+32d6
+32db
+32e0
+32e5
+32ea
+32ef
+32f7
+32fc
+ff68
+ff72
+ff77
+ff7c
+ff81
+ff86
+ff8b
+ff90
+ff98
+3043 3044
+304d 304e
+3057 3058
+3061 3062
+306b
+3072 3074
+307f
+308a
+3090
END
diff --git a/contrib/perl5/lib/unicode/Is/SylO.pl b/contrib/perl5/lib/unicode/Is/SylO.pl
index ec287c4..2c795f0 100644
--- a/contrib/perl5/lib/unicode/Is/SylO.pl
+++ b/contrib/perl5/lib/unicode/Is/SylO.pl
@@ -1,5 +1,157 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+1206
+120e
+1216
+121e
+1226
+122e
+1236
+123e
+1246
+1256
+1266
+126e
+1276
+127e
+1286
+1296
+129e
+12a6
+12ae
+12be
+12ce
+12d6
+12de
+12e6
+12ee
+12f6
+12fe
+1306
+130e
+131e
+1326
+132e
+1336
+133e
+1346
+134e
+1356
+13a3
+13aa
+13b0
+13b6
+13bc
+13c3
+13c9
+13d0
+13d9
+13e0
+13e6
+13ec
+13f2
+1405
+1433
+1450
+1469
+146f
+148d
+14a7
+14c4
+14d7
+14f1
+1513
+152a
+1548
+154a
+1557
+1564
+156d
+1572
+1577
+1581
+1588
+158c
+1591
+1599
+159d
+15a2
+15aa
+15b2
+15b6
+15ba
+15be
+15c2
+15c5
+15cb
+15d1
+15dd
+15e3
+15e9
+15f0
+15f6
+15fc
+1603
+1609
+160f
+1616
+161d
+1623
+1629
+162f
+1635
+163b
+1641
+1649
+164f
+1655
+165c
+1662
+1668
+1673
+30a9 30aa
+30b3 30b4
+30bd 30be
+30c8 30c9
+30ce
+30db 30dd
+30e2
+30e7 30e8
+30ed
+30f2
+30fa
+32d4
+32d9
+32de
+32e3
+32e8
+32ed
+32f2
+32f5
+32fa
+32fe
+ff66
+ff6b
+ff6e
+ff75
+ff7a
+ff7f
+ff84
+ff89
+ff8e
+ff93
+ff96
+ff9b
+3049 304a
+3053 3054
+305d 305e
+3068 3069
+306e
+307b 307d
+3082
+3087 3088
+308d
+3092
END
diff --git a/contrib/perl5/lib/unicode/Is/SylU.pl b/contrib/perl5/lib/unicode/Is/SylU.pl
index ec287c4..117d981 100644
--- a/contrib/perl5/lib/unicode/Is/SylU.pl
+++ b/contrib/perl5/lib/unicode/Is/SylU.pl
@@ -1,5 +1,122 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+1201
+1209
+1211
+1219
+1221
+1229
+1231
+1239
+1241
+1251
+1261
+1269
+1271
+1279
+1281
+1291
+1299
+12a1
+12a9
+12b9
+12c9
+12d1
+12d9
+12e1
+12e9
+12f1
+12f9
+1301
+1309
+1319
+1321
+1329
+1331
+1339
+1341
+1349
+1351
+13a4
+13ab
+13b1
+13b7
+13bd
+13c4
+13ca
+13d1
+13da
+13e1
+13e7
+13ed
+13f3
+15c4
+15ca
+15d0
+15dc
+15e2
+15e8
+15ef
+15f5
+15fb
+1602
+1608
+160e
+1614 1615
+161c
+1622
+1628
+162e
+1634
+163a
+1640
+1648
+164e
+1654
+165b
+1661
+1667
+30a5 30a6
+30af 30b0
+30b9 30ba
+30c3 30c5
+30cc
+30d5 30d7
+30e0
+30e5 30e6
+30eb
+30f4
+32d2
+32d7
+32dc
+32e1
+32e6
+32eb
+32f0
+32f4
+32f8
+ff69
+ff6d
+ff6f
+ff73
+ff78
+ff7d
+ff82
+ff87
+ff8c
+ff91
+ff95
+ff99
+3045 3046
+304f 3050
+3059 305a
+3063 3065
+306c
+3075 3077
+3080
+3085 3086
+308b
+3094
END
diff --git a/contrib/perl5/lib/unicode/Is/SylV.pl b/contrib/perl5/lib/unicode/Is/SylV.pl
index ec287c4..e5a39ed 100644
--- a/contrib/perl5/lib/unicode/Is/SylV.pl
+++ b/contrib/perl5/lib/unicode/Is/SylV.pl
@@ -1,5 +1,54 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+1200
+1208
+1210
+1218
+1220
+1228
+1230
+1238
+1240
+1250
+1260
+1268
+1270
+1278
+1280
+1290
+1298
+12a0
+12a8
+12b8
+12c8
+12d0
+12d8
+12e0
+12e8
+12f0
+12f8
+1300
+1308
+1318
+1320
+1328
+1330
+1338
+1340
+1348
+1350
+13a5
+13ac
+13b2
+13b8
+13c5
+13cb
+13d2
+13db
+13e2
+13e8
+13ee
+13f4
END
diff --git a/contrib/perl5/lib/unicode/Is/SylWA.pl b/contrib/perl5/lib/unicode/Is/SylWA.pl
index ec287c4..39e94ca 100644
--- a/contrib/perl5/lib/unicode/Is/SylWA.pl
+++ b/contrib/perl5/lib/unicode/Is/SylWA.pl
@@ -1,5 +1,49 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+120f
+1217
+121f
+1227
+122f
+1237
+123f
+124b
+125b
+1267
+126f
+1277
+127f
+128b
+1297
+129f
+12a7
+12b3
+12c3
+12df
+12e7
+12f7
+12ff
+1307
+1313
+1327
+132f
+1337
+133f
+134f
+1357
+1417 1418
+1444 1445
+1461 1462
+147e 147f
+149c 149d
+14b6 14b7
+14cb 14cc
+14e6 14e7
+1500 1501
+150c 150f
+1521 1522
+1539 153a
+15db
END
diff --git a/contrib/perl5/lib/unicode/Is/SylWC.pl b/contrib/perl5/lib/unicode/Is/SylWC.pl
index ec287c4..4272b89 100644
--- a/contrib/perl5/lib/unicode/Is/SylWC.pl
+++ b/contrib/perl5/lib/unicode/Is/SylWC.pl
@@ -1,5 +1,13 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+124d
+125d
+128d
+12b5
+12c5
+1315
+1484
+1507
END
diff --git a/contrib/perl5/lib/unicode/Is/SylWE.pl b/contrib/perl5/lib/unicode/Is/SylWE.pl
index ec287c4..c4c5ba9 100644
--- a/contrib/perl5/lib/unicode/Is/SylWE.pl
+++ b/contrib/perl5/lib/unicode/Is/SylWE.pl
@@ -1,5 +1,23 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+124c
+125c
+128c
+12b4
+12c4
+1314
+140c 140d
+143a 143b
+1457 1458
+1474 1475
+1492 1493
+14ac 14ad
+14c9 14ca
+14dc 14dd
+14f6 14f7
+1517 1518
+152f 1530
+15d8
END
diff --git a/contrib/perl5/lib/unicode/Is/SylWI.pl b/contrib/perl5/lib/unicode/Is/SylWI.pl
index ec287c4..c914b07 100644
--- a/contrib/perl5/lib/unicode/Is/SylWI.pl
+++ b/contrib/perl5/lib/unicode/Is/SylWI.pl
@@ -1,5 +1,22 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+124a
+125a
+128a
+12b2
+12c2
+1312
+140e 140f
+143c 143d
+1459 145a
+1476 1477
+1494 1495
+14ae 14af
+14de 14df
+14f8 14f9
+1519 151a
+1531 1532
+15da
END
diff --git a/contrib/perl5/lib/unicode/Is/SylWV.pl b/contrib/perl5/lib/unicode/Is/SylWV.pl
index ec287c4..6a06ae9 100644
--- a/contrib/perl5/lib/unicode/Is/SylWV.pl
+++ b/contrib/perl5/lib/unicode/Is/SylWV.pl
@@ -1,5 +1,11 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+1248
+1258
+1288
+12b0
+12c0
+1310
END
diff --git a/contrib/perl5/lib/unicode/Is/Upper.pl b/contrib/perl5/lib/unicode/Is/Upper.pl
index 8dde274..16f8752 100644
--- a/contrib/perl5/lib/unicode/Is/Upper.pl
+++ b/contrib/perl5/lib/unicode/Is/Upper.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0041 005a
@@ -86,9 +86,9 @@ return <<'END';
01b5
01b7 01b8
01bc
-01c4
-01c7
-01ca
+01c4 01c5
+01c7 01c8
+01ca 01cb
01cd
01cf
01d1
@@ -106,7 +106,7 @@ return <<'END';
01ea
01ec
01ee
-01f1
+01f1 01f2
01f4
01f6 01f8
01fa
@@ -355,11 +355,14 @@ return <<'END';
1f5d
1f5f
1f68 1f6f
-1fb8 1fbb
-1fc8 1fcb
+1f88 1f8f
+1f98 1f9f
+1fa8 1faf
+1fb8 1fbc
+1fc8 1fcc
1fd8 1fdb
1fe8 1fec
-1ff8 1ffb
+1ff8 1ffc
2102
2107
210b 210d
diff --git a/contrib/perl5/lib/unicode/Is/Word.pl b/contrib/perl5/lib/unicode/Is/Word.pl
index 23186bd..6ea32e6 100644
--- a/contrib/perl5/lib/unicode/Is/Word.pl
+++ b/contrib/perl5/lib/unicode/Is/Word.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0030 0039
@@ -7,17 +7,23 @@ return <<'END';
005f
0061 007a
00aa
+00b2 00b3
00b5
-00ba
+00b9 00ba
+00bc 00be
00c0 00d6
00d8 00f6
-00f8 01c4
-01c6 01c7
-01c9 01ca
-01cc 01f1
-01f3 021f
+00f8 021f
0222 0233
0250 02ad
+02b0 02b8
+02bb 02c1
+02d0 02d1
+02e0 02e4
+02ee
+0300 034e
+0360 0362
+037a
0386
0388 038a
038c
@@ -26,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
@@ -65,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
@@ -76,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
@@ -100,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
@@ -142,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
@@ -188,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
@@ -211,20 +282,20 @@ return <<'END';
1f5b
1f5d
1f5f 1f7d
-1f80 1f87
-1f90 1f97
-1fa0 1fa7
-1fb0 1fb4
-1fb6 1fbb
+1f80 1fb4
+1fb6 1fbc
1fbe
1fc2 1fc4
-1fc6 1fcb
+1fc6 1fcc
1fd0 1fd3
1fd6 1fdb
1fe0 1fec
1ff2 1ff4
-1ff6 1ffb
-207f
+1ff6 1ffc
+2070
+2074 2079
+207f 2089
+20d0 20e3
2102
2107
210a 2113
@@ -236,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
@@ -249,8 +333,7 @@ ac00 d7a3
f900 fa2d
fb00 fb06
fb13 fb17
-fb1d
-fb1f fb28
+fb1d fb28
fb2a fb36
fb38 fb3c
fb3e
@@ -261,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/contrib/perl5/lib/unicode/Is/XDigit.pl b/contrib/perl5/lib/unicode/Is/XDigit.pl
index e556825..b26a3b4 100644
--- a/contrib/perl5/lib/unicode/Is/XDigit.pl
+++ b/contrib/perl5/lib/unicode/Is/XDigit.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0030 0039
diff --git a/contrib/perl5/lib/unicode/Is/Z.pl b/contrib/perl5/lib/unicode/Is/Z.pl
index 22a9792..03416c0 100644
--- a/contrib/perl5/lib/unicode/Is/Z.pl
+++ b/contrib/perl5/lib/unicode/Is/Z.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0020
diff --git a/contrib/perl5/lib/unicode/Is/Zl.pl b/contrib/perl5/lib/unicode/Is/Zl.pl
index 0989e1d..5f127ce 100644
--- a/contrib/perl5/lib/unicode/Is/Zl.pl
+++ b/contrib/perl5/lib/unicode/Is/Zl.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2028
diff --git a/contrib/perl5/lib/unicode/Is/Zp.pl b/contrib/perl5/lib/unicode/Is/Zp.pl
index 3b23446..4e38303 100644
--- a/contrib/perl5/lib/unicode/Is/Zp.pl
+++ b/contrib/perl5/lib/unicode/Is/Zp.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
2029
diff --git a/contrib/perl5/lib/unicode/Is/Zs.pl b/contrib/perl5/lib/unicode/Is/Zs.pl
index db18055..56cf9e4 100644
--- a/contrib/perl5/lib/unicode/Is/Zs.pl
+++ b/contrib/perl5/lib/unicode/Is/Zs.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0020
diff --git a/contrib/perl5/lib/unicode/Jamo.txt b/contrib/perl5/lib/unicode/Jamo.txt
index 6910ab9..ea288f03 100644
--- a/contrib/perl5/lib/unicode/Jamo.txt
+++ b/contrib/perl5/lib/unicode/Jamo.txt
@@ -1,69 +1,91 @@
-#Value; Short Name; Unicode Name
-U+1100; G; HANGUL CHOSEONG KIYEOK
-U+1101; GG; HANGUL CHOSEONG SSANGKIYEOK
-U+1102; N; HANGUL CHOSEONG NIEUN
-U+1103; D; HANGUL CHOSEONG TIKEUT
-U+1104; DD; HANGUL CHOSEONG SSANGTIKEUT
-U+1105; R; HANGUL CHOSEONG RIEUL
-U+1106; M; HANGUL CHOSEONG MIEUM
-U+1107; B; HANGUL CHOSEONG PIEUP
-U+1108; BB; HANGUL CHOSEONG SSANGPIEUP
-U+1109; S; HANGUL CHOSEONG SIOS
-U+110A; SS; HANGUL CHOSEONG SSANGSIOS
-U+110B; ; HANGUL CHOSEONG IEUNG
-U+110C; J; HANGUL CHOSEONG CIEUC
-U+110D; JJ; HANGUL CHOSEONG SSANGCIEUC
-U+110E; C; HANGUL CHOSEONG CHIEUCH
-U+110F; K; HANGUL CHOSEONG KHIEUKH
-U+1110; T; HANGUL CHOSEONG THIEUTH
-U+1111; P; HANGUL CHOSEONG PHIEUPH
-U+1112; H; HANGUL CHOSEONG HIEUH
-U+1161; A; HANGUL JUNGSEONG A
-U+1162; AE; HANGUL JUNGSEONG AE
-U+1163; YA; HANGUL JUNGSEONG YA
-U+1164; YAE; HANGUL JUNGSEONG YAE
-U+1165; EO; HANGUL JUNGSEONG EO
-U+1166; E; HANGUL JUNGSEONG E
-U+1167; YEO; HANGUL JUNGSEONG YEO
-U+1168; YE; HANGUL JUNGSEONG YE
-U+1169; O; HANGUL JUNGSEONG O
-U+116A; WA; HANGUL JUNGSEONG WA
-U+116B; WAE; HANGUL JUNGSEONG WAE
-U+116C; OE; HANGUL JUNGSEONG OE
-U+116D; YO; HANGUL JUNGSEONG YO
-U+116E; U; HANGUL JUNGSEONG U
-U+116F; WEO; HANGUL JUNGSEONG WEO
-U+1170; WE; HANGUL JUNGSEONG WE
-U+1171; WI; HANGUL JUNGSEONG WI
-U+1172; YU; HANGUL JUNGSEONG YU
-U+1173; EU; HANGUL JUNGSEONG EU
-U+1174; YI; HANGUL JUNGSEONG YI
-U+1175; I; HANGUL JUNGSEONG I
-U+11A8; G; HANGUL JONGSEONG KIYEOK
-U+11A9; GG; HANGUL JONGSEONG SSANGKIYEOK
-U+11AA; GS; HANGUL JONGSEONG KIYEOK-SIOS
-U+11AB; N; HANGUL JONGSEONG NIEUN
-U+11AC; NJ; HANGUL JONGSEONG NIEUN-CIEUC
-U+11AD; NH; HANGUL JONGSEONG NIEUN-HIEUH
-U+11AE; D; HANGUL JONGSEONG TIKEUT
-U+11AF; L; HANGUL JONGSEONG RIEUL
-U+11B0; LG; HANGUL JONGSEONG RIEUL-KIYEOK
-U+11B1; LM; HANGUL JONGSEONG RIEUL-MIEUM
-U+11B2; LB; HANGUL JONGSEONG RIEUL-PIEUP
-U+11B3; LS; HANGUL JONGSEONG RIEUL-SIOS
-U+11B4; LT; HANGUL JONGSEONG RIEUL-THIEUTH
-U+11B5; LP; HANGUL JONGSEONG RIEUL-PHIEUPH
-U+11B6; LH; HANGUL JONGSEONG RIEUL-HIEUH
-U+11B7; M; HANGUL JONGSEONG MIEUM
-U+11B8; B; HANGUL JONGSEONG PIEUP
-U+11B9; BS; HANGUL JONGSEONG PIEUP-SIOS
-U+11BA; S; HANGUL JONGSEONG SIOS
-U+11BB; SS; HANGUL JONGSEONG SSANGSIOS
-U+11BC; NG; HANGUL JONGSEONG IEUNG
-U+11BD; J; HANGUL JONGSEONG CIEUC
-U+11BE; C; HANGUL JONGSEONG CHIEUCH
-U+11BF; K; HANGUL JONGSEONG KHIEUKH
-U+11C0; T; HANGUL JONGSEONG THIEUTH
-U+11C1; P; HANGUL JONGSEONG PHIEUPH
-U+11C2; H; HANGUL JONGSEONG HIEUH
+# Jamo-3.txt
+#
+# This file is a normative contributory data file in the
+# Unicode Character Database.
+#
+# This file defines the Jamo Short Name property, repeating
+# in machine readable form the information printed in Table 4-4
+# of The Unicode Standard, Version 3.0.
+#
+# See sections 3.11 and 4.4 of The Unicode Standard, Version 3.0
+# for more information.
+#
+# Each line contains two fields, separated by a semicolon.
+#
+# The first field gives the code point, in 4-digit hexadecimal
+# form, of a combining jamo character that participates in
+# the algorithmic determination Hangul syllable character names.
+# The second field gives the Jamo Short Name as a one-, two-,
+# or three-character ASCII string (or in one case, for U+110B,
+# the null string).
+#
+# #############################################################
+
+1100; G # HANGUL CHOSEONG KIYEOK
+1101; GG # HANGUL CHOSEONG SSANGKIYEOK
+1102; N # HANGUL CHOSEONG NIEUN
+1103; D # HANGUL CHOSEONG TIKEUT
+1104; DD # HANGUL CHOSEONG SSANGTIKEUT
+1105; R # HANGUL CHOSEONG RIEUL
+1106; M # HANGUL CHOSEONG MIEUM
+1107; B # HANGUL CHOSEONG PIEUP
+1108; BB # HANGUL CHOSEONG SSANGPIEUP
+1109; S # HANGUL CHOSEONG SIOS
+110A; SS # HANGUL CHOSEONG SSANGSIOS
+110B; # HANGUL CHOSEONG IEUNG
+110C; J # HANGUL CHOSEONG CIEUC
+110D; JJ # HANGUL CHOSEONG SSANGCIEUC
+110E; C # HANGUL CHOSEONG CHIEUCH
+110F; K # HANGUL CHOSEONG KHIEUKH
+1110; T # HANGUL CHOSEONG THIEUTH
+1111; P # HANGUL CHOSEONG PHIEUPH
+1112; H # HANGUL CHOSEONG HIEUH
+1161; A # HANGUL JUNGSEONG A
+1162; AE # HANGUL JUNGSEONG AE
+1163; YA # HANGUL JUNGSEONG YA
+1164; YAE # HANGUL JUNGSEONG YAE
+1165; EO # HANGUL JUNGSEONG EO
+1166; E # HANGUL JUNGSEONG E
+1167; YEO # HANGUL JUNGSEONG YEO
+1168; YE # HANGUL JUNGSEONG YE
+1169; O # HANGUL JUNGSEONG O
+116A; WA # HANGUL JUNGSEONG WA
+116B; WAE # HANGUL JUNGSEONG WAE
+116C; OE # HANGUL JUNGSEONG OE
+116D; YO # HANGUL JUNGSEONG YO
+116E; U # HANGUL JUNGSEONG U
+116F; WEO # HANGUL JUNGSEONG WEO
+1170; WE # HANGUL JUNGSEONG WE
+1171; WI # HANGUL JUNGSEONG WI
+1172; YU # HANGUL JUNGSEONG YU
+1173; EU # HANGUL JUNGSEONG EU
+1174; YI # HANGUL JUNGSEONG YI
+1175; I # HANGUL JUNGSEONG I
+11A8; G # HANGUL JONGSEONG KIYEOK
+11A9; GG # HANGUL JONGSEONG SSANGKIYEOK
+11AA; GS # HANGUL JONGSEONG KIYEOK-SIOS
+11AB; N # HANGUL JONGSEONG NIEUN
+11AC; NJ # HANGUL JONGSEONG NIEUN-CIEUC
+11AD; NH # HANGUL JONGSEONG NIEUN-HIEUH
+11AE; D # HANGUL JONGSEONG TIKEUT
+11AF; L # HANGUL JONGSEONG RIEUL
+11B0; LG # HANGUL JONGSEONG RIEUL-KIYEOK
+11B1; LM # HANGUL JONGSEONG RIEUL-MIEUM
+11B2; LB # HANGUL JONGSEONG RIEUL-PIEUP
+11B3; LS # HANGUL JONGSEONG RIEUL-SIOS
+11B4; LT # HANGUL JONGSEONG RIEUL-THIEUTH
+11B5; LP # HANGUL JONGSEONG RIEUL-PHIEUPH
+11B6; LH # HANGUL JONGSEONG RIEUL-HIEUH
+11B7; M # HANGUL JONGSEONG MIEUM
+11B8; B # HANGUL JONGSEONG PIEUP
+11B9; BS # HANGUL JONGSEONG PIEUP-SIOS
+11BA; S # HANGUL JONGSEONG SIOS
+11BB; SS # HANGUL JONGSEONG SSANGSIOS
+11BC; NG # HANGUL JONGSEONG IEUNG
+11BD; J # HANGUL JONGSEONG CIEUC
+11BE; C # HANGUL JONGSEONG CHIEUCH
+11BF; K # HANGUL JONGSEONG KHIEUKH
+11C0; T # HANGUL JONGSEONG THIEUTH
+11C1; P # HANGUL JONGSEONG PHIEUPH
+11C2; H # HANGUL JONGSEONG HIEUH
diff --git a/contrib/perl5/lib/unicode/JamoShort.pl b/contrib/perl5/lib/unicode/JamoShort.pl
index 760bcba..19cd429 100644
--- a/contrib/perl5/lib/unicode/JamoShort.pl
+++ b/contrib/perl5/lib/unicode/JamoShort.pl
@@ -1,72 +1,72 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
-1100 G
-1101 GG
-1102 N
-1103 D
-1104 DD
-1105 R
-1106 M
-1107 B
-1108 BB
-1109 S
-110a SS
-110b
-110c J
-110d JJ
-110e C
-110f K
-1110 T
-1111 P
-1112 H
-1161 A
-1162 AE
-1163 YA
-1164 YAE
-1165 EO
-1166 E
-1167 YEO
-1168 YE
-1169 O
-116a WA
-116b WAE
-116c OE
-116d YO
-116e U
-116f WEO
-1170 WE
-1171 WI
-1172 YU
-1173 EU
-1174 YI
-1175 I
-11a8 G
-11a9 GG
-11aa GS
-11ab N
-11ac NJ
-11ad NH
-11ae D
-11af L
-11b0 LG
-11b1 LM
-11b2 LB
-11b3 LS
-11b4 LT
-11b5 LP
-11b6 LH
-11b7 M
-11b8 B
-11b9 BS
-11ba S
-11bb SS
-11bc NG
-11bd J
-11be C
-11bf K
-11c0 T
-11c1 P
-11c2 H
+1100 G # HANGUL CHOSEONG KIYEOK
+1101 GG # HANGUL CHOSEONG SSANGKIYEOK
+1102 N # HANGUL CHOSEONG NIEUN
+1103 D # HANGUL CHOSEONG TIKEUT
+1104 DD # HANGUL CHOSEONG SSANGTIKEUT
+1105 R # HANGUL CHOSEONG RIEUL
+1106 M # HANGUL CHOSEONG MIEUM
+1107 B # HANGUL CHOSEONG PIEUP
+1108 BB # HANGUL CHOSEONG SSANGPIEUP
+1109 S # HANGUL CHOSEONG SIOS
+110a SS # HANGUL CHOSEONG SSANGSIOS
+110b # HANGUL CHOSEONG IEUNG
+110c J # HANGUL CHOSEONG CIEUC
+110d JJ # HANGUL CHOSEONG SSANGCIEUC
+110e C # HANGUL CHOSEONG CHIEUCH
+110f K # HANGUL CHOSEONG KHIEUKH
+1110 T # HANGUL CHOSEONG THIEUTH
+1111 P # HANGUL CHOSEONG PHIEUPH
+1112 H # HANGUL CHOSEONG HIEUH
+1161 A # HANGUL JUNGSEONG A
+1162 AE # HANGUL JUNGSEONG AE
+1163 YA # HANGUL JUNGSEONG YA
+1164 YAE # HANGUL JUNGSEONG YAE
+1165 EO # HANGUL JUNGSEONG EO
+1166 E # HANGUL JUNGSEONG E
+1167 YEO # HANGUL JUNGSEONG YEO
+1168 YE # HANGUL JUNGSEONG YE
+1169 O # HANGUL JUNGSEONG O
+116a WA # HANGUL JUNGSEONG WA
+116b WAE # HANGUL JUNGSEONG WAE
+116c OE # HANGUL JUNGSEONG OE
+116d YO # HANGUL JUNGSEONG YO
+116e U # HANGUL JUNGSEONG U
+116f WEO # HANGUL JUNGSEONG WEO
+1170 WE # HANGUL JUNGSEONG WE
+1171 WI # HANGUL JUNGSEONG WI
+1172 YU # HANGUL JUNGSEONG YU
+1173 EU # HANGUL JUNGSEONG EU
+1174 YI # HANGUL JUNGSEONG YI
+1175 I # HANGUL JUNGSEONG I
+11a8 G # HANGUL JONGSEONG KIYEOK
+11a9 GG # HANGUL JONGSEONG SSANGKIYEOK
+11aa GS # HANGUL JONGSEONG KIYEOK-SIOS
+11ab N # HANGUL JONGSEONG NIEUN
+11ac NJ # HANGUL JONGSEONG NIEUN-CIEUC
+11ad NH # HANGUL JONGSEONG NIEUN-HIEUH
+11ae D # HANGUL JONGSEONG TIKEUT
+11af L # HANGUL JONGSEONG RIEUL
+11b0 LG # HANGUL JONGSEONG RIEUL-KIYEOK
+11b1 LM # HANGUL JONGSEONG RIEUL-MIEUM
+11b2 LB # HANGUL JONGSEONG RIEUL-PIEUP
+11b3 LS # HANGUL JONGSEONG RIEUL-SIOS
+11b4 LT # HANGUL JONGSEONG RIEUL-THIEUTH
+11b5 LP # HANGUL JONGSEONG RIEUL-PHIEUPH
+11b6 LH # HANGUL JONGSEONG RIEUL-HIEUH
+11b7 M # HANGUL JONGSEONG MIEUM
+11b8 B # HANGUL JONGSEONG PIEUP
+11b9 BS # HANGUL JONGSEONG PIEUP-SIOS
+11ba S # HANGUL JONGSEONG SIOS
+11bb SS # HANGUL JONGSEONG SSANGSIOS
+11bc NG # HANGUL JONGSEONG IEUNG
+11bd J # HANGUL JONGSEONG CIEUC
+11be C # HANGUL JONGSEONG CHIEUCH
+11bf K # HANGUL JONGSEONG KHIEUKH
+11c0 T # HANGUL JONGSEONG THIEUTH
+11c1 P # HANGUL JONGSEONG PHIEUPH
+11c2 H # HANGUL JONGSEONG HIEUH
END
diff --git a/contrib/perl5/lib/unicode/Makefile b/contrib/perl5/lib/unicode/Makefile
index c68fa3a..af5e77b 100644
--- a/contrib/perl5/lib/unicode/Makefile
+++ b/contrib/perl5/lib/unicode/Makefile
@@ -1,6 +1,5 @@
all:
- ./mktables.PL
- ./MakeEthiopicSyllables.PL
+ ../../miniperl -I../../lib ./mktables.PL
clean:
rm -f *.pl */*.pl
diff --git a/contrib/perl5/lib/unicode/Name.pl b/contrib/perl5/lib/unicode/Name.pl
index ef8979f..f5c4c56 100644
--- a/contrib/perl5/lib/unicode/Name.pl
+++ b/contrib/perl5/lib/unicode/Name.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0000 001f <control>
@@ -10549,4 +10549,6 @@ fffa INTERLINEAR ANNOTATION SEPARATOR
fffb INTERLINEAR ANNOTATION TERMINATOR
fffc OBJECT REPLACEMENT CHARACTER
fffd REPLACEMENT CHARACTER
+f0000 ffffd <Plane 15 Private Use, First>
+100000 10fffd <Plane 16 Private Use, First>
END
diff --git a/contrib/perl5/lib/unicode/Number.pl b/contrib/perl5/lib/unicode/Number.pl
index b0e054a..1f5c2c8 100644
--- a/contrib/perl5/lib/unicode/Number.pl
+++ b/contrib/perl5/lib/unicode/Number.pl
@@ -1,7 +1,8 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
+0030 0
0031 1
0032 2
0033 3
@@ -17,6 +18,7 @@ return <<'END';
00bc 1/4
00bd 1/2
00be 3/4
+0660 0
0661 1
0662 2
0663 3
@@ -26,6 +28,7 @@ return <<'END';
0667 7
0668 8
0669 9
+06f0 0
06f1 1
06f2 2
06f3 3
@@ -35,6 +38,7 @@ return <<'END';
06f7 7
06f8 8
06f9 9
+0966 0
0967 1
0968 2
0969 3
@@ -44,6 +48,7 @@ return <<'END';
096d 7
096e 8
096f 9
+09e6 0
09e7 1
09e8 2
09e9 3
@@ -58,6 +63,7 @@ return <<'END';
09f6 3
09f7 4
09f9 16
+0a66 0
0a67 1
0a68 2
0a69 3
@@ -67,6 +73,7 @@ return <<'END';
0a6d 7
0a6e 8
0a6f 9
+0ae6 0
0ae7 1
0ae8 2
0ae9 3
@@ -76,6 +83,7 @@ return <<'END';
0aed 7
0aee 8
0aef 9
+0b66 0
0b67 1
0b68 2
0b69 3
@@ -97,6 +105,7 @@ return <<'END';
0bf0 10
0bf1 100
0bf2 1000
+0c66 0
0c67 1
0c68 2
0c69 3
@@ -106,6 +115,7 @@ return <<'END';
0c6d 7
0c6e 8
0c6f 9
+0ce6 0
0ce7 1
0ce8 2
0ce9 3
@@ -115,6 +125,7 @@ return <<'END';
0ced 7
0cee 8
0cef 9
+0d66 0
0d67 1
0d68 2
0d69 3
@@ -124,6 +135,7 @@ return <<'END';
0d6d 7
0d6e 8
0d6f 9
+0e50 0
0e51 1
0e52 2
0e53 3
@@ -133,6 +145,7 @@ return <<'END';
0e57 7
0e58 8
0e59 9
+0ed0 0
0ed1 1
0ed2 2
0ed3 3
@@ -142,6 +155,7 @@ return <<'END';
0ed7 7
0ed8 8
0ed9 9
+0f20 0
0f21 1
0f22 2
0f23 3
@@ -151,6 +165,17 @@ return <<'END';
0f27 7
0f28 8
0f29 9
+0f2a 1/2
+0f2b 3/2
+0f2c 5/2
+0f2d 7/2
+0f2e 9/2
+0f2f 11/2
+0f30 13/2
+0f31 15/2
+0f32 17/2
+0f33 -1/2
+1040 0
1041 1
1042 2
1043 3
@@ -183,6 +208,7 @@ return <<'END';
16ee 17
16ef 18
16f0 19
+17e0 0
17e1 1
17e2 2
17e3 3
@@ -192,6 +218,7 @@ return <<'END';
17e7 7
17e8 8
17e9 9
+1810 0
1811 1
1812 2
1813 3
@@ -201,12 +228,14 @@ return <<'END';
1817 7
1818 8
1819 9
+2070 0
2074 4
2075 5
2076 6
2077 7
2078 8
2079 9
+2080 0
2081 1
2082 2
2083 3
@@ -322,6 +351,7 @@ return <<'END';
2499 18
249a 19
249b 20
+24ea 0
2776 1
2777 2
2778 3
@@ -352,6 +382,7 @@ return <<'END';
2791 8
2792 9
2793 10
+3007 0
3021 1
3022 2
3023 3
@@ -364,6 +395,20 @@ return <<'END';
3038 10
3039 20
303a 30
+3192 1
+3193 2
+3194 3
+3195 4
+3220 1
+3221 2
+3222 3
+3223 4
+3224 5
+3225 6
+3226 7
+3227 8
+3228 9
+3229 10
3280 1
3281 2
3282 3
@@ -374,6 +419,7 @@ return <<'END';
3287 8
3288 9
3289 10
+ff10 0
ff11 1
ff12 2
ff13 3
diff --git a/contrib/perl5/lib/unicode/ReadMe.txt b/contrib/perl5/lib/unicode/ReadMe.txt
index c2c4aee..b8a643c 100644
--- a/contrib/perl5/lib/unicode/ReadMe.txt
+++ b/contrib/perl5/lib/unicode/ReadMe.txt
@@ -1,45 +1,13 @@
-June 23, 1999
+August 30, 2000
-This directory contains the initial release for Unicode 3.0.
+This directory contains the first update release for Unicode 3.0.
This release consists of corrections and additions to the
-Unicode Character Database, to match the publication of
-The Unicode Standard, Version 3.0.
+Unicode Character Database for the Unicode Standard,
+Version 3.0.1.
Detailed documentation of the files constituting the
Unicode Character Database (contributory data files for
the standard itself) can now be found in
UnicodeCharacterDatabase.html.
---------------------------------------------------------------------------
-NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
-
-The files have been copied from
-
- ftp://ftp.unicode.org/Public/3.0-Update/
-
-and most of them have been renamed to better fit 8.3 filename limitations.
-
-long name at unicode.org short name latest '#'
------------------------- ---------- ----------
-ArabicShaping-#.txt ArabShap.txt 2
-Blocks-#.txt Blocks.txt 3
-CompositionExclusions-#.txt CompExcl.txt 1
-EastAsianWidth-#.txt EAWidth.txt 3
-Index-#.txt Index.txt 3.0.0
-Jamo-#.txt Jamo.txt 2
-LineBreak-#.txt LineBrk.txt 5
-NamesList-#.txt Names.txt 3.0.0
-NamesList-#.html NamesList.html 1
-PropList-#.txt Props.txt 3.0.0
-SpecialCasing-#.txt SpecCase.txt 2
-UnicodeData-#.txt Unicode.300 3.0.0
-UnicodeData-#.html Unicode3.html 3.0.0
-UnicodeCharacterDatabase-#.html UCD300.html 3.0.0
-
-The *.pl files are generated from these files by the 'mktables.PL' script.
-
-While the files have been renamed the links in the html files haven't.
-
---
-jhi@iki.fi
diff --git a/contrib/perl5/lib/unicode/SpecCase.txt b/contrib/perl5/lib/unicode/SpecCase.txt
index af002ef..94662d3 100644
--- a/contrib/perl5/lib/unicode/SpecCase.txt
+++ b/contrib/perl5/lib/unicode/SpecCase.txt
@@ -1,4 +1,4 @@
-# SpecialCasing-2.txt
+# SpecialCasing-3.txt
#
# Special Casing Properties
#
@@ -26,26 +26,33 @@
# <upper> := <code_point_list>
# <code_point_list> := <code_point> (<s>+ <code_point>)*
# <code_point> := <hex><hex><hex><hex>
-# <hex> := [0-1A-Fa-f]
+# <hex> := [0-9A-Fa-f]
# <s> := <space>
#
-# <condition_list> := <locale>? (<s>+ <context>)*
-# <locale> := <ISO_3166_code> ( "_" <ISO_639_code> )? ( "_" <variant> )?
+# <condition_list> := <locale>? (<s>+ <context>)* <sep>
+# <locale> := <ISO_639_code> ( "_" <ISO_3166_code> )? ( "_" <variant> )?
# <ISO_3166_code> := 2-letter country code,
# as in http://www.unicode.org/unicode/onlinedat/countries.html
# <ISO_639_code> := 2-letter code,
# as in http://www.unicode.org/unicode/onlinedat/languages.html
-# <context> := "FINAL" | "NON_FINAL" | "MODERN" | "NON_MODERN"
+# <context> := "FINAL" | "NON_FINAL" | "MODERN" | "NON_MODERN" | "AFTER_i"
+#
+# A condition list overrides the normal behavior if all of the listed conditions are true.
+# Case distinctions in the condition list are not significant.
#
-# A condition list overrides the normal behavior if any of the listed conditions is true.
# FINAL: The letter is not followed by a letter of category L* (e.g. Ll, Lt, Lu, Lm, or Lo).
# MODERN: The mapping is only used for modern text.
+# AFTER_i: The last base character was "i" 0069
+#
# Conditions preceded by "NON_" represent the negation of the condition
#
# New contexts may be added in the future.
-# Parsers of this file must be prepared to deal with that situation.
# Additional whitespace around elements is optional. Blank lines are ignored in parsing.
# On any line, all text following "#" is a comment, and are ignored in parsing.
+#
+# Parsers of this file must be prepared to deal future additions to this format:
+# * Additional contexts
+# * Additional fields
# ================================================================================
# ================================================================================
@@ -76,7 +83,7 @@ FB17; FB17; 0544 056D; 0544 053D; # ARMENIAN SMALL LIGATURE MEN XEH
# No corresponding uppercase precomposed character
-0149; 0149; 02BC 006E; 02BC 004E; # LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
+0149; 0149; 02BC 004E; 02BC 004E; # LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
0390; 0390; 0399 0308 0301; 0399 0308 0301; # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
03B0; 03B0; 03A5 0308 0301; 03A5 0308 0301; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
01F0; 01F0; 004A 030C; 004A 030C; # LATIN SMALL LETTER J WITH CARON
@@ -199,7 +206,7 @@ FB17; FB17; 0544 056D; 0544 053D; # ARMENIAN SMALL LIGATURE MEN XEH
# 03C3; 03C3; 03A3; 03A3; # GREEK SMALL LETTER SIGMA
# 03C2; 03C2; 03A3; 03A3; # GREEK SMALL LETTER FINAL SIGMA
-# Note: the following cases are not included, since they would normalize in lowercasing
+# Note: the following cases are not included, since they would case-fold in lowercasing
# 03C3; 03C2; 03A3; 03A3; FINAL; # GREEK SMALL LETTER SIGMA
# 03C2; 03C3; 03A3; 03A3; NON_FINAL; # GREEK SMALL LETTER FINAL SIGMA
@@ -208,12 +215,16 @@ FB17; FB17; 0544 056D; 0544 053D; # ARMENIAN SMALL LIGATURE MEN XEH
# Locale-sensitive mappings
# ================================================================================
+# Lithuanian
+
+0307; 0307; ; ; lt AFTER_i; # Remove DOT ABOVE after "i" with upper or titlecase
+
# Turkish
-0049; 0131; 0049; 0049; TR; # LATIN CAPITAL LETTER I
-0069; 0069; 0130; 0130; TR; # LATIN SMALL LETTER I
+0049; 0131; 0049; 0049; tr; # LATIN CAPITAL LETTER I
+0069; 0069; 0130; 0130; tr; # LATIN SMALL LETTER I
# Note: the following cases are already in the UnicodeData file.
-# 0131; 0131; 0049; 0049; TR; # LATIN SMALL LETTER DOTLESS I
-# 0130; 0069; 0130; 0130; TR; # LATIN CAPITAL LETTER I WITH DOT ABOVE
+# 0131; 0131; 0049; 0049; tr; # LATIN SMALL LETTER DOTLESS I
+# 0130; 0069; 0130; 0130; tr; # LATIN CAPITAL LETTER I WITH DOT ABOVE
diff --git a/contrib/perl5/lib/unicode/To/Digit.pl b/contrib/perl5/lib/unicode/To/Digit.pl
index a96bc1c..4bace1e 100644
--- a/contrib/perl5/lib/unicode/To/Digit.pl
+++ b/contrib/perl5/lib/unicode/To/Digit.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0030 0039 0000
diff --git a/contrib/perl5/lib/unicode/To/Lower.pl b/contrib/perl5/lib/unicode/To/Lower.pl
index a78a7e4..89755b7 100644
--- a/contrib/perl5/lib/unicode/To/Lower.pl
+++ b/contrib/perl5/lib/unicode/To/Lower.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0041 005a 0061
diff --git a/contrib/perl5/lib/unicode/To/Title.pl b/contrib/perl5/lib/unicode/To/Title.pl
index d8f5c04..cadeaf9 100644
--- a/contrib/perl5/lib/unicode/To/Title.pl
+++ b/contrib/perl5/lib/unicode/To/Title.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0061 007a 0041
diff --git a/contrib/perl5/lib/unicode/To/Upper.pl b/contrib/perl5/lib/unicode/To/Upper.pl
index 1fc7637..d6c03d3 100644
--- a/contrib/perl5/lib/unicode/To/Upper.pl
+++ b/contrib/perl5/lib/unicode/To/Upper.pl
@@ -1,5 +1,5 @@
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is built by mktables.PL from e.g. Unicode.300.
+# This file is built by mktables.PL from e.g. Unicode.301.
# Any changes made here will be lost!
return <<'END';
0061 007a 0041
diff --git a/contrib/perl5/lib/unicode/mktables.PL b/contrib/perl5/lib/unicode/mktables.PL
index cef6936..5aca93e 100755
--- a/contrib/perl5/lib/unicode/mktables.PL
+++ b/contrib/perl5/lib/unicode/mktables.PL
@@ -1,28 +1,47 @@
#!../../miniperl
-$UnicodeData = "Unicode.300";
+use bytes;
+
+$UnicodeData = "Unicode.301";
+$SyllableData = "syllables.txt";
+$PropData = "PropList.txt";
+
# Note: we try to keep filenames unique within first 8 chars. Using
# subdirectories for the following helps.
-mkdir "In", 0777;
-mkdir "Is", 0777;
-mkdir "To", 0777;
+mkdir "In", 0755;
+mkdir "Is", 0755;
+mkdir "To", 0755;
@todo = (
# typical
- ['IsWord', '$cat =~ /^L[ulo]|^Nd/ or $code eq "005F"', ''],
- ['IsAlnum', '$cat =~ /^L[ulo]|^Nd/', ''],
- ['IsAlpha', '$cat =~ /^L[ulo]/', ''],
- ['IsSpace', '$cat =~ /^Z/ or $code lt "0020" and chr(hex $code) =~ /^\s/', ''],
+ # 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
+ # 0020: SPACE
+ ['IsSpace', '$cat =~ /^Z/ ||
+ $code =~ /^(0009|000A|000B|000C|000D)$/', ''],
+ ['IsSpacePerl',
+ '$cat =~ /^Z/ ||
+ $code =~ /^(0009|000A|000C|000D)$/', ''],
+ ['IsBlank', '$code =~ /^(0020|0009)$/ ||
+ $cat =~ /^Z[^lp]$/', ''],
['IsDigit', '$cat =~ /^Nd$/', ''],
- ['IsUpper', '$cat =~ /^Lu$/', ''],
+ ['IsUpper', '$cat =~ /^L[ut]$/', ''],
['IsLower', '$cat =~ /^Ll$/', ''],
- ['IsASCII', 'hex $code <= 127', ''],
+ ['IsASCII', '$code le "007f"', ''],
['IsCntrl', '$cat =~ /^C/', ''],
- ['IsGraph', '$cat =~ /^[^C]/ and $code ne "0020"', ''],
- ['IsPrint', '$cat =~ /^[^C]/', ''],
+ ['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'],
@@ -42,12 +61,14 @@ mkdir "To", 0777;
['IsM', '$cat =~ /^M/', ''], # Mark
['IsMn', '$cat eq "Mn"', ''], # Mark, Non-Spacing
['IsMc', '$cat eq "Mc"', ''], # Mark, Combining
+ ['IsMe', '$cat eq "Me"', ''], # Mark, Enclosing
['IsN', '$cat =~ /^N/', ''], # Number
['IsNd', '$cat eq "Nd"', ''], # Number, Decimal Digit
['IsNo', '$cat eq "No"', ''], # Number, Other
+ ['IsNl', '$cat eq "Nl"', ''], # Number, Letter
- ['IsZ', '$cat =~ /^Z/', ''], # Zeparator
+ ['IsZ', '$cat =~ /^Z/', ''], # Separator
['IsZs', '$cat eq "Zs"', ''], # Separator, Space
['IsZl', '$cat eq "Zl"', ''], # Separator, Line
['IsZp', '$cat eq "Zp"', ''], # Separator, Paragraph
@@ -56,6 +77,9 @@ mkdir "To", 0777;
['IsCc', '$cat eq "Cc"', ''], # Other, Control or Format
['IsCo', '$cat eq "Co"', ''], # Other, Private Use
['IsCn', '$cat eq "Cn"', ''], # Other, Not Assigned
+ ['IsCf', '$cat eq "Cf"', ''], # Other, Format
+ ['IsCs', '$cat eq "Cs"', ''], # Other, Surrogate
+ ['IsCn', 'Unassigned Code Value',$PropData], # Other, Not Assigned
# Informative
@@ -71,9 +95,13 @@ mkdir "To", 0777;
['IsPs', '$cat eq "Ps"', ''], # Punctuation, Open
['IsPe', '$cat eq "Pe"', ''], # Punctuation, Close
['IsPo', '$cat eq "Po"', ''], # Punctuation, Other
+ ['IsPc', '$cat eq "Pc"', ''], # Punctuation, Connector
+ ['IsPi', '$cat eq "Pi"', ''], # Punctuation, Initial quote
+ ['IsPf', '$cat eq "Pf"', ''], # Punctuation, Final quote
['IsS', '$cat =~ /^S/', ''], # Symbol
['IsSm', '$cat eq "Sm"', ''], # Symbol, Math
+ ['IsSk', '$cat eq "Sk"', ''], # Symbol, Modifier
['IsSc', '$cat eq "Sc"', ''], # Symbol, Currency
['IsSo', '$cat eq "So"', ''], # Symbol, Other
@@ -94,6 +122,15 @@ mkdir "To", 0777;
# and punctuation specific to
# those scripts
+ ['IsBidiLRE', '$bid eq "LRE"', ''], # Left-to-Right Embedding
+ ['IsBidiLRO', '$bid eq "LRO"', ''], # Left-to-Right Override
+ ['IsBidiAL', '$bid eq "AL"', ''], # Right-to-Left Arabic
+ ['IsBidiRLE', '$bid eq "RLE"', ''], # Right-to-Left Embedding
+ ['IsBidiRLO', '$bid eq "RLO"', ''], # Right-to-Left Override
+ ['IsBidiPDF', '$bid eq "PDF"', ''], # Pop Directional Format
+ ['IsBidiNSM', '$bid eq "NSM"', ''], # Non-Spacing Mark
+ ['IsBidiBN', '$bid eq "BN"', ''], # Boundary Neutral
+
# Weak types:
['IsBidiEN','$bid eq "EN"', ''], # European Number
@@ -122,7 +159,7 @@ mkdir "To", 0777;
['IsDCfont', '$decomp =~ /^<font>/', ''],
['IsDCnoBreak', '$decomp =~ /^<noBreak>/', ''],
['IsDCinitial', '$decomp =~ /^<initial>/', ''],
- ['IsDCinital', '$decomp =~ /^<medial>/', ''],
+ ['IsDCmedial', '$decomp =~ /^<medial>/', ''],
['IsDCfinal', '$decomp =~ /^<final>/', ''],
['IsDCisolated', '$decomp =~ /^<isolated>/', ''],
['IsDCcircle', '$decomp =~ /^<circle>/', ''],
@@ -133,11 +170,12 @@ mkdir "To", 0777;
['IsDCnarrow', '$decomp =~ /^<narrow>/', ''],
['IsDCsmall', '$decomp =~ /^<small>/', ''],
['IsDCsquare', '$decomp =~ /^<square>/', ''],
+ ['IsDCfraction', '$decomp =~ /^<fraction>/', ''],
['IsDCcompat', '$decomp =~ /^<compat>/', ''],
# Number
- ['Number', '$num', '$num'],
+ ['Number', '$num ne ""', '$num'],
# Mirrored
@@ -154,18 +192,41 @@ mkdir "To", 0777;
# Syllables
- ['IsSylV', '$syl eq "V"', ''],
- ['IsSylU', '$syl eq "U"', ''],
- ['IsSylI', '$syl eq "I"', ''],
- ['IsSylA', '$syl eq "A"', ''],
- ['IsSylE', '$syl eq "E"', ''],
- ['IsSylC', '$syl eq "C"', ''],
- ['IsSylO', '$syl eq "O"', ''],
- ['IsSylWV', '$syl eq "V"', ''],
- ['IsSylWI', '$syl eq "I"', ''],
- ['IsSylWA', '$syl eq "A"', ''],
- ['IsSylWE', '$syl eq "E"', ''],
- ['IsSylWC', '$syl eq "C"', ''],
+ syllable_defs(),
+
+# Line break properties - Normative
+
+ ['IsLbrkBK','$brk eq "BK"', ''], # Mandatory Break
+ ['IsLbrkCR','$brk eq "CR"', ''], # Carriage Return
+ ['IsLbrkLF','$brk eq "LF"', ''], # Line Feed
+ ['IsLbrkCM','$brk eq "CM"', ''], # Attached Characters and Combining Marks
+ ['IsLbrkSG','$brk eq "SG"', ''], # Surrogates
+ ['IsLbrkGL','$brk eq "GL"', ''], # Non-breaking (Glue)
+ ['IsLbrkCB','$brk eq "CB"', ''], # Contingent Break Opportunity
+ ['IsLbrkSP','$brk eq "SP"', ''], # Space
+ ['IsLbrkZW','$brk eq "ZW"', ''], # Zero Width Space
+
+# Line break properties - Informative
+ ['IsLbrkXX','$brk eq "XX"', ''], # Unknown
+ ['IsLbrkOP','$brk eq "OP"', ''], # Opening Punctuation
+ ['IsLbrkCL','$brk eq "CL"', ''], # Closing Punctuation
+ ['IsLbrkQU','$brk eq "QU"', ''], # Ambiguous Quotation
+ ['IsLbrkNS','$brk eq "NS"', ''], # Non Starter
+ ['IsLbrkEX','$brk eq "EX"', ''], # Exclamation/Interrogation
+ ['IsLbrkSY','$brk eq "SY"', ''], # Symbols Allowing Breaks
+ ['IsLbrkIS','$brk eq "IS"', ''], # Infix Separator (Numeric)
+ ['IsLbrkPR','$brk eq "PR"', ''], # Prefix (Numeric)
+ ['IsLbrkPO','$brk eq "PO"', ''], # Postfix (Numeric)
+ ['IsLbrkNU','$brk eq "NU"', ''], # Numeric
+ ['IsLbrkAL','$brk eq "AL"', ''], # Ordinary Alphabetic and Symbol Characters
+ ['IsLbrkID','$brk eq "ID"', ''], # Ideographic
+ ['IsLbrkIN','$brk eq "IN"', ''], # Inseparable
+ ['IsLbrkHY','$brk eq "HY"', ''], # Hyphen
+ ['IsLbrkBB','$brk eq "BB"', ''], # Break Opportunity Before
+ ['IsLbrkBA','$brk eq "BA"', ''], # Break Opportunity After
+ ['IsLbrkSA','$brk eq "SA"', ''], # Complex Context (South East Asian)
+ ['IsLbrkAI','$brk eq "AI"', ''], # Ambiguous (Alphabetic or Ideographic)
+ ['IsLbrkB2','$brk eq "B2"', ''], # Break Opportunity Before and After
);
# This is not written for speed...
@@ -197,8 +258,8 @@ END
exit if @ARGV and not grep { $_ eq Block } @ARGV;
print "Block\n";
-open(UD, 'Blocks.txt') or die "Can't open blocks.txt: $!\n";
-open(OUT, ">Block.pl") or die "Can't create $table.pl: $!\n";
+open(UD, 'Blocks.txt') or die "Can't open Blocks.txt: $!\n";
+open(OUT, ">Block.pl") or die "Can't create Block.pl: $!\n";
print OUT <<EOH;
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
# This file is built by $0 from e.g. $UnicodeData.
@@ -242,6 +303,8 @@ sub proplist {
my $out;
my $split;
+ return listFromPropFile($wanted) if $val eq $PropData;
+
if ($table =~ /^Arab/) {
open(UD, "ArabShap.txt") or warn "Can't open $table: $!";
@@ -253,10 +316,15 @@ sub proplist {
$split = '($code, $short, $name) = split(/; */); $code =~ s/^U\+//;';
}
elsif ($table =~ /^IsSyl/) {
- open(UD, "syllables.txt") or warn "Can't open $table: $!";
+ open(UD, $SyllableData) or warn "Can't open $table: $!";
$split = '($code, $short, $syl) = split(/; */); $code =~ s/^U\+//;';
}
+ elsif ($table =~ /^IsLbrk/) {
+ open(UD, "LineBrk.txt") or warn "Can't open $table: $!";
+
+ $split = '($code, $brk, $name) = split(/;/);';
+ }
else {
open(UD, $UnicodeData) or warn "Can't open $UnicodeData: $!";
@@ -268,8 +336,8 @@ sub proplist {
eval <<"END";
while (<UD>) {
next if /^#/;
- next if /^\s/;
- chop;
+ next if /^\\s/;
+ s/\\s+\$//;
$split
if ($wanted) {
push(\@wanted, [hex \$code, hex $val, \$name =~ /, First>\$/]);
@@ -303,7 +371,7 @@ END
eval <<"END";
while (<UD>) {
next if /^#/;
- next if /^\s*\$/;
+ next if /^\\s*\$/;
chop;
$split
if ($wanted) {
@@ -336,4 +404,44 @@ END
$out;
}
+sub listFromPropFile {
+ my ($wanted) = @_;
+ my $out;
+
+ open (UD, $PropData) or die "Can't open $PropData: $!\n";
+ local($/) = "\n" . '*' x 43 . "\n\nProperty dump for:"; # not 42?
+
+ <UD>;
+ while (<UD>) {
+ chomp;
+ if (s/0x[\d\w]+\s+\((.*?)\)// and $wanted eq $1) {
+ s/\(\d+ chars\)//g;
+ s/^\s+//mg;
+ s/\s+$//mg;
+ s/\.\./\t/g;
+ $out = lc $_;
+ last;
+ }
+ }
+ close (UD);
+ "$out\n";
+}
+
+sub syllable_defs {
+ my @defs;
+ my %seen;
+
+ open (SD, $SyllableData) or die "Can't open $SyllableData: $!\n";
+ while (<SD>) {
+ next if /^\s*(#|$)/;
+ s/\s+$//;
+ ($code, $name, $syl) = split /; */;
+ next unless $syl;
+ push (@defs, ["IsSyl$syl", qq{\$syl eq "$syl"}, ''])
+ unless $seen{$syl}++;
+ }
+ close (SD);
+ return (@defs);
+}
+
# eof
diff --git a/contrib/perl5/lib/unicode/syllables.txt b/contrib/perl5/lib/unicode/syllables.txt
index 40e946e..bc8bc23 100644
--- a/contrib/perl5/lib/unicode/syllables.txt
+++ b/contrib/perl5/lib/unicode/syllables.txt
@@ -1,1329 +1,1329 @@
-################################################################################
-#
-# V: as "u" in "but" (often represented with schwa or small uppercase lambda)
-# U: as "oo" in "fool"
-# I: as "ea" in "meat"
-# A: as "a" in "father"
-# E: as "a" in "hate"
-# C: the consonant form having no vowel element
-# O: as "o" in "note"
-#
-# Vowel identifiers are assumed short, doubled identifiers are considered long
-# (following Cushitic rules). Dipthong syllables are identified with "W" as
-# per Ethiopic and Canadian syllabary character names.
-#
-#
-# WV WVV WU WUU WI WII WA WAA WAI WAAI WE WEE WC WO WOO
-#
-# V VV U UU I II A AA AI AAI E EE C O OO
-#
-################################################################################
-
-#
-# Ethiopic
-#
-1200; HA; V
-1201; HU; U
-1202; HI; I
-1203; HAA; A
-1204; HEE; E
-1205; HE; C
-1206; HO; O
-1208; LA; V
-1209; LU; U
-120A; LI; I
-120B; LAA; A
-120C; LEE; E
-120D; LE; C
-120E; LO; O
-120F; LWA; WA
-1210; HHA; V
-1211; HHU; U
-1212; HHI; I
-1213; HHAA; A
-1214; HHEE; E
-1215; HHE; C
-1216; HHO; O
-1217; HHWA; WA
-1218; MA; V
-1219; MU; U
-121A; MI; I
-121B; MAA; A
-121C; MEE; E
-121D; ME; C
-121E; MO; O
-121F; MWA; WA
-1220; SZA; V
-1221; SZU; U
-1222; SZI; I
-1223; SZAA; A
-1224; SZEE; E
-1225; SZE; C
-1226; SZO; O
-1227; SZWA; WA
-1228; RA; V
-1229; RU; U
-122A; RI; I
-122B; RAA; A
-122C; REE; E
-122D; RE; C
-122E; RO; O
-122F; RWA; WA
-1230; SA; V
-1231; SU; U
-1232; SI; I
-1233; SAA; A
-1234; SEE; E
-1235; SE; C
-1236; SO; O
-1237; SWA; WA
-1238; SHA; V
-1239; SHU; U
-123A; SHI; I
-123B; SHAA; A
-123C; SHEE; E
-123D; SHE; C
-123E; SHO; O
-123F; SHWA; WA
-1240; QA; V
-1241; QU; U
-1242; QI; I
-1243; QAA; A
-1244; QEE; E
-1245; QE; C
-1246; QO; O
-1248; QWA; WV
-124A; QWI; WI
-124B; QWAA; WA
-124C; QWEE; WE
-124D; QWE; WC
-1250; QHA; V
-1251; QHU; U
-1252; QHI; I
-1253; QHAA; A
-1254; QHEE; E
-1255; QHE; C
-1256; QHO; O
-1258; QHWA; WV
-125A; QHWI; WI
-125B; QHWAA; WA
-125C; QHWEE; WE
-125D; QHWE; WC
-1260; BA; V
-1261; BU; U
-1262; BI; I
-1263; BAA; A
-1264; BEE; E
-1265; BE; C
-1266; BO; O
-1267; BWA; WA
-1268; VA; V
-1269; VU; U
-126A; VI; I
-126B; VAA; A
-126C; VEE; E
-126D; VE; C
-126E; VO; O
-126F; VWA; WA
-1270; TA; V
-1271; TU; U
-1272; TI; I
-1273; TAA; A
-1274; TEE; E
-1275; TE; C
-1276; TO; O
-1277; TWA; WA
-1278; CA; V
-1279; CU; U
-127A; CI; I
-127B; CAA; A
-127C; CEE; E
-127D; CE; C
-127E; CO; O
-127F; CWA; WA
-1280; XA; V
-1281; XU; U
-1282; XI; I
-1283; XAA; A
-1284; XEE; E
-1285; XE; C
-1286; XO; O
-1288; XWA; WV
-128A; XWI; WI
-128B; XWAA; WA
-128C; XWEE; WE
-128D; XWE; WC
-1290; NA; V
-1291; NU; U
-1292; NI; I
-1293; NAA; A
-1294; NEE; E
-1295; NE; C
-1296; NO; O
-1297; NWA; WA
-1298; NYA; V
-1299; NYU; U
-129A; NYI; I
-129B; NYAA; A
-129C; NYEE; E
-129D; NYE; C
-129E; NYO; O
-129F; NYWA; WA
-12A0; GLOTTAL A; V
-12A1; GLOTTAL U; U
-12A2; GLOTTAL I; I
-12A3; GLOTTAL AA; A
-12A4; GLOTTAL EE; E
-12A5; GLOTTAL E; C
-12A6; GLOTTAL O; O
-12A7; GLOTTAL WA; WA
-12A8; KA; V
-12A9; KU; U
-12AA; KI; I
-12AB; KAA; A
-12AC; KEE; E
-12AD; KE; C
-12AE; KO; O
-12B0; KWA; WV
-12B2; KWI; WI
-12B3; KWAA; WA
-12B4; KWEE; WE
-12B5; KWE; WC
-12B8; KXA; V
-12B9; KXU; U
-12BA; KXI; I
-12BB; KXAA; A
-12BC; KXEE; E
-12BD; KXE; C
-12BE; KXO; O
-12C0; KXWA; WV
-12C2; KXWI; WI
-12C3; KXWAA; WA
-12C4; KXWEE; WE
-12C5; KXWE; WC
-12C8; WA; V
-12C9; WU; U
-12CA; WI; I
-12CB; WAA; A
-12CC; WEE; E
-12CD; WE; C
-12CE; WO; O
-12D0; PHARYNGEAL A; V
-12D1; PHARYNGEAL U; U
-12D2; PHARYNGEAL I; I
-12D3; PHARYNGEAL AA; A
-12D4; PHARYNGEAL EE; E
-12D5; PHARYNGEAL E; C
-12D6; PHARYNGEAL O; O
-12D8; ZA; V
-12D9; ZU; U
-12DA; ZI; I
-12DB; ZAA; A
-12DC; ZEE; E
-12DD; ZE; C
-12DE; ZO; O
-12DF; ZWA; WA
-12E0; ZHA; V
-12E1; ZHU; U
-12E2; ZHI; I
-12E3; ZHAA; A
-12E4; ZHEE; E
-12E5; ZHE; C
-12E6; ZHO; O
-12E7; ZHWA; WA
-12E8; YA; V
-12E9; YU; U
-12EA; YI; I
-12EB; YAA; A
-12EC; YEE; E
-12ED; YE; C
-12EE; YO; O
-12F0; DA; V
-12F1; DU; U
-12F2; DI; I
-12F3; DAA; A
-12F4; DEE; E
-12F5; DE; C
-12F6; DO; O
-12F7; DWA; WA
-12F8; DDA; V
-12F9; DDU; U
-12FA; DDI; I
-12FB; DDAA; A
-12FC; DDEE; E
-12FD; DDE; C
-12FE; DDO; O
-12FF; DDWA; WA
-1300; JA; V
-1301; JU; U
-1302; JI; I
-1303; JAA; A
-1304; JEE; E
-1305; JE; C
-1306; JO; O
-1307; JWA; WA
-1308; GA; V
-1309; GU; U
-130A; GI; I
-130B; GAA; A
-130C; GEE; E
-130D; GE; C
-130E; GO; O
-1310; GWA; WV
-1312; GWI; WI
-1313; GWAA; WA
-1314; GWEE; WE
-1315; GWE; WC
-1318; GGA; V
-1319; GGU; U
-131A; GGI; I
-131B; GGAA; A
-131C; GGEE; E
-131D; GGE; C
-131E; GGO; O
-1320; THA; V
-1321; THU; U
-1322; THI; I
-1323; THAA; A
-1324; THEE; E
-1325; THE; C
-1326; THO; O
-1327; THWA; WA
-1328; CHA; V
-1329; CHU; U
-132A; CHI; I
-132B; CHAA; A
-132C; CHEE; E
-132D; CHE; C
-132E; CHO; O
-132F; CHWA; WA
-1330; PHA; V
-1331; PHU; U
-1332; PHI; I
-1333; PHAA; A
-1334; PHEE; E
-1335; PHE; C
-1336; PHO; O
-1337; PHWA; WA
-1338; TSA; V
-1339; TSU; U
-133A; TSI; I
-133B; TSAA; A
-133C; TSEE; E
-133D; TSE; C
-133E; TSO; O
-133F; TSWA; WA
-1340; TZA; V
-1341; TZU; U
-1342; TZI; I
-1343; TZAA; A
-1344; TZEE; E
-1345; TZE; C
-1346; TZO; O
-1348; FA; V
-1349; FU; U
-134A; FI; I
-134B; FAA; A
-134C; FEE; E
-134D; FE; C
-134E; FO; O
-134F; FWA; WA
-1350; PA; V
-1351; PU; U
-1352; PI; I
-1353; PAA; A
-1354; PEE; E
-1355; PE; C
-1356; PO; O
-1357; PWA; WA
-#
-# Cherokee
-#
-13A0; A; A
-13A1; E; E
-13A2; I; I
-13A3; O; O
-13A4; U; U
-13A5; V; V
-13A6; GA; A
-13A7; KA; A
-13A8; GE; E
-13A9; GI; I
-13AA; GO; O
-13AB; GU; U
-13AC; GV; V
-13AD; HA; A
-13AE; HE; E
-13AF; HI; I
-13B0; HO; O
-13B1; HU; U
-13B2; HV; V
-13B3; LA; A
-13B4; LE; E
-13B5; LI; I
-13B6; LO; O
-13B7; LU; U
-13B8; LV; V
-13B9; MA; A
-13BA; ME; E
-13BB; MI; I
-13BC; MO; O
-13BD; MU; U
-13BE; NA; A
-13BF; HNA; A
-13C0; NAH; C
-13C1; NE; E
-13C2; NI; I
-13C3; NO; O
-13C4; NU; U
-13C5; NV; V
-13C6; QUA; A
-13C7; QUE; E
-13C8; QUI; I
-13C9; QUO; O
-13CA; QUU; U
-13CB; QUV; V
-13CC; SA; A
-13CD; S; C
-13CE; SE; E
-13CF; SI; I
-13D0; SO; O
-13D1; SU; U
-13D2; SV; V
-13D3; DA; A
-13D4; TA; A
-13D5; DE; E
-13D6; TE; E
-13D7; DI; I
-13D8; TI; I
-13D9; DO; O
-13DA; DU; U
-13DB; DV; V
-13DC; DLA; A
-13DD; TLA; A
-13DE; TLE; E
-13DF; TLI; I
-13E0; TLO; O
-13E1; TLU; U
-13E2; TLV; V
-13E3; TSA; A
-13E4; TSE; E
-13E5; TSI; I
-13E6; TSO; O
-13E7; TSU; U
-13E8; TSV; V
-13E9; WA; A
-13EA; WE; E
-13EB; WI; I
-13EC; WO; O
-13ED; WU; U
-13EE; WV; V
-13EF; YA; A
-13F0; YE; E
-13F1; YI; I
-13F2; YO; O
-13F3; YU; U
-13F4; YV; V
-#
-# 1400 Unified Canadian Aboriginal Syllabics 167F
-#
-1401; E; E
-1402; AAI; AAI
-1403; I; I
-1404; II; II
-1405; O; O
-1406; OO; OO
-1407; Y-CREE OO; OO
-1408; CARRIER EE; EE
-1409; CARRIER I; I
-140A; A; A
-140B; AA; AA
-140C; WE; WE
-140D; WEST-CREE WE; WE
-140E; WI; WI
-140F; WEST-CREE WI; WI
-1410; WII; WII
-1411; WEST-CREE WII; WII
-1412; WO; WO
-1413; WEST-CREE WO; WO
-1414; WOO; WOO
-1415; WEST-CREE WOO; WOO
-1416; NASKAPI WOO; WOO
-1417; WA; WA
-1418; WEST-CREE WA; WA
-1419; WAA; WAA
-141A; WEST-CREE WAA; WAA
-141B; NASKAPI WAA; WAA
-141C; AI; AI
-141D; Y-CREE W; C
-142B; EN; C
-142C; IN; C
-142D; ON; C
-142E; AN; C
-142F; PE; E
-1430; PAAI; AAI
-1431; PI; I
-1432; PII; II
-1433; PO; O
-1434; POO; OO
-1435; Y-CREE POO; OO
-1436; CARRIER HEE; EE
-1437; CARRIER HI; I
-1438; PA; A
-1439; PAA; AA
-143A; PWE; WE
-143B; WEST-CREE PWE; WE
-143C; PWI; WI
-143D; WEST-CREE PWI; WI
-143E; PWII; WII
-143F; WEST-CREE PWII; WII
-1440; PWO; WO
-1441; WEST-CREE PWO; WO
-1442; PWOO; WOO
-1443; WEST-CREE PWOO; WOO
-1444; PWA; WA
-1445; WEST-CREE PWA; WA
-1446; PWAA; WAA
-1447; WEST-CREE PWAA; WAA
-1448; Y-CREE PWAA; WAA
-1449; P; C
-144A; WEST-CREE P; C
-144B; CARRIER H; C
-144C; TE; E
-144D; TAAI; AAI
-144E; TI; I
-144F; TII; II
-1450; TO; O
-1451; TOO; OO
-1452; Y-CREE TOO; OO
-1453; CARRIER DEE; EE
-1454; CARRIER DI; I
-1455; TA; A
-1456; TAA; AA
-1457; TWE; WE
-1458; WEST-CREE TWE; WE
-1459; TWI; WI
-145A; WEST-CREE TWI; WI
-145B; TWII; WII
-145C; WEST-CREE TWII; WII
-145D; TWO; WO
-145E; WEST-CREE TWO; WO
-145F; TWOO; WOO
-1460; WEST-CREE TWOO; WOO
-1461; TWA; WA
-1462; WEST-CREE TWA; WA
-1463; TWAA; WAA
-1464; WEST-CREE TWAA; WAA
-1465; NASKAPI TWAA; WAA
-1466; T; C
-1467; TTE; E
-1468; TTI; I
-1469; TTO; O
-146A; TTA; A
-146B; KE; E
-146C; KAAI; AAI
-146D; KI; I
-146E; KII; II
-146F; KO; O
-1470; KOO; OO
-1471; Y-CREE KOO; OO
-1472; KA; A
-1473; KAA; AA
-1474; KWE; WE
-1475; WEST-CREE KWE; WE
-1476; KWI; WI
-1477; WEST-CREE KWI; WI
-1478; KWII; WII
-1479; WEST-CREE KWII; WII
-147A; KWO; WO
-147B; WEST-CREE KWO; WO
-147C; KWOO; WOO
-147D; WEST-CREE KWOO; WOO
-147E; KWA; WA
-147F; WEST-CREE KWA; WA
-1480; KWAA; WAA
-1481; WEST-CREE KWAA; WAA
-1482; NASKAPI KWAA; WAA
-1483; K; C
-1484; KW; WC
-1485; SOUTH-SLAVEY KEH; C
-1486; SOUTH-SLAVEY KIH; C
-1487; SOUTH-SLAVEY KOH; C
-1488; SOUTH-SLAVEY KAH; C
-1489; CE; E
-148A; CAAI; AAI
-148B; CI; I
-148C; CII; II
-148D; CO; O
-148E; COO; OO
-148F; Y-CREE COO; OO
-1490; CA; A
-1491; CAA; AA
-1492; CWE; WE
-1493; WEST-CREE CWE; WE
-1494; CWI; WI
-1495; WEST-CREE CWI; WI
-1496; CWII; WII
-1497; WEST-CREE CWII; WII
-1498; CWO; WO
-1499; WEST-CREE CWO; WO
-149A; CWOO; WOO
-149B; WEST-CREE CWOO; WOO
-149C; CWA; WA
-149D; WEST-CREE CWA; WA
-149E; CWAA; WAA
-149F; WEST-CREE CWAA; WAA
-14A0; NASKAPI CWAA; WAA
-14A1; C; C
-14A2; SAYISI TH;
-14A3; ME; E
-14A4; MAAI; AAI
-14A5; MI; I
-14A6; MII; II
-14A7; MO; O
-14A8; MOO; OO
-14A9; Y-CREE MOO; OO
-14AA; MA; A
-14AB; MAA; AA
-14AC; MWE; WE
-14AD; WEST-CREE MWE; WE
-14AE; MWI; WI
-14AF; WEST-CREE MWI; WI
-14B0; MWII; WII
-14B1; WEST-CREE MWII; WII
-14B2; MWO; WO
-14B3; WEST-CREE MWO; WO
-14B4; MWOO; WOO
-14B5; WEST-CREE MWOO; WOO
-14B6; MWA; WA
-14B7; WEST-CREE MWA; WA
-14B8; MWAA; WAA
-14B9; WEST-CREE MWAA; WAA
-14BA; NASKAPI MWAA; WAA
-14BB; M; C
-14BC; WEST-CREE M; C
-14BD; MH; C
-14BE; ATHAPASCAN M; C
-14BF; SAYISI M; C
-14C0; NE; E
-14C1; NAAI; AAI
-14C2; NI; I
-14C3; NII; II
-14C4; NO; O
-14C5; NOO; OO
-14C6; Y-CREE NOO; OO
-14C7; NA; A
-14C8; NAA; AA
-14C9; NWE; WE
-14CA; WEST-CREE NWE; WE
-14CB; NWA; WA
-14CC; WEST-CREE NWA; WA
-14CD; NWAA; WAA
-14CE; WEST-CREE NWAA; WAA
-14CF; NASKAPI NWAA; WAA
-14D0; N; C
-14D1; CARRIER NG; C
-14D2; NH; C
-14D3; LE; E
-14D4; LAAI; AAI
-14D5; LI; I
-14D6; LII; II
-14D7; LO; O
-14D8; LOO; OO
-14D9; Y-CREE LOO; OO
-14DA; LA; A
-14DB; LAA; AA
-14DC; LWE; WE
-14DD; WEST-CREE LWE; WE
-14DE; LWI; WI
-14DF; WEST-CREE LWI; WI
-14E0; LWII; WII
-14E1; WEST-CREE LWII; WII
-14E2; LWO; WO
-14E3; WEST-CREE LWO; WO
-14E4; LWOO; WOO
-14E5; WEST-CREE LWOO; WOO
-14E6; LWA; WA
-14E7; WEST-CREE LWA; WA
-14E8; LWAA; WAA
-14E9; WEST-CREE LWAA; WAA
-14EA; L; C
-14EB; WEST-CREE L; C
-14EC; MEDIAL L; C
-14ED; SE; E
-14EE; SAAI; AAI
-14EF; SI; I
-14F0; SII; II
-14F1; SO; O
-14F2; SOO; OO
-14F3; Y-CREE SOO; OO
-14F4; SA; A
-14F5; SAA; AA
-14F6; SWE; WE
-14F7; WEST-CREE SWE; WE
-14F8; SWI; WI
-14F9; WEST-CREE SWI; WI
-14FA; SWII; WII
-14FB; WEST-CREE SWII; WII
-14FC; SWO; WO
-14FD; WEST-CREE SWO; WO
-14FE; SWOO; WOO
-14FF; WEST-CREE SWOO; WOO
-1500; SWA; WA
-1501; WEST-CREE SWA; WA
-1502; SWAA; WAA
-1503; WEST-CREE SWAA; WAA
-1504; NASKAPI SWAA; WAA
-1505; S; C
-1506; ATHAPASCAN S; C
-1507; SW; WC
-1508; BLACKFOOT S; C
-1509; MOOSE-CREE SK;C
-150A; NASKAPI SKW; C
-150B; NASKAPI S-W; C
-150C; NASKAPI SPWA; WA
-150D; NASKAPI STWA; WA
-150E; NASKAPI SKWA; WA
-150F; NASKAPI SCWA; WA
-1510; SHE; E
-1511; SHI; I
-1512; SHII; II
-1513; SHO; O
-1514; SHOO; OO
-1515; SHA; A
-1516; SHAA; AA
-1517; SHWE; WE
-1518; WEST-CREE SHWE; WE
-1519; SHWI; WI
-151A; WEST-CREE SHWI; WI
-151B; SHWII; WII
-151C; WEST-CREE SHWII; WII
-151D; SHWO; WO
-151E; WEST-CREE SHWO; WO
-151F; SHWOO; WOO
-1520; WEST-CREE SHWOO; WOO
-1521; SHWA; WA
-1522; WEST-CREE SHWA; WA
-1523; SHWAA; WAA
-1524; WEST-CREE SHWAA; WAA
-1525; SH; C
-1526; YE; E
-1527; YAAI; AAI
-1528; YI; I
-1529; YII; II
-152A; YO; O
-152B; YOO; OO
-152C; Y-CREE YOO; OO
-152D; YA; A
-152E; YAA; AA
-152F; YWE; WE
-1530; WEST-CREE YWE; WE
-1531; YWI; WI
-1532; WEST-CREE YWI; WI
-1533; YWII; WII
-1534; WEST-CREE YWII; WII
-1535; YWO; WO
-1536; WEST-CREE YWO; WO
-1537; YWOO; WOO
-1538; WEST-CREE YWOO; WOO
-1539; YWA; WA
-153A; WEST-CREE YWA; WA
-153B; YWAA; WAA
-153C; WEST-CREE YWAA; WAA
-153D; NASKAPI YWAA; WAA
-153E; Y; C
-153F; BIBLE-CREE Y; C
-1540; WEST-CREE Y; C
-1541; SAYISI YI; I
-1542; RE; E
-1543; R-CREE RE; E
-1544; WEST-CREE LE; E
-1545; RAAI; AAI
-1546; RI; I
-1547; RII; II
-1548; RO; O
-1549; ROO; OO
-154A; WEST-CREE LO; O
-154B; RA; A
-154C; RAA; AA
-154D; WEST-CREE LA; A
-154E; RWAA; WAA
-154F; WEST-CREE RWAA; WAA
-1550; R; C
-1551; WEST-CREE R; C
-1552; MEDIAL R; C
-1553; FE; E
-1554; FAAI; AAI
-1555; FI; I
-1556; FII; II
-1557; FO; O
-1558; FOO; OO
-1559; FA; A
-155A; FAA; AA
-155B; FWAA; WAA
-155C; WEST-CREE FWAA; WAA
-155D; F; C
-155E; THE; E
-155F; N-CREE THE; E
-1560; THI; I
-1561; N-CREE THI; I
-1562; THII; II
-1563; N-CREE THII; II
-1564; THO; O
-1565; THOO; OO
-1566; THA; A
-1567; THAA; AA
-1568; THWAA; WAA
-1569; WEST-CREE THWAA; WAA
-156A; TH; C
-156B; TTHE; E
-156C; TTHI; I
-156D; TTHO; O
-156E; TTHA; A
-156F; TTH; C
-1570; TYE; E
-1571; TYI; I
-1572; TYO; O
-1573; TYA; A
-1574; NUNAVIK HE; E
-1575; NUNAVIK HI; I
-1576; NUNAVIK HII; II
-1577; NUNAVIK HO; O
-1578; NUNAVIK HOO; OO
-1579; NUNAVIK HA; A
-157A; NUNAVIK HAA; AA
-157B; NUNAVIK H; C
-157C; NUNAVUT H; C
-157D; HK; C
-157E; QAAI; AAI
-157F; QI; I
-1580; QII; II
-1581; QO; O
-1582; QOO; OO
-1583; QA; A
-1584; QAA; AA
-1585; Q; C
-1586; TLHE; E
-1587; TLHI; I
-1588; TLHO; O
-1589; TLHA; A
-158A; WEST-CREE RE; E
-158B; WEST-CREE RI; I
-158C; WEST-CREE RO; O
-158D; WEST-CREE RA; A
-158E; NGAAI; AAI
-158F; NGI; I
-1590; NGII; II
-1591; NGO; O
-1592; NGOO; OO
-1593; NGA; A
-1594; NGAA; AA
-1595; NG; C
-1596; NNG; C
-1597; SAYISI SHE; E
-1598; SAYISI SHI; I
-1599; SAYISI SHO; O
-159A; SAYISI SHA; A
-159B; WOODS-CREE THE; E
-159C; WOODS-CREE THI; I
-159D; WOODS-CREE THO; O
-159E; WOODS-CREE THA; A
-159F; WOODS-CREE TH; C
-15A0; LHI; I
-15A1; LHII; II
-15A2; LHO; O
-15A3; LHOO; OO
-15A4; LHA; A
-15A5; LHAA; AA
-15A6; LH; C
-15A7; TH-CREE THE; E
-15A8; TH-CREE THI; I
-15A9; TH-CREE THII; II
-15AA; TH-CREE THO; O
-15AB; TH-CREE THOO; OO
-15AC; TH-CREE THA; A
-15AD; TH-CREE THAA; AA
-15AE; TH-CREE TH; C
-15AF; AIVILIK B; C
-15B0; BLACKFOOT E; E
-15B1; BLACKFOOT I; I
-15B2; BLACKFOOT O; O
-15B3; BLACKFOOT A; A
-15B4; BLACKFOOT WE; E
-15B5; BLACKFOOT WI; I
-15B6; BLACKFOOT WO; O
-15B7; BLACKFOOT WA; A
-15B8; BLACKFOOT NE; E
-15B9; BLACKFOOT NI; I
-15BA; BLACKFOOT NO; O
-15BB; BLACKFOOT NA; A
-15BC; BLACKFOOT KE; E
-15BD; BLACKFOOT KI; I
-15BE; BLACKFOOT KO; O
-15BF; BLACKFOOT KA; A
-15C0; SAYISI HE; E
-15C1; SAYISI HI; I
-15C2; SAYISI HO; O
-15C3; SAYISI HA; A
-15C4; CARRIER GHU; U
-15C5; CARRIER GHO; O
-15C6; CARRIER GHE; E
-15C7; CARRIER GHEE; EE
-15C8; CARRIER GHI; I
-15C9; CARRIER GHA; A
-15CA; CARRIER RU; U
-15CB; CARRIER RO; O
-15CC; CARRIER RE; E
-15CD; CARRIER REE; EE
-15CE; CARRIER RI; I
-15CF; CARRIER RA; A
-15D0; CARRIER WU; U
-15D1; CARRIER WO; O
-15D2; CARRIER WE; E
-15D3; CARRIER WEE; EE
-15D4; CARRIER WI; I
-15D5; CARRIER WA; A
-15D6; CARRIER HWU; WU
-15D7; CARRIER HWO; WO
-15D8; CARRIER HWE; WE
-15D9; CARRIER HWEE; WEE
-15DA; CARRIER HWI; WI
-15DB; CARRIER HWA; WA
-15DC; CARRIER THU; U
-15DD; CARRIER THO; O
-15DE; CARRIER THE; E
-15DF; CARRIER THEE; EE
-15E0; CARRIER THI; I
-15E1; CARRIER THA; A
-15E2; CARRIER TTU; U
-15E3; CARRIER TTO; O
-15E4; CARRIER TTE; E
-15E5; CARRIER TTEE; EE
-15E6; CARRIER TTI; I
-15E7; CARRIER TTA; A
-15E8; CARRIER PU; U
-15E9; CARRIER PO; O
-15EA; CARRIER PE; E
-15EB; CARRIER PEE; EE
-15EC; CARRIER PI; I
-15ED; CARRIER PA; A
-15EE; CARRIER P;
-15EF; CARRIER GU; U
-15F0; CARRIER GO; O
-15F1; CARRIER GE; E
-15F2; CARRIER GEE; EE
-15F3; CARRIER GI; I
-15F4; CARRIER GA; A
-15F5; CARRIER KHU; U
-15F6; CARRIER KHO; O
-15F7; CARRIER KHE; E
-15F8; CARRIER KHEE; EE
-15F9; CARRIER KHI; I
-15FA; CARRIER KHA; A
-15FB; CARRIER KKU; U
-15FC; CARRIER KKO; O
-15FD; CARRIER KKE; E
-15FE; CARRIER KKEE; EE
-15FF; CARRIER KKI; I
-1600; CARRIER KKA; A
-1601; CARRIER KK;
-1602; CARRIER NU; U
-1603; CARRIER NO; O
-1604; CARRIER NE; E
-1605; CARRIER NEE; EE
-1606; CARRIER NI; I
-1607; CARRIER NA; A
-1608; CARRIER MU; U
-1609; CARRIER MO; O
-160A; CARRIER ME; E
-160B; CARRIER MEE; EE
-160C; CARRIER MI; I
-160D; CARRIER MA; A
-160E; CARRIER YU; U
-160F; CARRIER YO; O
-1610; CARRIER YE; E
-1611; CARRIER YEE; EE
-1612; CARRIER YI; I
-1613; CARRIER YA; A
-1614; CARRIER JU; U
-1615; SAYISI JU; U
-1616; CARRIER JO; O
-1617; CARRIER JE; E
-1618; CARRIER JEE; EE
-1619; CARRIER JI; I
-161A; SAYISI JI; I
-161B; CARRIER JA; A
-161C; CARRIER JJU; U
-161D; CARRIER JJO; O
-161E; CARRIER JJE; E
-161F; CARRIER JJEE; EE
-1620; CARRIER JJI; I
-1621; CARRIER JJA; A
-1622; CARRIER LU; U
-1623; CARRIER LO; O
-1624; CARRIER LE; E
-1625; CARRIER LEE; EE
-1626; CARRIER LI; I
-1627; CARRIER LA; A
-1628; CARRIER DLU; U
-1629; CARRIER DLO; O
-162A; CARRIER DLE; E
-162B; CARRIER DLEE; EE
-162C; CARRIER DLI; I
-162D; CARRIER DLA; A
-162E; CARRIER LHU; U
-162F; CARRIER LHO; O
-1630; CARRIER LHE; E
-1631; CARRIER LHEE; EE
-1632; CARRIER LHI; I
-1633; CARRIER LHA; A
-1634; CARRIER TLHU; U
-1635; CARRIER TLHO; O
-1636; CARRIER TLHE; E
-1637; CARRIER TLHEE; EE
-1638; CARRIER TLHI; I
-1639; CARRIER TLHA; A
-163A; CARRIER TLU; U
-163B; CARRIER TLO; O
-163C; CARRIER TLE; E
-163D; CARRIER TLEE; EE
-163E; CARRIER TLI; I
-163F; CARRIER TLA; A
-1640; CARRIER ZU; U
-1641; CARRIER ZO; O
-1642; CARRIER ZE; E
-1643; CARRIER ZEE; EE
-1644; CARRIER ZI; I
-1645; CARRIER ZA; A
-1646; CARRIER Z;
-1647; CARRIER INITIAL Z;
-1648; CARRIER DZU; U
-1649; CARRIER DZO; O
-164A; CARRIER DZE; E
-164B; CARRIER DZEE; EE
-164C; CARRIER DZI; I
-164D; CARRIER DZA; A
-164E; CARRIER SU; U
-164F; CARRIER SO; O
-1650; CARRIER SE; E
-1651; CARRIER SEE; EE
-1652; CARRIER SI; I
-1653; CARRIER SA; A
-1654; CARRIER SHU; U
-1655; CARRIER SHO; O
-1656; CARRIER SHE; E
-1657; CARRIER SHEE; EE
-1658; CARRIER SHI; I
-1659; CARRIER SHA; A
-165A; CARRIER SH;
-165B; CARRIER TSU; U
-165C; CARRIER TSO; O
-165D; CARRIER TSE; E
-165E; CARRIER TSEE; EE
-165F; CARRIER TSI; I
-1660; CARRIER TSA; A
-1661; CARRIER CHU; U
-1662; CARRIER CHO; O
-1663; CARRIER CHE; E
-1664; CARRIER CHEE; EE
-1665; CARRIER CHI; I
-1666; CARRIER CHA; A
-1667; CARRIER TTSU; U
-1668; CARRIER TTSO; O
-1669; CARRIER TTSE; E
-166A; CARRIER TTSEE; EE
-166B; CARRIER TTSI; I
-166C; CARRIER TTSA; A
-166F; QAI; AI
-1670; NGAI; AI
-1671; NNGI; I
-1672; NNGII; II
-1673; NNGO; O
-1674; NNGOO; OO
-1675; NNGA; A
-1676; NNGAA; AA
-#
-# Katakana
-#
-30A1; SMALL A; A
-30A2; A; A
-30A3; SMALL I; I
-30A4; I; I
-30A5; SMALL U; U
-30A6; U; U
-30A7; SMALL E; E
-30A8; E; E
-30A9; SMALL O; O
-30AA; O; O
-30AB; KA; A
-30AC; GA; A
-30AD; KI; I
-30AE; GI; I
-30AF; KU; U
-30B0; GU; U
-30B1; KE; E
-30B2; GE; E
-30B3; KO; O
-30B4; GO; O
-30B5; SA; A
-30B6; ZA; A
-30B7; SI; I
-30B8; ZI; I
-30B9; SU; U
-30BA; ZU; U
-30BB; SE; E
-30BC; ZE; E
-30BD; SO; O
-30BE; ZO; O
-30BF; TA; A
-30C0; DA; A
-30C1; TI; I
-30C2; DI; I
-30C3; SMALL TU; U
-30C4; TU; U
-30C5; DU; U
-30C6; TE; E
-30C7; DE; E
-30C8; TO; O
-30C9; DO; O
-30CA; NA; A
-30CB; NI; I
-30CC; NU; U
-30CD; NE; E
-30CE; NO; O
-30CF; HA; A
-30D0; BA; A
-30D1; PA; A
-30D2; HI; I
-30D3; BI; I
-30D4; PI; I
-30D5; HU; U
-30D6; BU; U
-30D7; PU; U
-30D8; HE; E
-30D9; BE; E
-30DA; PE; E
-30DB; HO; O
-30DC; BO; O
-30DD; PO; O
-30DE; MA; A
-30DF; MI; I
-30E0; MU; U
-30E1; ME; E
-30E2; MO; O
-30E3; SMALL YA; A
-30E4; YA; A
-30E5; SMALL YU; U
-30E6; YU; U
-30E7; SMALL YO; O
-30E8; YO; O
-30E9; RA; A
-30EA; RI; I
-30EB; RU; U
-30EC; RE; E
-30ED; RO; O
-30EE; SMALL WA; A
-30EF; WA; A
-30F0; WI; I
-30F1; WE; E
-30F2; WO; O
-30F3; N; C
-30F4; VU; U
-30F5; SMALL KA; A
-30F6; SMALL KE; E
-30F7; VA; A
-30F8; VI; I
-30F9; VE; E
-30FA; VO; O
-32D0; CIRCLED KATAKANA A; A
-32D1; CIRCLED KATAKANA I; I
-32D2; CIRCLED KATAKANA U; U
-32D3; CIRCLED KATAKANA E; E
-32D4; CIRCLED KATAKANA O; O
-32D5; CIRCLED KATAKANA KA; A
-32D6; CIRCLED KATAKANA KI; I
-32D7; CIRCLED KATAKANA KU; U
-32D8; CIRCLED KATAKANA KE; E
-32D9; CIRCLED KATAKANA KO; O
-32DA; CIRCLED KATAKANA SA; A
-32DB; CIRCLED KATAKANA SI; I
-32DC; CIRCLED KATAKANA SU; U
-32DD; CIRCLED KATAKANA SE; E
-32DE; CIRCLED KATAKANA SO; O
-32DF; CIRCLED KATAKANA TA; A
-32E0; CIRCLED KATAKANA TI; I
-32E1; CIRCLED KATAKANA TU; U
-32E2; CIRCLED KATAKANA TE; E
-32E3; CIRCLED KATAKANA TO; O
-32E4; CIRCLED KATAKANA NA; A
-32E5; CIRCLED KATAKANA NI; I
-32E6; CIRCLED KATAKANA NU; U
-32E7; CIRCLED KATAKANA NE; E
-32E8; CIRCLED KATAKANA NO; O
-32E9; CIRCLED KATAKANA HA; A
-32EA; CIRCLED KATAKANA HI; I
-32EB; CIRCLED KATAKANA HU; U
-32EC; CIRCLED KATAKANA HE; E
-32ED; CIRCLED KATAKANA HO; O
-32EE; CIRCLED KATAKANA MA; A
-32EF; CIRCLED KATAKANA MI; I
-32F0; CIRCLED KATAKANA MU; U
-32F1; CIRCLED KATAKANA ME; E
-32F2; CIRCLED KATAKANA MO; O
-32F3; CIRCLED KATAKANA YA; A
-32F4; CIRCLED KATAKANA YU; U
-32F5; CIRCLED KATAKANA YO; O
-32F6; CIRCLED KATAKANA RA; A
-32F7; CIRCLED KATAKANA RI; I
-32F8; CIRCLED KATAKANA RU; U
-32F9; CIRCLED KATAKANA RE; E
-32FA; CIRCLED KATAKANA RO; O
-32FB; CIRCLED KATAKANA WA; A
-32FC; CIRCLED KATAKANA WI; I
-32FD; CIRCLED KATAKANA WE; E
-32FE; CIRCLED KATAKANA WO; O
-#
-# Katakana
-#
-FF66; HALFWIDTH WO; O
-FF67; HALFWIDTH SMALL A; A
-FF68; HALFWIDTH SMALL I; I
-FF69; HALFWIDTH SMALL U; U
-FF6A; HALFWIDTH SMALL E; E
-FF6B; HALFWIDTH SMALL O; O
-FF6C; HALFWIDTH SMALL YA; A
-FF6D; HALFWIDTH SMALL YU; U
-FF6E; HALFWIDTH SMALL YO; O
-FF6F; HALFWIDTH SMALL TU; U
-FF71; HALFWIDTH A; A
-FF72; HALFWIDTH I; I
-FF73; HALFWIDTH U; U
-FF74; HALFWIDTH E; E
-FF75; HALFWIDTH O; O
-FF76; HALFWIDTH KA; A
-FF77; HALFWIDTH KI; I
-FF78; HALFWIDTH KU; U
-FF79; HALFWIDTH KE; E
-FF7A; HALFWIDTH KO; O
-FF7B; HALFWIDTH SA; A
-FF7C; HALFWIDTH SI; I
-FF7D; HALFWIDTH SU; U
-FF7E; HALFWIDTH SE; E
-FF7F; HALFWIDTH SO; O
-FF80; HALFWIDTH TA; A
-FF81; HALFWIDTH TI; I
-FF82; HALFWIDTH TU; U
-FF83; HALFWIDTH TE; E
-FF84; HALFWIDTH TO; O
-FF85; HALFWIDTH NA; A
-FF86; HALFWIDTH NI; I
-FF87; HALFWIDTH NU; U
-FF88; HALFWIDTH NE; E
-FF89; HALFWIDTH NO; O
-FF8A; HALFWIDTH HA; A
-FF8B; HALFWIDTH HI; I
-FF8C; HALFWIDTH HU; U
-FF8D; HALFWIDTH HE; E
-FF8E; HALFWIDTH HO; O
-FF8F; HALFWIDTH MA; A
-FF90; HALFWIDTH MI; I
-FF91; HALFWIDTH MU; U
-FF92; HALFWIDTH ME; E
-FF93; HALFWIDTH MO; O
-FF94; HALFWIDTH YA; A
-FF95; HALFWIDTH YU; U
-FF96; HALFWIDTH YO; O
-FF97; HALFWIDTH RA; A
-FF98; HALFWIDTH RI; I
-FF99; HALFWIDTH RU; U
-FF9A; HALFWIDTH RE; E
-FF9B; HALFWIDTH RO; O
-FF9C; HALFWIDTH WA; A
-FF9D; HALFWIDTH N; C
-#
-# Hiragana
-#
-3041; SMALL A; A
-3042; A; A
-3043; SMALL I; I
-3044; I; I
-3045; SMALL U; U
-3046; U; U
-3047; SMALL E; E
-3048; E; E
-3049; SMALL O; O
-304A; O; O
-304B; KA; A
-304C; GA; A
-304D; KI; I
-304E; GI; I
-304F; KU; U
-3050; GU; U
-3051; KE; E
-3052; GE; E
-3053; KO; O
-3054; GO; O
-3055; SA; A
-3056; ZA; A
-3057; SI; I
-3058; ZI; I
-3059; SU; U
-305A; ZU; U
-305B; SE; E
-305C; ZE; E
-305D; SO; O
-305E; ZO; O
-305F; TA; A
-3060; DA; A
-3061; TI; I
-3062; DI; I
-3063; SMALL TU; U
-3064; TU; U
-3065; DU; U
-3066; TE; E
-3067; DE; E
-3068; TO; O
-3069; DO; O
-306A; NA; A
-306B; NI; I
-306C; NU; U
-306D; NE; E
-306E; NO; O
-306F; HA; A
-3070; BA; A
-3071; PA; A
-3072; HI; I
-3073; BI; I
-3074; PI; I
-3075; HU; U
-3076; BU; U
-3077; PU; U
-3078; HE; E
-3079; BE; E
-307A; PE; E
-307B; HO; O
-307C; BO; O
-307D; PO; O
-307E; MA; A
-307F; MI; I
-3080; MU; U
-3081; ME; E
-3082; MO; O
-3083; SMALL YA; A
-3084; YA; A
-3085; SMALL YU; U
-3086; YU; U
-3087; SMALL YO; O
-3088; YO; O
-3089; RA; A
-308A; RI; I
-308B; RU; U
-308C; RE; E
-308D; RO; O
-308E; SMALL WA; A
-308F; WA; A
-3090; WI; I
-3091; WE; E
-3092; WO; O
-3093; N; N
-3094; VU; U
+################################################################################
+#
+# V: as "u" in "but" (often represented with schwa or small uppercase lambda)
+# U: as "oo" in "fool"
+# I: as "ea" in "meat"
+# A: as "a" in "father"
+# E: as "a" in "hate"
+# C: the consonant form having no vowel element
+# O: as "o" in "note"
+#
+# Vowel identifiers are assumed short, doubled identifiers are considered long
+# (following Cushitic rules). Dipthong syllables are identified with "W" as
+# per Ethiopic and Canadian syllabary character names.
+#
+#
+# WV WVV WU WUU WI WII WA WAA WAI WAAI WE WEE WC WO WOO
+#
+# V VV U UU I II A AA AI AAI E EE C O OO
+#
+################################################################################
+
+#
+# Ethiopic
+#
+1200; HA; V
+1201; HU; U
+1202; HI; I
+1203; HAA; A
+1204; HEE; E
+1205; HE; C
+1206; HO; O
+1208; LA; V
+1209; LU; U
+120A; LI; I
+120B; LAA; A
+120C; LEE; E
+120D; LE; C
+120E; LO; O
+120F; LWA; WA
+1210; HHA; V
+1211; HHU; U
+1212; HHI; I
+1213; HHAA; A
+1214; HHEE; E
+1215; HHE; C
+1216; HHO; O
+1217; HHWA; WA
+1218; MA; V
+1219; MU; U
+121A; MI; I
+121B; MAA; A
+121C; MEE; E
+121D; ME; C
+121E; MO; O
+121F; MWA; WA
+1220; SZA; V
+1221; SZU; U
+1222; SZI; I
+1223; SZAA; A
+1224; SZEE; E
+1225; SZE; C
+1226; SZO; O
+1227; SZWA; WA
+1228; RA; V
+1229; RU; U
+122A; RI; I
+122B; RAA; A
+122C; REE; E
+122D; RE; C
+122E; RO; O
+122F; RWA; WA
+1230; SA; V
+1231; SU; U
+1232; SI; I
+1233; SAA; A
+1234; SEE; E
+1235; SE; C
+1236; SO; O
+1237; SWA; WA
+1238; SHA; V
+1239; SHU; U
+123A; SHI; I
+123B; SHAA; A
+123C; SHEE; E
+123D; SHE; C
+123E; SHO; O
+123F; SHWA; WA
+1240; QA; V
+1241; QU; U
+1242; QI; I
+1243; QAA; A
+1244; QEE; E
+1245; QE; C
+1246; QO; O
+1248; QWA; WV
+124A; QWI; WI
+124B; QWAA; WA
+124C; QWEE; WE
+124D; QWE; WC
+1250; QHA; V
+1251; QHU; U
+1252; QHI; I
+1253; QHAA; A
+1254; QHEE; E
+1255; QHE; C
+1256; QHO; O
+1258; QHWA; WV
+125A; QHWI; WI
+125B; QHWAA; WA
+125C; QHWEE; WE
+125D; QHWE; WC
+1260; BA; V
+1261; BU; U
+1262; BI; I
+1263; BAA; A
+1264; BEE; E
+1265; BE; C
+1266; BO; O
+1267; BWA; WA
+1268; VA; V
+1269; VU; U
+126A; VI; I
+126B; VAA; A
+126C; VEE; E
+126D; VE; C
+126E; VO; O
+126F; VWA; WA
+1270; TA; V
+1271; TU; U
+1272; TI; I
+1273; TAA; A
+1274; TEE; E
+1275; TE; C
+1276; TO; O
+1277; TWA; WA
+1278; CA; V
+1279; CU; U
+127A; CI; I
+127B; CAA; A
+127C; CEE; E
+127D; CE; C
+127E; CO; O
+127F; CWA; WA
+1280; XA; V
+1281; XU; U
+1282; XI; I
+1283; XAA; A
+1284; XEE; E
+1285; XE; C
+1286; XO; O
+1288; XWA; WV
+128A; XWI; WI
+128B; XWAA; WA
+128C; XWEE; WE
+128D; XWE; WC
+1290; NA; V
+1291; NU; U
+1292; NI; I
+1293; NAA; A
+1294; NEE; E
+1295; NE; C
+1296; NO; O
+1297; NWA; WA
+1298; NYA; V
+1299; NYU; U
+129A; NYI; I
+129B; NYAA; A
+129C; NYEE; E
+129D; NYE; C
+129E; NYO; O
+129F; NYWA; WA
+12A0; GLOTTAL A; V
+12A1; GLOTTAL U; U
+12A2; GLOTTAL I; I
+12A3; GLOTTAL AA; A
+12A4; GLOTTAL EE; E
+12A5; GLOTTAL E; C
+12A6; GLOTTAL O; O
+12A7; GLOTTAL WA; WA
+12A8; KA; V
+12A9; KU; U
+12AA; KI; I
+12AB; KAA; A
+12AC; KEE; E
+12AD; KE; C
+12AE; KO; O
+12B0; KWA; WV
+12B2; KWI; WI
+12B3; KWAA; WA
+12B4; KWEE; WE
+12B5; KWE; WC
+12B8; KXA; V
+12B9; KXU; U
+12BA; KXI; I
+12BB; KXAA; A
+12BC; KXEE; E
+12BD; KXE; C
+12BE; KXO; O
+12C0; KXWA; WV
+12C2; KXWI; WI
+12C3; KXWAA; WA
+12C4; KXWEE; WE
+12C5; KXWE; WC
+12C8; WA; V
+12C9; WU; U
+12CA; WI; I
+12CB; WAA; A
+12CC; WEE; E
+12CD; WE; C
+12CE; WO; O
+12D0; PHARYNGEAL A; V
+12D1; PHARYNGEAL U; U
+12D2; PHARYNGEAL I; I
+12D3; PHARYNGEAL AA; A
+12D4; PHARYNGEAL EE; E
+12D5; PHARYNGEAL E; C
+12D6; PHARYNGEAL O; O
+12D8; ZA; V
+12D9; ZU; U
+12DA; ZI; I
+12DB; ZAA; A
+12DC; ZEE; E
+12DD; ZE; C
+12DE; ZO; O
+12DF; ZWA; WA
+12E0; ZHA; V
+12E1; ZHU; U
+12E2; ZHI; I
+12E3; ZHAA; A
+12E4; ZHEE; E
+12E5; ZHE; C
+12E6; ZHO; O
+12E7; ZHWA; WA
+12E8; YA; V
+12E9; YU; U
+12EA; YI; I
+12EB; YAA; A
+12EC; YEE; E
+12ED; YE; C
+12EE; YO; O
+12F0; DA; V
+12F1; DU; U
+12F2; DI; I
+12F3; DAA; A
+12F4; DEE; E
+12F5; DE; C
+12F6; DO; O
+12F7; DWA; WA
+12F8; DDA; V
+12F9; DDU; U
+12FA; DDI; I
+12FB; DDAA; A
+12FC; DDEE; E
+12FD; DDE; C
+12FE; DDO; O
+12FF; DDWA; WA
+1300; JA; V
+1301; JU; U
+1302; JI; I
+1303; JAA; A
+1304; JEE; E
+1305; JE; C
+1306; JO; O
+1307; JWA; WA
+1308; GA; V
+1309; GU; U
+130A; GI; I
+130B; GAA; A
+130C; GEE; E
+130D; GE; C
+130E; GO; O
+1310; GWA; WV
+1312; GWI; WI
+1313; GWAA; WA
+1314; GWEE; WE
+1315; GWE; WC
+1318; GGA; V
+1319; GGU; U
+131A; GGI; I
+131B; GGAA; A
+131C; GGEE; E
+131D; GGE; C
+131E; GGO; O
+1320; THA; V
+1321; THU; U
+1322; THI; I
+1323; THAA; A
+1324; THEE; E
+1325; THE; C
+1326; THO; O
+1327; THWA; WA
+1328; CHA; V
+1329; CHU; U
+132A; CHI; I
+132B; CHAA; A
+132C; CHEE; E
+132D; CHE; C
+132E; CHO; O
+132F; CHWA; WA
+1330; PHA; V
+1331; PHU; U
+1332; PHI; I
+1333; PHAA; A
+1334; PHEE; E
+1335; PHE; C
+1336; PHO; O
+1337; PHWA; WA
+1338; TSA; V
+1339; TSU; U
+133A; TSI; I
+133B; TSAA; A
+133C; TSEE; E
+133D; TSE; C
+133E; TSO; O
+133F; TSWA; WA
+1340; TZA; V
+1341; TZU; U
+1342; TZI; I
+1343; TZAA; A
+1344; TZEE; E
+1345; TZE; C
+1346; TZO; O
+1348; FA; V
+1349; FU; U
+134A; FI; I
+134B; FAA; A
+134C; FEE; E
+134D; FE; C
+134E; FO; O
+134F; FWA; WA
+1350; PA; V
+1351; PU; U
+1352; PI; I
+1353; PAA; A
+1354; PEE; E
+1355; PE; C
+1356; PO; O
+1357; PWA; WA
+#
+# Cherokee
+#
+13A0; A; A
+13A1; E; E
+13A2; I; I
+13A3; O; O
+13A4; U; U
+13A5; V; V
+13A6; GA; A
+13A7; KA; A
+13A8; GE; E
+13A9; GI; I
+13AA; GO; O
+13AB; GU; U
+13AC; GV; V
+13AD; HA; A
+13AE; HE; E
+13AF; HI; I
+13B0; HO; O
+13B1; HU; U
+13B2; HV; V
+13B3; LA; A
+13B4; LE; E
+13B5; LI; I
+13B6; LO; O
+13B7; LU; U
+13B8; LV; V
+13B9; MA; A
+13BA; ME; E
+13BB; MI; I
+13BC; MO; O
+13BD; MU; U
+13BE; NA; A
+13BF; HNA; A
+13C0; NAH; C
+13C1; NE; E
+13C2; NI; I
+13C3; NO; O
+13C4; NU; U
+13C5; NV; V
+13C6; QUA; A
+13C7; QUE; E
+13C8; QUI; I
+13C9; QUO; O
+13CA; QUU; U
+13CB; QUV; V
+13CC; SA; A
+13CD; S; C
+13CE; SE; E
+13CF; SI; I
+13D0; SO; O
+13D1; SU; U
+13D2; SV; V
+13D3; DA; A
+13D4; TA; A
+13D5; DE; E
+13D6; TE; E
+13D7; DI; I
+13D8; TI; I
+13D9; DO; O
+13DA; DU; U
+13DB; DV; V
+13DC; DLA; A
+13DD; TLA; A
+13DE; TLE; E
+13DF; TLI; I
+13E0; TLO; O
+13E1; TLU; U
+13E2; TLV; V
+13E3; TSA; A
+13E4; TSE; E
+13E5; TSI; I
+13E6; TSO; O
+13E7; TSU; U
+13E8; TSV; V
+13E9; WA; A
+13EA; WE; E
+13EB; WI; I
+13EC; WO; O
+13ED; WU; U
+13EE; WV; V
+13EF; YA; A
+13F0; YE; E
+13F1; YI; I
+13F2; YO; O
+13F3; YU; U
+13F4; YV; V
+#
+# 1400 Unified Canadian Aboriginal Syllabics 167F
+#
+1401; E; E
+1402; AAI; AAI
+1403; I; I
+1404; II; II
+1405; O; O
+1406; OO; OO
+1407; Y-CREE OO; OO
+1408; CARRIER EE; EE
+1409; CARRIER I; I
+140A; A; A
+140B; AA; AA
+140C; WE; WE
+140D; WEST-CREE WE; WE
+140E; WI; WI
+140F; WEST-CREE WI; WI
+1410; WII; WII
+1411; WEST-CREE WII; WII
+1412; WO; WO
+1413; WEST-CREE WO; WO
+1414; WOO; WOO
+1415; WEST-CREE WOO; WOO
+1416; NASKAPI WOO; WOO
+1417; WA; WA
+1418; WEST-CREE WA; WA
+1419; WAA; WAA
+141A; WEST-CREE WAA; WAA
+141B; NASKAPI WAA; WAA
+141C; AI; AI
+141D; Y-CREE W; C
+142B; EN; C
+142C; IN; C
+142D; ON; C
+142E; AN; C
+142F; PE; E
+1430; PAAI; AAI
+1431; PI; I
+1432; PII; II
+1433; PO; O
+1434; POO; OO
+1435; Y-CREE POO; OO
+1436; CARRIER HEE; EE
+1437; CARRIER HI; I
+1438; PA; A
+1439; PAA; AA
+143A; PWE; WE
+143B; WEST-CREE PWE; WE
+143C; PWI; WI
+143D; WEST-CREE PWI; WI
+143E; PWII; WII
+143F; WEST-CREE PWII; WII
+1440; PWO; WO
+1441; WEST-CREE PWO; WO
+1442; PWOO; WOO
+1443; WEST-CREE PWOO; WOO
+1444; PWA; WA
+1445; WEST-CREE PWA; WA
+1446; PWAA; WAA
+1447; WEST-CREE PWAA; WAA
+1448; Y-CREE PWAA; WAA
+1449; P; C
+144A; WEST-CREE P; C
+144B; CARRIER H; C
+144C; TE; E
+144D; TAAI; AAI
+144E; TI; I
+144F; TII; II
+1450; TO; O
+1451; TOO; OO
+1452; Y-CREE TOO; OO
+1453; CARRIER DEE; EE
+1454; CARRIER DI; I
+1455; TA; A
+1456; TAA; AA
+1457; TWE; WE
+1458; WEST-CREE TWE; WE
+1459; TWI; WI
+145A; WEST-CREE TWI; WI
+145B; TWII; WII
+145C; WEST-CREE TWII; WII
+145D; TWO; WO
+145E; WEST-CREE TWO; WO
+145F; TWOO; WOO
+1460; WEST-CREE TWOO; WOO
+1461; TWA; WA
+1462; WEST-CREE TWA; WA
+1463; TWAA; WAA
+1464; WEST-CREE TWAA; WAA
+1465; NASKAPI TWAA; WAA
+1466; T; C
+1467; TTE; E
+1468; TTI; I
+1469; TTO; O
+146A; TTA; A
+146B; KE; E
+146C; KAAI; AAI
+146D; KI; I
+146E; KII; II
+146F; KO; O
+1470; KOO; OO
+1471; Y-CREE KOO; OO
+1472; KA; A
+1473; KAA; AA
+1474; KWE; WE
+1475; WEST-CREE KWE; WE
+1476; KWI; WI
+1477; WEST-CREE KWI; WI
+1478; KWII; WII
+1479; WEST-CREE KWII; WII
+147A; KWO; WO
+147B; WEST-CREE KWO; WO
+147C; KWOO; WOO
+147D; WEST-CREE KWOO; WOO
+147E; KWA; WA
+147F; WEST-CREE KWA; WA
+1480; KWAA; WAA
+1481; WEST-CREE KWAA; WAA
+1482; NASKAPI KWAA; WAA
+1483; K; C
+1484; KW; WC
+1485; SOUTH-SLAVEY KEH; C
+1486; SOUTH-SLAVEY KIH; C
+1487; SOUTH-SLAVEY KOH; C
+1488; SOUTH-SLAVEY KAH; C
+1489; CE; E
+148A; CAAI; AAI
+148B; CI; I
+148C; CII; II
+148D; CO; O
+148E; COO; OO
+148F; Y-CREE COO; OO
+1490; CA; A
+1491; CAA; AA
+1492; CWE; WE
+1493; WEST-CREE CWE; WE
+1494; CWI; WI
+1495; WEST-CREE CWI; WI
+1496; CWII; WII
+1497; WEST-CREE CWII; WII
+1498; CWO; WO
+1499; WEST-CREE CWO; WO
+149A; CWOO; WOO
+149B; WEST-CREE CWOO; WOO
+149C; CWA; WA
+149D; WEST-CREE CWA; WA
+149E; CWAA; WAA
+149F; WEST-CREE CWAA; WAA
+14A0; NASKAPI CWAA; WAA
+14A1; C; C
+14A2; SAYISI TH;
+14A3; ME; E
+14A4; MAAI; AAI
+14A5; MI; I
+14A6; MII; II
+14A7; MO; O
+14A8; MOO; OO
+14A9; Y-CREE MOO; OO
+14AA; MA; A
+14AB; MAA; AA
+14AC; MWE; WE
+14AD; WEST-CREE MWE; WE
+14AE; MWI; WI
+14AF; WEST-CREE MWI; WI
+14B0; MWII; WII
+14B1; WEST-CREE MWII; WII
+14B2; MWO; WO
+14B3; WEST-CREE MWO; WO
+14B4; MWOO; WOO
+14B5; WEST-CREE MWOO; WOO
+14B6; MWA; WA
+14B7; WEST-CREE MWA; WA
+14B8; MWAA; WAA
+14B9; WEST-CREE MWAA; WAA
+14BA; NASKAPI MWAA; WAA
+14BB; M; C
+14BC; WEST-CREE M; C
+14BD; MH; C
+14BE; ATHAPASCAN M; C
+14BF; SAYISI M; C
+14C0; NE; E
+14C1; NAAI; AAI
+14C2; NI; I
+14C3; NII; II
+14C4; NO; O
+14C5; NOO; OO
+14C6; Y-CREE NOO; OO
+14C7; NA; A
+14C8; NAA; AA
+14C9; NWE; WE
+14CA; WEST-CREE NWE; WE
+14CB; NWA; WA
+14CC; WEST-CREE NWA; WA
+14CD; NWAA; WAA
+14CE; WEST-CREE NWAA; WAA
+14CF; NASKAPI NWAA; WAA
+14D0; N; C
+14D1; CARRIER NG; C
+14D2; NH; C
+14D3; LE; E
+14D4; LAAI; AAI
+14D5; LI; I
+14D6; LII; II
+14D7; LO; O
+14D8; LOO; OO
+14D9; Y-CREE LOO; OO
+14DA; LA; A
+14DB; LAA; AA
+14DC; LWE; WE
+14DD; WEST-CREE LWE; WE
+14DE; LWI; WI
+14DF; WEST-CREE LWI; WI
+14E0; LWII; WII
+14E1; WEST-CREE LWII; WII
+14E2; LWO; WO
+14E3; WEST-CREE LWO; WO
+14E4; LWOO; WOO
+14E5; WEST-CREE LWOO; WOO
+14E6; LWA; WA
+14E7; WEST-CREE LWA; WA
+14E8; LWAA; WAA
+14E9; WEST-CREE LWAA; WAA
+14EA; L; C
+14EB; WEST-CREE L; C
+14EC; MEDIAL L; C
+14ED; SE; E
+14EE; SAAI; AAI
+14EF; SI; I
+14F0; SII; II
+14F1; SO; O
+14F2; SOO; OO
+14F3; Y-CREE SOO; OO
+14F4; SA; A
+14F5; SAA; AA
+14F6; SWE; WE
+14F7; WEST-CREE SWE; WE
+14F8; SWI; WI
+14F9; WEST-CREE SWI; WI
+14FA; SWII; WII
+14FB; WEST-CREE SWII; WII
+14FC; SWO; WO
+14FD; WEST-CREE SWO; WO
+14FE; SWOO; WOO
+14FF; WEST-CREE SWOO; WOO
+1500; SWA; WA
+1501; WEST-CREE SWA; WA
+1502; SWAA; WAA
+1503; WEST-CREE SWAA; WAA
+1504; NASKAPI SWAA; WAA
+1505; S; C
+1506; ATHAPASCAN S; C
+1507; SW; WC
+1508; BLACKFOOT S; C
+1509; MOOSE-CREE SK;C
+150A; NASKAPI SKW; C
+150B; NASKAPI S-W; C
+150C; NASKAPI SPWA; WA
+150D; NASKAPI STWA; WA
+150E; NASKAPI SKWA; WA
+150F; NASKAPI SCWA; WA
+1510; SHE; E
+1511; SHI; I
+1512; SHII; II
+1513; SHO; O
+1514; SHOO; OO
+1515; SHA; A
+1516; SHAA; AA
+1517; SHWE; WE
+1518; WEST-CREE SHWE; WE
+1519; SHWI; WI
+151A; WEST-CREE SHWI; WI
+151B; SHWII; WII
+151C; WEST-CREE SHWII; WII
+151D; SHWO; WO
+151E; WEST-CREE SHWO; WO
+151F; SHWOO; WOO
+1520; WEST-CREE SHWOO; WOO
+1521; SHWA; WA
+1522; WEST-CREE SHWA; WA
+1523; SHWAA; WAA
+1524; WEST-CREE SHWAA; WAA
+1525; SH; C
+1526; YE; E
+1527; YAAI; AAI
+1528; YI; I
+1529; YII; II
+152A; YO; O
+152B; YOO; OO
+152C; Y-CREE YOO; OO
+152D; YA; A
+152E; YAA; AA
+152F; YWE; WE
+1530; WEST-CREE YWE; WE
+1531; YWI; WI
+1532; WEST-CREE YWI; WI
+1533; YWII; WII
+1534; WEST-CREE YWII; WII
+1535; YWO; WO
+1536; WEST-CREE YWO; WO
+1537; YWOO; WOO
+1538; WEST-CREE YWOO; WOO
+1539; YWA; WA
+153A; WEST-CREE YWA; WA
+153B; YWAA; WAA
+153C; WEST-CREE YWAA; WAA
+153D; NASKAPI YWAA; WAA
+153E; Y; C
+153F; BIBLE-CREE Y; C
+1540; WEST-CREE Y; C
+1541; SAYISI YI; I
+1542; RE; E
+1543; R-CREE RE; E
+1544; WEST-CREE LE; E
+1545; RAAI; AAI
+1546; RI; I
+1547; RII; II
+1548; RO; O
+1549; ROO; OO
+154A; WEST-CREE LO; O
+154B; RA; A
+154C; RAA; AA
+154D; WEST-CREE LA; A
+154E; RWAA; WAA
+154F; WEST-CREE RWAA; WAA
+1550; R; C
+1551; WEST-CREE R; C
+1552; MEDIAL R; C
+1553; FE; E
+1554; FAAI; AAI
+1555; FI; I
+1556; FII; II
+1557; FO; O
+1558; FOO; OO
+1559; FA; A
+155A; FAA; AA
+155B; FWAA; WAA
+155C; WEST-CREE FWAA; WAA
+155D; F; C
+155E; THE; E
+155F; N-CREE THE; E
+1560; THI; I
+1561; N-CREE THI; I
+1562; THII; II
+1563; N-CREE THII; II
+1564; THO; O
+1565; THOO; OO
+1566; THA; A
+1567; THAA; AA
+1568; THWAA; WAA
+1569; WEST-CREE THWAA; WAA
+156A; TH; C
+156B; TTHE; E
+156C; TTHI; I
+156D; TTHO; O
+156E; TTHA; A
+156F; TTH; C
+1570; TYE; E
+1571; TYI; I
+1572; TYO; O
+1573; TYA; A
+1574; NUNAVIK HE; E
+1575; NUNAVIK HI; I
+1576; NUNAVIK HII; II
+1577; NUNAVIK HO; O
+1578; NUNAVIK HOO; OO
+1579; NUNAVIK HA; A
+157A; NUNAVIK HAA; AA
+157B; NUNAVIK H; C
+157C; NUNAVUT H; C
+157D; HK; C
+157E; QAAI; AAI
+157F; QI; I
+1580; QII; II
+1581; QO; O
+1582; QOO; OO
+1583; QA; A
+1584; QAA; AA
+1585; Q; C
+1586; TLHE; E
+1587; TLHI; I
+1588; TLHO; O
+1589; TLHA; A
+158A; WEST-CREE RE; E
+158B; WEST-CREE RI; I
+158C; WEST-CREE RO; O
+158D; WEST-CREE RA; A
+158E; NGAAI; AAI
+158F; NGI; I
+1590; NGII; II
+1591; NGO; O
+1592; NGOO; OO
+1593; NGA; A
+1594; NGAA; AA
+1595; NG; C
+1596; NNG; C
+1597; SAYISI SHE; E
+1598; SAYISI SHI; I
+1599; SAYISI SHO; O
+159A; SAYISI SHA; A
+159B; WOODS-CREE THE; E
+159C; WOODS-CREE THI; I
+159D; WOODS-CREE THO; O
+159E; WOODS-CREE THA; A
+159F; WOODS-CREE TH; C
+15A0; LHI; I
+15A1; LHII; II
+15A2; LHO; O
+15A3; LHOO; OO
+15A4; LHA; A
+15A5; LHAA; AA
+15A6; LH; C
+15A7; TH-CREE THE; E
+15A8; TH-CREE THI; I
+15A9; TH-CREE THII; II
+15AA; TH-CREE THO; O
+15AB; TH-CREE THOO; OO
+15AC; TH-CREE THA; A
+15AD; TH-CREE THAA; AA
+15AE; TH-CREE TH; C
+15AF; AIVILIK B; C
+15B0; BLACKFOOT E; E
+15B1; BLACKFOOT I; I
+15B2; BLACKFOOT O; O
+15B3; BLACKFOOT A; A
+15B4; BLACKFOOT WE; E
+15B5; BLACKFOOT WI; I
+15B6; BLACKFOOT WO; O
+15B7; BLACKFOOT WA; A
+15B8; BLACKFOOT NE; E
+15B9; BLACKFOOT NI; I
+15BA; BLACKFOOT NO; O
+15BB; BLACKFOOT NA; A
+15BC; BLACKFOOT KE; E
+15BD; BLACKFOOT KI; I
+15BE; BLACKFOOT KO; O
+15BF; BLACKFOOT KA; A
+15C0; SAYISI HE; E
+15C1; SAYISI HI; I
+15C2; SAYISI HO; O
+15C3; SAYISI HA; A
+15C4; CARRIER GHU; U
+15C5; CARRIER GHO; O
+15C6; CARRIER GHE; E
+15C7; CARRIER GHEE; EE
+15C8; CARRIER GHI; I
+15C9; CARRIER GHA; A
+15CA; CARRIER RU; U
+15CB; CARRIER RO; O
+15CC; CARRIER RE; E
+15CD; CARRIER REE; EE
+15CE; CARRIER RI; I
+15CF; CARRIER RA; A
+15D0; CARRIER WU; U
+15D1; CARRIER WO; O
+15D2; CARRIER WE; E
+15D3; CARRIER WEE; EE
+15D4; CARRIER WI; I
+15D5; CARRIER WA; A
+15D6; CARRIER HWU; WU
+15D7; CARRIER HWO; WO
+15D8; CARRIER HWE; WE
+15D9; CARRIER HWEE; WEE
+15DA; CARRIER HWI; WI
+15DB; CARRIER HWA; WA
+15DC; CARRIER THU; U
+15DD; CARRIER THO; O
+15DE; CARRIER THE; E
+15DF; CARRIER THEE; EE
+15E0; CARRIER THI; I
+15E1; CARRIER THA; A
+15E2; CARRIER TTU; U
+15E3; CARRIER TTO; O
+15E4; CARRIER TTE; E
+15E5; CARRIER TTEE; EE
+15E6; CARRIER TTI; I
+15E7; CARRIER TTA; A
+15E8; CARRIER PU; U
+15E9; CARRIER PO; O
+15EA; CARRIER PE; E
+15EB; CARRIER PEE; EE
+15EC; CARRIER PI; I
+15ED; CARRIER PA; A
+15EE; CARRIER P;
+15EF; CARRIER GU; U
+15F0; CARRIER GO; O
+15F1; CARRIER GE; E
+15F2; CARRIER GEE; EE
+15F3; CARRIER GI; I
+15F4; CARRIER GA; A
+15F5; CARRIER KHU; U
+15F6; CARRIER KHO; O
+15F7; CARRIER KHE; E
+15F8; CARRIER KHEE; EE
+15F9; CARRIER KHI; I
+15FA; CARRIER KHA; A
+15FB; CARRIER KKU; U
+15FC; CARRIER KKO; O
+15FD; CARRIER KKE; E
+15FE; CARRIER KKEE; EE
+15FF; CARRIER KKI; I
+1600; CARRIER KKA; A
+1601; CARRIER KK;
+1602; CARRIER NU; U
+1603; CARRIER NO; O
+1604; CARRIER NE; E
+1605; CARRIER NEE; EE
+1606; CARRIER NI; I
+1607; CARRIER NA; A
+1608; CARRIER MU; U
+1609; CARRIER MO; O
+160A; CARRIER ME; E
+160B; CARRIER MEE; EE
+160C; CARRIER MI; I
+160D; CARRIER MA; A
+160E; CARRIER YU; U
+160F; CARRIER YO; O
+1610; CARRIER YE; E
+1611; CARRIER YEE; EE
+1612; CARRIER YI; I
+1613; CARRIER YA; A
+1614; CARRIER JU; U
+1615; SAYISI JU; U
+1616; CARRIER JO; O
+1617; CARRIER JE; E
+1618; CARRIER JEE; EE
+1619; CARRIER JI; I
+161A; SAYISI JI; I
+161B; CARRIER JA; A
+161C; CARRIER JJU; U
+161D; CARRIER JJO; O
+161E; CARRIER JJE; E
+161F; CARRIER JJEE; EE
+1620; CARRIER JJI; I
+1621; CARRIER JJA; A
+1622; CARRIER LU; U
+1623; CARRIER LO; O
+1624; CARRIER LE; E
+1625; CARRIER LEE; EE
+1626; CARRIER LI; I
+1627; CARRIER LA; A
+1628; CARRIER DLU; U
+1629; CARRIER DLO; O
+162A; CARRIER DLE; E
+162B; CARRIER DLEE; EE
+162C; CARRIER DLI; I
+162D; CARRIER DLA; A
+162E; CARRIER LHU; U
+162F; CARRIER LHO; O
+1630; CARRIER LHE; E
+1631; CARRIER LHEE; EE
+1632; CARRIER LHI; I
+1633; CARRIER LHA; A
+1634; CARRIER TLHU; U
+1635; CARRIER TLHO; O
+1636; CARRIER TLHE; E
+1637; CARRIER TLHEE; EE
+1638; CARRIER TLHI; I
+1639; CARRIER TLHA; A
+163A; CARRIER TLU; U
+163B; CARRIER TLO; O
+163C; CARRIER TLE; E
+163D; CARRIER TLEE; EE
+163E; CARRIER TLI; I
+163F; CARRIER TLA; A
+1640; CARRIER ZU; U
+1641; CARRIER ZO; O
+1642; CARRIER ZE; E
+1643; CARRIER ZEE; EE
+1644; CARRIER ZI; I
+1645; CARRIER ZA; A
+1646; CARRIER Z;
+1647; CARRIER INITIAL Z;
+1648; CARRIER DZU; U
+1649; CARRIER DZO; O
+164A; CARRIER DZE; E
+164B; CARRIER DZEE; EE
+164C; CARRIER DZI; I
+164D; CARRIER DZA; A
+164E; CARRIER SU; U
+164F; CARRIER SO; O
+1650; CARRIER SE; E
+1651; CARRIER SEE; EE
+1652; CARRIER SI; I
+1653; CARRIER SA; A
+1654; CARRIER SHU; U
+1655; CARRIER SHO; O
+1656; CARRIER SHE; E
+1657; CARRIER SHEE; EE
+1658; CARRIER SHI; I
+1659; CARRIER SHA; A
+165A; CARRIER SH;
+165B; CARRIER TSU; U
+165C; CARRIER TSO; O
+165D; CARRIER TSE; E
+165E; CARRIER TSEE; EE
+165F; CARRIER TSI; I
+1660; CARRIER TSA; A
+1661; CARRIER CHU; U
+1662; CARRIER CHO; O
+1663; CARRIER CHE; E
+1664; CARRIER CHEE; EE
+1665; CARRIER CHI; I
+1666; CARRIER CHA; A
+1667; CARRIER TTSU; U
+1668; CARRIER TTSO; O
+1669; CARRIER TTSE; E
+166A; CARRIER TTSEE; EE
+166B; CARRIER TTSI; I
+166C; CARRIER TTSA; A
+166F; QAI; AI
+1670; NGAI; AI
+1671; NNGI; I
+1672; NNGII; II
+1673; NNGO; O
+1674; NNGOO; OO
+1675; NNGA; A
+1676; NNGAA; AA
+#
+# Katakana
+#
+30A1; SMALL A; A
+30A2; A; A
+30A3; SMALL I; I
+30A4; I; I
+30A5; SMALL U; U
+30A6; U; U
+30A7; SMALL E; E
+30A8; E; E
+30A9; SMALL O; O
+30AA; O; O
+30AB; KA; A
+30AC; GA; A
+30AD; KI; I
+30AE; GI; I
+30AF; KU; U
+30B0; GU; U
+30B1; KE; E
+30B2; GE; E
+30B3; KO; O
+30B4; GO; O
+30B5; SA; A
+30B6; ZA; A
+30B7; SI; I
+30B8; ZI; I
+30B9; SU; U
+30BA; ZU; U
+30BB; SE; E
+30BC; ZE; E
+30BD; SO; O
+30BE; ZO; O
+30BF; TA; A
+30C0; DA; A
+30C1; TI; I
+30C2; DI; I
+30C3; SMALL TU; U
+30C4; TU; U
+30C5; DU; U
+30C6; TE; E
+30C7; DE; E
+30C8; TO; O
+30C9; DO; O
+30CA; NA; A
+30CB; NI; I
+30CC; NU; U
+30CD; NE; E
+30CE; NO; O
+30CF; HA; A
+30D0; BA; A
+30D1; PA; A
+30D2; HI; I
+30D3; BI; I
+30D4; PI; I
+30D5; HU; U
+30D6; BU; U
+30D7; PU; U
+30D8; HE; E
+30D9; BE; E
+30DA; PE; E
+30DB; HO; O
+30DC; BO; O
+30DD; PO; O
+30DE; MA; A
+30DF; MI; I
+30E0; MU; U
+30E1; ME; E
+30E2; MO; O
+30E3; SMALL YA; A
+30E4; YA; A
+30E5; SMALL YU; U
+30E6; YU; U
+30E7; SMALL YO; O
+30E8; YO; O
+30E9; RA; A
+30EA; RI; I
+30EB; RU; U
+30EC; RE; E
+30ED; RO; O
+30EE; SMALL WA; A
+30EF; WA; A
+30F0; WI; I
+30F1; WE; E
+30F2; WO; O
+30F3; N; C
+30F4; VU; U
+30F5; SMALL KA; A
+30F6; SMALL KE; E
+30F7; VA; A
+30F8; VI; I
+30F9; VE; E
+30FA; VO; O
+32D0; CIRCLED KATAKANA A; A
+32D1; CIRCLED KATAKANA I; I
+32D2; CIRCLED KATAKANA U; U
+32D3; CIRCLED KATAKANA E; E
+32D4; CIRCLED KATAKANA O; O
+32D5; CIRCLED KATAKANA KA; A
+32D6; CIRCLED KATAKANA KI; I
+32D7; CIRCLED KATAKANA KU; U
+32D8; CIRCLED KATAKANA KE; E
+32D9; CIRCLED KATAKANA KO; O
+32DA; CIRCLED KATAKANA SA; A
+32DB; CIRCLED KATAKANA SI; I
+32DC; CIRCLED KATAKANA SU; U
+32DD; CIRCLED KATAKANA SE; E
+32DE; CIRCLED KATAKANA SO; O
+32DF; CIRCLED KATAKANA TA; A
+32E0; CIRCLED KATAKANA TI; I
+32E1; CIRCLED KATAKANA TU; U
+32E2; CIRCLED KATAKANA TE; E
+32E3; CIRCLED KATAKANA TO; O
+32E4; CIRCLED KATAKANA NA; A
+32E5; CIRCLED KATAKANA NI; I
+32E6; CIRCLED KATAKANA NU; U
+32E7; CIRCLED KATAKANA NE; E
+32E8; CIRCLED KATAKANA NO; O
+32E9; CIRCLED KATAKANA HA; A
+32EA; CIRCLED KATAKANA HI; I
+32EB; CIRCLED KATAKANA HU; U
+32EC; CIRCLED KATAKANA HE; E
+32ED; CIRCLED KATAKANA HO; O
+32EE; CIRCLED KATAKANA MA; A
+32EF; CIRCLED KATAKANA MI; I
+32F0; CIRCLED KATAKANA MU; U
+32F1; CIRCLED KATAKANA ME; E
+32F2; CIRCLED KATAKANA MO; O
+32F3; CIRCLED KATAKANA YA; A
+32F4; CIRCLED KATAKANA YU; U
+32F5; CIRCLED KATAKANA YO; O
+32F6; CIRCLED KATAKANA RA; A
+32F7; CIRCLED KATAKANA RI; I
+32F8; CIRCLED KATAKANA RU; U
+32F9; CIRCLED KATAKANA RE; E
+32FA; CIRCLED KATAKANA RO; O
+32FB; CIRCLED KATAKANA WA; A
+32FC; CIRCLED KATAKANA WI; I
+32FD; CIRCLED KATAKANA WE; E
+32FE; CIRCLED KATAKANA WO; O
+#
+# Katakana
+#
+FF66; HALFWIDTH WO; O
+FF67; HALFWIDTH SMALL A; A
+FF68; HALFWIDTH SMALL I; I
+FF69; HALFWIDTH SMALL U; U
+FF6A; HALFWIDTH SMALL E; E
+FF6B; HALFWIDTH SMALL O; O
+FF6C; HALFWIDTH SMALL YA; A
+FF6D; HALFWIDTH SMALL YU; U
+FF6E; HALFWIDTH SMALL YO; O
+FF6F; HALFWIDTH SMALL TU; U
+FF71; HALFWIDTH A; A
+FF72; HALFWIDTH I; I
+FF73; HALFWIDTH U; U
+FF74; HALFWIDTH E; E
+FF75; HALFWIDTH O; O
+FF76; HALFWIDTH KA; A
+FF77; HALFWIDTH KI; I
+FF78; HALFWIDTH KU; U
+FF79; HALFWIDTH KE; E
+FF7A; HALFWIDTH KO; O
+FF7B; HALFWIDTH SA; A
+FF7C; HALFWIDTH SI; I
+FF7D; HALFWIDTH SU; U
+FF7E; HALFWIDTH SE; E
+FF7F; HALFWIDTH SO; O
+FF80; HALFWIDTH TA; A
+FF81; HALFWIDTH TI; I
+FF82; HALFWIDTH TU; U
+FF83; HALFWIDTH TE; E
+FF84; HALFWIDTH TO; O
+FF85; HALFWIDTH NA; A
+FF86; HALFWIDTH NI; I
+FF87; HALFWIDTH NU; U
+FF88; HALFWIDTH NE; E
+FF89; HALFWIDTH NO; O
+FF8A; HALFWIDTH HA; A
+FF8B; HALFWIDTH HI; I
+FF8C; HALFWIDTH HU; U
+FF8D; HALFWIDTH HE; E
+FF8E; HALFWIDTH HO; O
+FF8F; HALFWIDTH MA; A
+FF90; HALFWIDTH MI; I
+FF91; HALFWIDTH MU; U
+FF92; HALFWIDTH ME; E
+FF93; HALFWIDTH MO; O
+FF94; HALFWIDTH YA; A
+FF95; HALFWIDTH YU; U
+FF96; HALFWIDTH YO; O
+FF97; HALFWIDTH RA; A
+FF98; HALFWIDTH RI; I
+FF99; HALFWIDTH RU; U
+FF9A; HALFWIDTH RE; E
+FF9B; HALFWIDTH RO; O
+FF9C; HALFWIDTH WA; A
+FF9D; HALFWIDTH N; C
+#
+# Hiragana
+#
+3041; SMALL A; A
+3042; A; A
+3043; SMALL I; I
+3044; I; I
+3045; SMALL U; U
+3046; U; U
+3047; SMALL E; E
+3048; E; E
+3049; SMALL O; O
+304A; O; O
+304B; KA; A
+304C; GA; A
+304D; KI; I
+304E; GI; I
+304F; KU; U
+3050; GU; U
+3051; KE; E
+3052; GE; E
+3053; KO; O
+3054; GO; O
+3055; SA; A
+3056; ZA; A
+3057; SI; I
+3058; ZI; I
+3059; SU; U
+305A; ZU; U
+305B; SE; E
+305C; ZE; E
+305D; SO; O
+305E; ZO; O
+305F; TA; A
+3060; DA; A
+3061; TI; I
+3062; DI; I
+3063; SMALL TU; U
+3064; TU; U
+3065; DU; U
+3066; TE; E
+3067; DE; E
+3068; TO; O
+3069; DO; O
+306A; NA; A
+306B; NI; I
+306C; NU; U
+306D; NE; E
+306E; NO; O
+306F; HA; A
+3070; BA; A
+3071; PA; A
+3072; HI; I
+3073; BI; I
+3074; PI; I
+3075; HU; U
+3076; BU; U
+3077; PU; U
+3078; HE; E
+3079; BE; E
+307A; PE; E
+307B; HO; O
+307C; BO; O
+307D; PO; O
+307E; MA; A
+307F; MI; I
+3080; MU; U
+3081; ME; E
+3082; MO; O
+3083; SMALL YA; A
+3084; YA; A
+3085; SMALL YU; U
+3086; YU; U
+3087; SMALL YO; O
+3088; YO; O
+3089; RA; A
+308A; RI; I
+308B; RU; U
+308C; RE; E
+308D; RO; O
+308E; SMALL WA; A
+308F; WA; A
+3090; WI; I
+3091; WE; E
+3092; WO; O
+3093; N; N
+3094; VU; U
diff --git a/contrib/perl5/lib/utf8.pm b/contrib/perl5/lib/utf8.pm
index 17ec37b..6d6c0eb 100644
--- a/contrib/perl5/lib/utf8.pm
+++ b/contrib/perl5/lib/utf8.pm
@@ -1,5 +1,7 @@
package utf8;
+if (ord('A') != 193) { # make things more pragmatic for EBCDIC folk
+
$utf8::hint_bits = 0x00800000;
sub import {
@@ -13,7 +15,10 @@ sub unimport {
sub AUTOLOAD {
require "utf8_heavy.pl";
- goto &$AUTOLOAD;
+ goto &$AUTOLOAD if defined &$AUTOLOAD;
+ Carp::croak("Undefined subroutine $AUTOLOAD called");
+}
+
}
1;
@@ -44,7 +49,9 @@ in future we would like to standardize on the UTF-8 encoding for
source text. Until UTF-8 becomes the default format for source
text, this pragma should be used to recognize UTF-8 in the source.
When UTF-8 becomes the standard source format, this pragma will
-effectively become a no-op.
+effectively become a no-op. This pragma already is a no-op on
+EBCDIC platforms (where it is alright to code perl in EBCDIC
+rather than UTF-8).
Enabling the C<utf8> pragma has the following effects:
diff --git a/contrib/perl5/lib/vars.pm b/contrib/perl5/lib/vars.pm
index bde0b2a..39a15bd 100644
--- a/contrib/perl5/lib/vars.pm
+++ b/contrib/perl5/lib/vars.pm
@@ -8,7 +8,9 @@ require 5.002;
# if Carp hasn't been loaded in earlier compile time. :-(
# We'll let those bugs get found on the development track.
require Carp if $] < 5.00450;
-use warnings::register();
+
+use warnings::register;
+require strict;
sub import {
my $callpack = caller;
@@ -25,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"} =
diff --git a/contrib/perl5/lib/warnings.pm b/contrib/perl5/lib/warnings.pm
index 11558d5..2517239 100644
--- a/contrib/perl5/lib/warnings.pm
+++ b/contrib/perl5/lib/warnings.pm
@@ -26,6 +26,14 @@ warnings - Perl pragma to control optional warnings
warnings::warn("void", "some warning");
}
+ if (warnings::enabled($object)) {
+ warnings::warn($object, "some warning");
+ }
+
+ warnif("some warning");
+ warnif("void", "some warning");
+ warnif($object, "some warning");
+
=head1 DESCRIPTION
If no import list is supplied, all possible warnings are either enabled
@@ -37,30 +45,82 @@ A number of functions are provided to assist module authors.
=item use warnings::register
-Creates a new warnings category which has the same name as the module
-where the call to the pragma is used.
+Creates a new warnings category with the same name as the package where
+the call to the pragma is used.
+
+=item warnings::enabled()
+
+Use the warnings category with the same name as the current package.
+
+Return TRUE if that warnings category is enabled in the calling module.
+Otherwise returns FALSE.
+
+=item warnings::enabled($category)
+
+Return TRUE if the warnings category, C<$category>, is enabled in the
+calling module.
+Otherwise returns FALSE.
+
+=item warnings::enabled($object)
+
+Use the name of the class for the object reference, C<$object>, as the
+warnings category.
+
+Return TRUE if that warnings category is enabled in the first scope
+where the object is used.
+Otherwise returns FALSE.
+
+=item warnings::warn($message)
+
+Print C<$message> to STDERR.
+
+Use the warnings category with the same name as the current package.
+
+If that warnings category has been set to "FATAL" in the calling module
+then die. Otherwise return.
+
+=item warnings::warn($category, $message)
+
+Print C<$message> to STDERR.
+
+If the warnings category, C<$category>, has been set to "FATAL" in the
+calling module then die. Otherwise return.
+
+=item warnings::warn($object, $message)
-=item warnings::enabled([$category])
+Print C<$message> to STDERR.
-Returns TRUE if the warnings category C<$category> is enabled in the
-calling module. Otherwise returns FALSE.
+Use the name of the class for the object reference, C<$object>, as the
+warnings category.
-If the parameter, C<$category>, isn't supplied, the current package name
-will be used.
+If that warnings category has been set to "FATAL" in the scope where C<$object>
+is first used then die. Otherwise return.
-=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.
+=item warnings::warnif($message)
-If the parameter, C<$category>, isn't supplied, the current package name
-will be used.
+Equivalent to:
+
+ if (warnings::enabled())
+ { warnings::warn($message) }
+
+=item warnings::warnif($category, $message)
+
+Equivalent to:
+
+ if (warnings::enabled($category))
+ { warnings::warn($category, $message) }
+
+=item warnings::warnif($object, $message)
+
+Equivalent to:
+
+ if (warnings::enabled($object))
+ { warnings::warn($object, $message) }
=back
-See L<perlmod/Pragmatic Modules> and L<perllexwarn>.
+See L<perlmodlib/Pragmatic Modules> and L<perllexwarn>.
=cut
@@ -243,44 +303,80 @@ sub bits {
sub import {
shift;
- ${^WARNING_BITS} |= bits(@_ ? @_ : 'all') ;
+ my $mask = ${^WARNING_BITS} ;
+ if (vec($mask, $Offsets{'all'}, 1)) {
+ $mask |= $Bits{'all'} ;
+ $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
+ }
+ ${^WARNING_BITS} = $mask | bits(@_ ? @_ : 'all') ;
}
sub unimport {
shift;
my $mask = ${^WARNING_BITS} ;
if (vec($mask, $Offsets{'all'}, 1)) {
- $mask = $Bits{'all'} ;
+ $mask |= $Bits{'all'} ;
$mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
}
${^WARNING_BITS} = $mask & ~ (bits(@_ ? @_ : 'all') | $All) ;
}
-sub enabled
+sub __chk
{
- croak("Usage: warnings::enabled([category])")
- unless @_ == 1 || @_ == 0 ;
- local $Carp::CarpLevel = 1 ;
my $category ;
my $offset ;
- my $callers_bitmask = (caller(1))[9] ;
- return 0 unless defined $callers_bitmask ;
-
+ my $isobj = 0 ;
if (@_) {
# check the category supplied.
$category = shift ;
+ if (ref $category) {
+ croak ("not an object")
+ if $category !~ /^([^=]+)=/ ;+
+ $category = $1 ;
+ $isobj = 1 ;
+ }
$offset = $Offsets{$category};
croak("unknown warnings category '$category'")
unless defined $offset;
}
else {
- $category = (caller(0))[0] ;
+ $category = (caller(1))[0] ;
$offset = $Offsets{$category};
croak("package '$category' not registered for warnings")
unless defined $offset ;
}
+ my $this_pkg = (caller(1))[0] ;
+ my $i = 2 ;
+ my $pkg ;
+
+ if ($isobj) {
+ while (do { { package DB; $pkg = (caller($i++))[0] } } ) {
+ last unless @DB::args && $DB::args[0] =~ /^$category=/ ;
+ }
+ $i -= 2 ;
+ }
+ else {
+ for ($i = 2 ; $pkg = (caller($i))[0] ; ++ $i) {
+ last if $pkg ne $this_pkg ;
+ }
+ $i = 2
+ if !$pkg || $pkg eq $this_pkg ;
+ }
+
+ my $callers_bitmask = (caller($i))[9] ;
+ return ($callers_bitmask, $offset, $i) ;
+}
+
+sub enabled
+{
+ croak("Usage: warnings::enabled([category])")
+ unless @_ == 1 || @_ == 0 ;
+
+ my ($callers_bitmask, $offset, $i) = __chk(@_) ;
+
+ return 0 unless defined $callers_bitmask ;
return vec($callers_bitmask, $offset, 1) ||
vec($callers_bitmask, $Offsets{'all'}, 1) ;
}
@@ -290,29 +386,34 @@ sub warn
{
croak("Usage: warnings::warn([category,] 'message')")
unless @_ == 2 || @_ == 1 ;
- local $Carp::CarpLevel = 1 ;
- my $category ;
- my $offset ;
- my $callers_bitmask = (caller(1))[9] ;
-
- if (@_ == 2) {
- $category = shift ;
- $offset = $Offsets{$category};
- croak("unknown warnings category '$category'")
- unless defined $offset ;
- }
- else {
- $category = (caller(0))[0] ;
- $offset = $Offsets{$category};
- croak("package '$category' not registered for warnings")
- unless defined $offset ;
- }
- my $message = shift ;
+ my $message = pop ;
+ my ($callers_bitmask, $offset, $i) = __chk(@_) ;
+ local $Carp::CarpLevel = $i ;
croak($message)
if vec($callers_bitmask, $offset+1, 1) ||
vec($callers_bitmask, $Offsets{'all'}+1, 1) ;
carp($message) ;
}
+sub warnif
+{
+ croak("Usage: warnings::warnif([category,] 'message')")
+ unless @_ == 2 || @_ == 1 ;
+
+ my $message = pop ;
+ my ($callers_bitmask, $offset, $i) = __chk(@_) ;
+ local $Carp::CarpLevel = $i ;
+
+ return
+ unless defined $callers_bitmask &&
+ (vec($callers_bitmask, $offset, 1) ||
+ vec($callers_bitmask, $Offsets{'all'}, 1)) ;
+
+ croak($message)
+ if vec($callers_bitmask, $offset+1, 1) ||
+ vec($callers_bitmask, $Offsets{'all'}+1, 1) ;
+
+ carp($message) ;
+}
1;
diff --git a/contrib/perl5/lib/warnings/register.pm b/contrib/perl5/lib/warnings/register.pm
index da6be97..f98075a 100644
--- a/contrib/perl5/lib/warnings/register.pm
+++ b/contrib/perl5/lib/warnings/register.pm
@@ -1,5 +1,13 @@
package warnings::register ;
+=pod
+
+=head1 NAME
+
+warnings::register - warnings import function
+
+=cut
+
require warnings ;
sub mkMask
OpenPOWER on IntegriCloud