platform/upstream/perl.git
12 years agoperluniprops: Insert placeholder
Karl Williamson [Tue, 11 Oct 2011 01:56:20 +0000 (19:56 -0600)]
perluniprops: Insert placeholder

This adds text to perluniprops in case an installation has recompiled
enabling every Unicode property, so that there isn't just a blank spot
in the pod.

12 years agomktables: Factor out a constant string to a variable
Karl Williamson [Tue, 11 Oct 2011 01:54:27 +0000 (19:54 -0600)]
mktables: Factor out a constant string to a variable

A future commit will want to use this same text.

12 years agomktables: Change variable name
Karl Williamson [Mon, 10 Oct 2011 16:50:22 +0000 (10:50 -0600)]
mktables: Change variable name

A future commit will use the current name for a purpose for which it
makes more sense.

12 years agoperluniprops: Slight wording changes
Karl Williamson [Sat, 8 Oct 2011 21:04:12 +0000 (15:04 -0600)]
perluniprops: Slight wording changes

12 years agoperluniprops: Add info about unused Unicode files
Karl Williamson [Sat, 8 Oct 2011 20:55:19 +0000 (14:55 -0600)]
perluniprops: Add info about unused Unicode files

A new section to the pod is added.

12 years agomktables: More detail on ignored files
Karl Williamson [Sat, 8 Oct 2011 19:25:56 +0000 (13:25 -0600)]
mktables: More detail on ignored files

This improves the wording on files that are delivered by Unicode and
aren't used by mktables; and adds the documentation files that
previously weren't listed.  This is in preparation for perluniprops
listing these.

12 years agomktables: Add reason skipping input files
Karl Williamson [Sat, 8 Oct 2011 19:17:27 +0000 (13:17 -0600)]
mktables: Add reason skipping input files

Some files may be in the directory but we don't currently process them.
Add a reason as to why, and add them to the global list of ignored
files.  This is in preparation to changing perluniprops to note them.

12 years agomktables; Use variable instead of hard-coded name
Karl Williamson [Thu, 6 Oct 2011 04:15:52 +0000 (22:15 -0600)]
mktables; Use variable instead of hard-coded name

Earlier commits changed the properties that are to be internal-only to
have that flagged.  Now use that instead of relying on the name
beginning with an underscore.

12 years agomktables: Change name of field for to indicate restricted use
Karl Williamson [Wed, 5 Oct 2011 14:37:44 +0000 (08:37 -0600)]
mktables: Change name of field for to indicate restricted use

Future commits will add a new section to the generated pod.  The
existing pod entries are just for regular expressions.  Change the names
to reflect that.

12 years agomktables: Improve comment
Karl Williamson [Tue, 4 Oct 2011 20:42:07 +0000 (14:42 -0600)]
mktables: Improve comment

The comment is repeated in the generated Name.pm file

12 years agoUse newly created Name.pm file
Karl Williamson [Tue, 4 Oct 2011 17:58:52 +0000 (11:58 -0600)]
Use newly created Name.pm file

Name.pm has been populated in an earlier commit.  This removes the
now redundant information in Name.pl, and changes charnames to include
the new Name.pm

12 years agomktables: Actually write data into Name.pm
Karl Williamson [Tue, 4 Oct 2011 20:06:58 +0000 (14:06 -0600)]
mktables: Actually write data into Name.pm

Earlier commits have paved the way for actual data to be placed into
this file

12 years agomktables: White space only
Karl Williamson [Tue, 4 Oct 2011 19:57:42 +0000 (13:57 -0600)]
mktables: White space only

Removing the nesting if, and the fact that this code was just copied
from a place where it was nested deeper means that we can outdent.

12 years agomktables: Rmv redundant checks
Karl Williamson [Tue, 4 Oct 2011 19:41:00 +0000 (13:41 -0600)]
mktables: Rmv redundant checks

This code was just copied to its new location.  It will only be used
once, so don't need to check that it's for the correct properties, and a
line just above also checked that it's needed or not, so the whole if
can be removed

12 years agomktables: Copy code to new location.
Karl Williamson [Tue, 4 Oct 2011 18:14:07 +0000 (12:14 -0600)]
mktables: Copy code to new location.

This is simply a straight copy of code that currently gets put into
Name.pl into the subroutine that creates Name.pm.

The only other change is to define and set $pre_body to the empty
string, so that this code will compile in the new place, but the results
are discarded.

12 years agomktables: whitespace changes only
Karl Williamson [Tue, 4 Oct 2011 17:57:57 +0000 (11:57 -0600)]
mktables: whitespace changes only

Indent to correspond to newly formed block around this code

12 years agomktables: refactor algorithmically-defined names into globals
Karl Williamson [Tue, 4 Oct 2011 16:41:28 +0000 (10:41 -0600)]
mktables: refactor algorithmically-defined names into globals

This is in preparation for splitting the Name.pl and Name.pm files.
Prior to this patch, the code is copied into any file that needs it.
After this patch, it will be possible to store the code in Name.pm
once.

The main issue here is that Perl creates the Perl_charname file,
and the To/Name.pl file, both of which contain the Name property (the
first one also contains other things.)  Normally the To/Name.pl is
suppressed, but things can be configured so it is output.  The
subroutines that deal with algorithmically defined names are duplicated
in both files.  Future commits will also have Unicode::UCD refer to
those subroutines.  We do not want a calling program to load duplicate
or triplicate definitions of those subroutines, so we are refactoring
them into Name.pm, which can be included just once.

12 years agomktables: Generate empty Name.pm
Karl Williamson [Tue, 4 Oct 2011 15:57:35 +0000 (09:57 -0600)]
mktables: Generate empty Name.pm

This file in later commits will take over portions of Name.pl

12 years agoFix up some properties internal-onlyness
Karl Williamson [Tue, 4 Oct 2011 14:38:46 +0000 (08:38 -0600)]
Fix up some properties internal-onlyness

Several properties aren't marked as internal-only, that should be,
and vice versa.  This doesn't make a difference now, but will for future
commits

12 years agomktables: Refactor INTERNAL ONLY warning generation
Karl Williamson [Sun, 2 Oct 2011 18:26:45 +0000 (12:26 -0600)]
mktables: Refactor INTERNAL ONLY warning generation

All match tables are marked as for Perl core use only.  This commit
causes this to happen in the header method for these tables.  Most map
tables are also marked, and this is now done in its header method.

This will be useful for later commits

12 years agomktables: Mark props that are perl extensions
Karl Williamson [Sat, 1 Oct 2011 21:41:41 +0000 (15:41 -0600)]
mktables: Mark props that are perl extensions

Several properties are Perl extensions without this fact being marked.

12 years agomktables: Change formal parameter name
Karl Williamson [Fri, 30 Sep 2011 03:53:23 +0000 (21:53 -0600)]
mktables: Change formal parameter name

This is to better reflect how future commits will treat this

12 years agomktables: ALERT for U+0007 is really an alias
Karl Williamson [Fri, 30 Sep 2011 03:39:45 +0000 (21:39 -0600)]
mktables: ALERT for U+0007 is really an alias

The previous solution to fixing the problem that ALERT is replacing BELL
for the name of U+0007, changed the name of that code point, but the
better solution, which will matter in future commits, is to change the
name to nothing, and add an alias of ALERT.

12 years agoperluniprops: clarify why ISO_Comment is deprecated
Karl Williamson [Fri, 30 Sep 2011 02:00:43 +0000 (20:00 -0600)]
perluniprops: clarify why ISO_Comment is deprecated

12 years agomktables: XONfoo properties are deprecated
Karl Williamson [Tue, 20 Sep 2011 14:38:22 +0000 (08:38 -0600)]
mktables: XONfoo properties are deprecated

An installation can choose to not suppress these properties, but they
are deprecated none-the-less, and should be listed in the documentation
as such.

12 years agomktables: Move Decomposition_Type suppression
Karl Williamson [Tue, 20 Sep 2011 14:34:18 +0000 (08:34 -0600)]
mktables: Move Decomposition_Type suppression

This table is ordinarily not written out.  The place to do that is where
other similar decisions are made.

12 years agoUCD.t: fix test names
Karl Williamson [Wed, 14 Sep 2011 15:46:14 +0000 (09:46 -0600)]
UCD.t: fix test names

12 years agoChange internal sub name to begin with underscore
Karl Williamson [Wed, 14 Sep 2011 15:17:03 +0000 (09:17 -0600)]
Change internal sub name to begin with underscore

This is in the utf8 package, which is used in a number of places,
so change the name to avoid potential conflicts

12 years agoUCD.t: Convert to use done_testing()
Karl Williamson [Wed, 14 Sep 2011 01:54:32 +0000 (19:54 -0600)]
UCD.t: Convert to use done_testing()

Future commits will introduce many more tests that are fairly difficult
to count ahead of time.

12 years agoUnicode::UCD: various nits in pod
Karl Williamson [Wed, 14 Sep 2011 01:50:04 +0000 (19:50 -0600)]
Unicode::UCD: various nits in pod

12 years agoUnicode::UCD: correct minor pod error
Karl Williamson [Wed, 14 Sep 2011 01:38:33 +0000 (19:38 -0600)]
Unicode::UCD: correct minor pod error

An unassigned code point is considered to be in the "Unknown" script by
Unicode, and since 5.14, this function returns that correct value.

12 years agomktables: output floating pt as strings
Karl Williamson [Mon, 5 Sep 2011 04:12:11 +0000 (22:12 -0600)]
mktables: output floating pt as strings

mktables creates data structures on files that are later read in.  Some
of these are nominally floating point numbers, like 2.0.  But they are
actually version numbers, and if output without being quoted, they will
be read in as just an integer and a string compare will fail.  Actual
floating point numbers are also output, but if these are output enclosed
in quotes, they will be coerced into the correct data type when
necessary.

This fix doesn't correct any known existing problems, but is needed for
future commits.

12 years agoperluniprops: Clarify language about obsoleted properties
Karl Williamson [Sat, 3 Sep 2011 19:12:26 +0000 (13:12 -0600)]
perluniprops: Clarify language about obsoleted properties

12 years agoperluniprops: Don't list newer internal-only properties
Karl Williamson [Sat, 3 Sep 2011 19:07:34 +0000 (13:07 -0600)]
perluniprops: Don't list newer internal-only properties

Certain property tables are constructed for Perls internal use.  The
ones already in existence when mktables was revamped were retained
just in case someone was using them; but the newer ones, plus ones yet
to be created shouldn't be used outside of the Perl core, and hence
shouldn't be documented.

12 years agomktables: Change variable name to prevent confusion
Karl Williamson [Sat, 3 Sep 2011 15:52:07 +0000 (09:52 -0600)]
mktables: Change variable name to prevent confusion

Best current practices say not to use 'last', as is ambiguous.  In this
case we mean 'max'

12 years agomktables: Don't output Decomposition Type mapping table
Karl Williamson [Tue, 23 Aug 2011 23:36:13 +0000 (17:36 -0600)]
mktables: Don't output Decomposition Type mapping table

This table is marked as for internal Perl use only, and its data are
already found in lib/unicore/Decomposition.pl

12 years agomktables: Add comment to db file
Karl Williamson [Tue, 23 Aug 2011 23:05:52 +0000 (17:05 -0600)]
mktables: Add comment to db file

The two properties have been combined into one table for some time.
This notes that fact

12 years agomktables: rmv extra blank between words
Karl Williamson [Tue, 23 Aug 2011 23:04:04 +0000 (17:04 -0600)]
mktables: rmv extra blank between words

12 years agomktables: Don't use hard-coded strings hash keys
Karl Williamson [Tue, 23 Aug 2011 23:02:05 +0000 (17:02 -0600)]
mktables: Don't use hard-coded strings hash keys

I'm always nervous about using strings for hash keys.  I could make a
typo and not know it.  This changes a set of these into using $variables
instead, so that a typo will cause a syntax error.

12 years agomktables: Don't hard-code true/false synonyms
Karl Williamson [Tue, 23 Aug 2011 22:59:29 +0000 (16:59 -0600)]
mktables: Don't hard-code true/false synonyms

Instead, use the vaules from a binary property furnished by Unicode.
Then, any changes to the synonyms are automatically propagated

12 years agomktables: New table format descriptor
Karl Williamson [Mon, 22 Aug 2011 17:44:22 +0000 (11:44 -0600)]
mktables: New table format descriptor

The ScriptExtensions property has a format that doesn't quite fit with
the existing ones.  Everything is a string, which prior to this commit,
it was set to, but some strings are blank separated lists of scripts,
and shouldn't be interpreted as just a string.  This change is for
Unicode::UCD::prop_invmap() function in current development.

12 years agomktables: generalize uniprops swash format table
Karl Williamson [Sat, 3 Sep 2011 20:56:57 +0000 (14:56 -0600)]
mktables: generalize uniprops swash format table

This makes the generated table of format strings in perluniprops go
through folding and tabbing.

12 years agomktables: kIICore becomes a forced bin property
Karl Williamson [Mon, 22 Aug 2011 01:14:42 +0000 (19:14 -0600)]
mktables: kIICore becomes a forced bin property

An earlier commit prepared the way to make this property be a
FORCED_BINARY type property, which will give better results when looking
at the db using future tools in Unicode::UCD than it does currently.

12 years agomktables: Accept Unicode combo binary properties
Karl Williamson [Mon, 22 Aug 2011 00:57:28 +0000 (18:57 -0600)]
mktables: Accept Unicode combo binary properties

Unicode has one property currently that is a combination of a property
with enum values, plus a binary property.  The way it's supposed to work
is that property can be referred to as true or false, and any non-empty
value will be considered true, regardless of value.

The one property is in Unihan only, which currently requires downloading
its db and recompiling to use in the Perl cord.  But mktables is
supposed to work on all Unicode properties.

Prior to the work that is going on to expose the Unicode db in
Unicode::UCD, this property was dealt with by simply changing all
non-empty values to true.  But with the details of the db about to be
exposed, the real original values should be displayed.

What this patch does is to create a new property type, FORCED_BINARY.
The way it is handled, which Unicode doesn't seem to require, is to
allow matching on the original values, plus the standard true and false
ones.

I have tried to make it general, so truth is anything that isn't the
default value (so it doesn't have to be just the null string), plus I
don't believe that the table has to be an enum value to work.

12 years agomktables: Lock a complement table
Karl Williamson [Mon, 22 Aug 2011 00:30:46 +0000 (18:30 -0600)]
mktables: Lock a complement table

A table that is defined as an inverse of another should be read-only,
with no ability to add or subtract code points.  This commit changes the
'set_complement' method from using the default accessor to a custom one
which locks the table.

12 years agomktables: White-space only
Karl Williamson [Mon, 22 Aug 2011 00:29:02 +0000 (18:29 -0600)]
mktables: White-space only

This patch indents a block that was surrounded by an 'else' in a
previous patch

12 years agomktables: Don't populate inverse tables
Karl Williamson [Mon, 22 Aug 2011 00:14:40 +0000 (18:14 -0600)]
mktables: Don't populate inverse tables

This patch saves some memory and time by skipping the populating of
tables which are complements of other ones.  It relies on a previous
commit that causes operations on the complement to actually work on
the values of the master.

12 years agomktables: use master range list if inverse
Karl Williamson [Sun, 21 Aug 2011 16:24:11 +0000 (10:24 -0600)]
mktables: use master range list if inverse

This patch subclasses the method that returns the range associated with
a table to instead return its complement's range.  This means that when
working on a table that is a complement, you are really working on its
complement.  This will be used in a future commit to avoid populating
the complement.

The base class has to change so that the method can be subclassed.

12 years agomktables: perluniprops change prop-val generation
Karl Williamson [Sun, 21 Aug 2011 20:54:05 +0000 (14:54 -0600)]
mktables: perluniprops change prop-val generation

This patch changes the variables slightly for generating the rhs of a
pod entry in perluniprops.  This has no effect currently, but will be
useful in a future patch.

12 years agoperluniprops: Fix handling of null prop vals
Karl Williamson [Sun, 21 Aug 2011 20:47:45 +0000 (14:47 -0600)]
perluniprops: Fix handling of null prop vals

Regexes don't match '\p{prop=}'.  As a result, prior to this patch, if a
table's name was the null string it wasn't output in the pod file, even
if there were aliases that did have names.  This patch fixes this so
only the empty names are suppressed.  No current property handling is
affected by this bug, but it is in preparation for a later patch.

12 years agomktables: White-space only
Karl Williamson [Sun, 21 Aug 2011 20:37:06 +0000 (14:37 -0600)]
mktables: White-space only

Indent a block that is now enclosed in an 'if' from a previous commit

12 years agomktables: Don't look at complement tables for equivalences
Karl Williamson [Sun, 21 Aug 2011 20:33:27 +0000 (14:33 -0600)]
mktables: Don't look at complement tables for equivalences

The inserted comment explains why.

12 years agomktables: White space-only
Karl Williamson [Sun, 21 Aug 2011 20:18:27 +0000 (14:18 -0600)]
mktables: White space-only

This just indents a block properly for the 'if' added in a previous
commit

12 years agomktables: Add test to avoid undef
Karl Williamson [Sun, 21 Aug 2011 20:16:21 +0000 (14:16 -0600)]
mktables: Add test to avoid undef

The scx propoerty is not available in early Unicode versions.  This adds
a test to avoid trying to use it if mktables is run on such a version

12 years agomktables: Move declaration
Karl Williamson [Sun, 21 Aug 2011 20:14:53 +0000 (14:14 -0600)]
mktables: Move declaration

This will be needed in a future commit

12 years agomktables: Reorder sort
Karl Williamson [Sun, 21 Aug 2011 20:04:43 +0000 (14:04 -0600)]
mktables: Reorder sort

This will be important in a later to commit so that we process the
leader of a group of tables before any of its followers.  Currently,
there hasn't been a problem with the sort order, but future changes make
it important.

12 years agomktables: Remove extra look-up
Karl Williamson [Sun, 21 Aug 2011 19:59:42 +0000 (13:59 -0600)]
mktables: Remove extra look-up

The value needed here has already been stored in $property; no need to
look it up again.

12 years agomktables: Use consistent name style for scx
Karl Williamson [Sun, 21 Aug 2011 19:56:47 +0000 (13:56 -0600)]
mktables: Use consistent name style for scx

This causes the mapping table generated by scx to use the full names of
scripts for all entries, instead of a mixture of short and full names.
This is for human readability only and convenience with a future
function that returns the list.

12 years agomktables: extract ref to object just once
Karl Williamson [Sun, 21 Aug 2011 19:49:26 +0000 (13:49 -0600)]
mktables: extract ref to object just once

A future commit will use the Script property object, which makes it
worthwhile to compute just once.

12 years agomktables: Allow run-time change of class variable
Karl Williamson [Sun, 21 Aug 2011 19:36:53 +0000 (13:36 -0600)]
mktables: Allow run-time change of class variable

Prior to this patch, pre_declared_maps was settable only at constructor
time.  It's useful to change this on-the-fly for a Unihan table, which
will be done in a future commit.

12 years agomktables: Allow related equivalencing of sub-tables
Karl Williamson [Sun, 21 Aug 2011 19:33:51 +0000 (13:33 -0600)]
mktables: Allow related equivalencing of sub-tables

Two tables in the same property that are equivalenced should be able
to be set to be 'related'.

12 years agomktables: Fix generated file comment
Karl Williamson [Sun, 21 Aug 2011 19:24:41 +0000 (13:24 -0600)]
mktables: Fix generated file comment

\p{jsn=} is not currently recognized as legal by Perl, yet there can be
a table generated for it.  Prior to this commit, the comment in it
indicated that this expression was how it was matched.

12 years agomktables: Eliminate duplicate op
Karl Williamson [Sun, 21 Aug 2011 18:56:57 +0000 (12:56 -0600)]
mktables: Eliminate duplicate op

uniques() was just called, so no need to call it again.

12 years agomktables: Initialize variable
Karl Williamson [Sun, 21 Aug 2011 18:45:00 +0000 (12:45 -0600)]
mktables: Initialize variable

It is unlikely but possible that this variable will not be set by the
code below, and will end up being interpolated later undefined.

12 years agomktables: Try harder to find a good table name
Karl Williamson [Sun, 21 Aug 2011 16:18:20 +0000 (10:18 -0600)]
mktables: Try harder to find a good table name

The short name of a table is used to generate the file name in which it
is to be stored.  If the short name is a null string, the file is given
the name of '_.pl'.  A more meaningful name would be preferred.  If the
table is equivalent to other tables, we can use their name instead of
its.  This commit does that.

12 years agomktables: Add defensive coding
Karl Williamson [Sun, 21 Aug 2011 16:04:36 +0000 (10:04 -0600)]
mktables: Add defensive coding

$b should always be defined here, since earlier we tested that the
range counts were the same between $self and $other.  Yet, in a
configuration of this program not committed, the range counts were the
same, but $other->ranges generated an empty list.  I believe this to be
a core bug, but I was unable to narrow it down, and so added this
defensive coding measure.

12 years agomktables: Improve comments, white-space
Karl Williamson [Sun, 21 Aug 2011 15:44:12 +0000 (09:44 -0600)]
mktables: Improve comments, white-space

This is a compendium of various small fixes to comments and white-space
and pod only.  This includes removing a number of comments that have been
obsoleted by previous work, and which weren't updated at that time.

12 years agomktables: Work around deficiency in Unicode data files
Karl Williamson [Wed, 17 Aug 2011 21:21:54 +0000 (15:21 -0600)]
mktables: Work around deficiency in Unicode data files

The PropValue_Aliases.txt file is inconsistent, which gives certain
property-value pairs wierd long names.  This doesn't show up currently,
but does in a future API enhancement to Unicode::UCD.

The Unicode consortium will consider fixing the file for a future
release.

12 years agoperluniprops: Add explanatory note
Karl Williamson [Wed, 17 Aug 2011 21:21:20 +0000 (15:21 -0600)]
perluniprops: Add explanatory note

12 years agomktables: Adjust now that have fixed set_type()
Karl Williamson [Wed, 17 Aug 2011 21:17:01 +0000 (15:17 -0600)]
mktables: Adjust now that have fixed set_type()

A previous commit fixed a bug in set_type().  By re-ordering it, the
table will have already been added, so don't need to do it again.

12 years agomktables: use full_name as well when converting table to binary
Karl Williamson [Wed, 17 Aug 2011 21:11:47 +0000 (15:11 -0600)]
mktables: use full_name as well when converting table to binary

This fixes a bug in which a table gets converted to binary, but there is
no distinguishing between the regular and full name for it.

There is no test for this, as it only shows up if an installation
chooses to download and compile the Unicode Unihan data base, something
that isn't shipped by default.

12 years agomktables: Change name of some ccc tables
Karl Williamson [Mon, 15 Aug 2011 19:20:38 +0000 (13:20 -0600)]
mktables: Change name of some ccc tables

Prior to this patch the name of canonical combining class tables was the
numeric value for the class, even if there was a mnemonic name.  This
patch changes the name to be the mnemonic one, with the numeric
equivalent being an extra alias.

12 years agoUnicode::UCD: Remove obsolete pod lines
Karl Williamson [Sun, 14 Aug 2011 19:56:48 +0000 (13:56 -0600)]
Unicode::UCD: Remove obsolete pod lines

Starting in 5.14, this file descriptor is no longer used.

12 years agoperluniprops: mention 5.14 not 5.13
Karl Williamson [Sun, 14 Aug 2011 15:45:03 +0000 (09:45 -0600)]
perluniprops: mention 5.14 not 5.13

12 years agoperluniprops: Add quotes around a couple prop names
Karl Williamson [Sun, 14 Aug 2011 15:43:44 +0000 (09:43 -0600)]
perluniprops: Add quotes around a couple prop names

12 years agomktables: Clarify comment added to output tables
Karl Williamson [Sun, 14 Aug 2011 15:36:23 +0000 (09:36 -0600)]
mktables: Clarify comment added to output tables

The table files are used not just by perl.exe but various modules
that are part of the Perl core.

12 years agomktables: Remove possibility of 2nd ccc table
Karl Williamson [Sun, 14 Aug 2011 03:20:11 +0000 (21:20 -0600)]
mktables: Remove possibility of 2nd ccc table

The Canonical Combining Class property map table file has a non-standard
name and directory location because that's where Unicode::Normalize
expects it.  Previous to this patch, it was also possible to create a
duplicate table in the standard location if an installation desired.
But future patches are adding an API to get that information without
having to read from files, so this won't be needed after that, and
prepares the way for that API.

12 years agomktables: remove internal restriction
Karl Williamson [Fri, 15 Jul 2011 02:47:13 +0000 (20:47 -0600)]
mktables: remove internal restriction

The code punted before under the condition changed.  But it is
relatively easy to handle it; which is needed by future commits.

12 years agot/uni/case.pl: Allow overridden simple maps in input
Karl Williamson [Wed, 13 Jul 2011 16:46:04 +0000 (10:46 -0600)]
t/uni/case.pl: Allow overridden simple maps in input

Future commits are planned to change the base list in various
mapping tables to include the simple maps which are now suppressed
when there are full maps that override them.

The current test blindly tests all the simple maps, which would
start to fail because the core uses the full maps when available.
So, simply don't test the overridden ones.

12 years agomktables: Reorder error check
Karl Williamson [Wed, 13 Jul 2011 15:15:06 +0000 (09:15 -0600)]
mktables: Reorder error check

The error check should happen after we decide the whole thing
is a no-op.

12 years agomktables: Clarify warning message
Karl Williamson [Wed, 13 Jul 2011 15:13:57 +0000 (09:13 -0600)]
mktables: Clarify warning message

12 years agoperluniprops: nit
Karl Williamson [Mon, 11 Jul 2011 04:08:16 +0000 (22:08 -0600)]
perluniprops: nit

12 years agoFix VC6 compilation of pp_sort.c
Steve Hay [Mon, 7 Nov 2011 21:10:44 +0000 (21:10 +0000)]
Fix VC6 compilation of pp_sort.c

Fixes copy & paste errors introduced by f3dab52a51.

12 years agoUpdate IO-Compress to CPAN version 2.040
Chris 'BinGOs' Williams [Sun, 6 Nov 2011 22:56:39 +0000 (22:56 +0000)]
Update IO-Compress to CPAN version 2.040

  [DELTA]

  2.040 28 October 2011

      * t/105oneshot-zip-only.t
        - CanonicalName test failure on Windows
          [RT# 68926]

      * IO::Compress::Zip
        - ExtAttr now populates MSDOS attributes

  2.039 28 October 2011

      * IO::Compress::Zip
        - Added CanonicalName option.
          Note this option is set to true by default.
        - Added FilterName option

      * IO::Unompress::Base
        - Fixed issue where setting $\ would corrupt the uncompressed data.
          Thanks to Steffen Goeldner for reporting the issue.

      * t/050interop-*.t
        - Handle case when external command contains a whitespace
          RT #71335

12 years agoUpdate Compress-Raw-Bzip2 to CPAN version 2.040
Chris 'BinGOs' Williams [Sun, 6 Nov 2011 22:32:24 +0000 (22:32 +0000)]
Update Compress-Raw-Bzip2 to CPAN version 2.040

  [DELTA]

  2.040 28 October 2011

      * No Changes

  2.039 28 October 2011

      * croak if attempt to freeze/thaw compression object
        [RT #69985]

12 years agoUpdate Compress-Raw-Zlib to CPAN version 2.040
Chris 'BinGOs' Williams [Sun, 6 Nov 2011 22:24:49 +0000 (22:24 +0000)]
Update Compress-Raw-Zlib to CPAN version 2.040

  [DELTA]

  2.040 28 October 2011

      * No Changes

  2.039 28 October 2011

      * croak if attempt to freeze/thaw compression object
        [RT #69985]

12 years agoUpdate Unicode-Collate to CPAN version 0.84
Chris 'BinGOs' Williams [Sun, 6 Nov 2011 21:59:59 +0000 (21:59 +0000)]
Update Unicode-Collate to CPAN version 0.84

  [DELTA]

  0.84  Sun Nov  6 14:44:51 2011
    - U::C::Locale supports script codes.
    - U::C::Locale newly supports locales: fa, sr_Latn, ur.
    - added loc_fa.t, loc_srla.t, loc_ur.t in t.

  0.83  Sun Oct 30 20:22:04 2011
    - mklocale: auto-generate equivalents for suppressed contractions.
      * be.txt, bg.txt, kk.txt, mk.txt, ru.txt, sr.txt, uk.txt in data
        are simplified.
      * but no Locale/*.pl will be modified.

  0.82  Sun Oct 30 10:03:48 2011
    - U::C::Locale newly supports locales: si, si__dictionary,
      sv__reformed, ta, te, th, wae.
    - added loc_si.t, loc_sidt.t, loc_svrf.t, loc_ta.t, loc_te.t,
      loc_th.t, loc_wae.t in t.
    - updated some locales to CLDR 2.0 : sk, sr, sv, uk.
    - updated CJK/Pinyin.pm according to CLDR 2.0.

12 years agoDear dual-life.t: I regret your existence
Father Chrysostomos [Sun, 6 Nov 2011 22:31:09 +0000 (14:31 -0800)]
Dear dual-life.t: I regret your existence

12 years agotoke.c:lex_start: Move len into the only block that uses it
Father Chrysostomos [Sun, 6 Nov 2011 22:25:42 +0000 (14:25 -0800)]
toke.c:lex_start: Move len into the only block that uses it

12 years agoUpdate docs about lex_start’s flags param
Father Chrysostomos [Sun, 6 Nov 2011 22:08:00 +0000 (14:08 -0800)]
Update docs about lex_start’s flags param

12 years agoDon’t leak the source for evalbytes($utf8)
Father Chrysostomos [Sun, 6 Nov 2011 22:05:49 +0000 (14:05 -0800)]
Don’t leak the source for evalbytes($utf8)

12 years agoAvoid redundant copies in string evals
Father Chrysostomos [Sun, 6 Nov 2011 22:04:51 +0000 (14:04 -0800)]
Avoid redundant copies in string evals

Perl_lex_start copies the string passed to it unconditionally.
Sometimes pp_entereval makes a copy before passing the string
to lex_start.  So in those cases we can pass a flag to avoid a
redundant copy.

12 years agoeval"" should reset %^H in more cases
Father Chrysostomos [Sun, 6 Nov 2011 21:37:55 +0000 (13:37 -0800)]
eval"" should reset %^H in more cases

This is scary:

    #use sort 'stable';
    require re; re->import('/x');
    eval '
      print "a b" =~ /a b/ ? "ok\n" : "nokay\n";
      use re "/m";
      print "a b" =~ /a b/ ? "ok\n" : "nokay\n";
   ';

It prints:

    ok
    nokay

The re->import statement is supposed to apply to the caller that
is currently being compiled, but it makes ‘use re "/m"’ enable
/x as well.

Uncomment the ‘use sort’ line, and you get:

    ok
    ok

which is even scarier.

eval"" is supposed to compile its argument with the hints under which
the eval itself was compiled.

Whenever %^H is modified, a flag (HINT_LOCALIZE_HH; LHH hereinafter)
is set in $^H.

When eval is called, it checks the LHH flag in the hints from the time
it was compiled, to determine whether to reset %^H.  If LHH is set,
it creates a new %^H based on the hints under which it was compiled.
Otherwise, it just leaves %^H alone.

The problem is that %^H and LHH may be set some time later
(re->import), so when the eval runs there is junk in %^H that
does not apply to the contents of the eval.

There are two layers at which the hints hash is stored.  There is the
Perl-level hash, %^H, and then there is a faster cop-hints-hash struc-
ture underneath.  It’s the latter that is actually used during compi-
lation.  %^H is just a Perl front-end to it.

When eval does not reset %^H and %^H has junk in it, the two get
out of sync, because eval always sets the cop-hints-hash correctly.
Hence the first print in the first example above compiles without
‘use re "/x"’.  The ‘use re’ statement after it modifies the %^H-with-
junk-in-it, which then gets synchronised with the cop-hints-hash,
turning on /x for the next print statement.

Adding ‘use sort’ to the top of the program makes the problem go
away, because, since sort.pm uses %^H, LHH is set when eval() itself
is compiled.

This commit fixes this by having pp_entereval check not only the LHH
flag from the hints under which it was compiled, but also the hints of
the currently compiling code ($^H / PL_hints).

12 years agoTypos in gv.t
Father Chrysostomos [Sun, 6 Nov 2011 20:57:12 +0000 (12:57 -0800)]
Typos in gv.t

12 years agoenable LFS on GNU/Hurd
Pino Toscano [Tue, 1 Nov 2011 18:37:19 +0000 (18:37 +0000)]
enable LFS on GNU/Hurd

at the moment, perl is compiled on GNU/Hurd without large file support.
This, other than the lacking of support for files > 2 GB, causes the
failure in the t/op/stat.t test.
The failure in stat.t happens because of the following: when filtering
devices in /dev/* using grep {} with -b/-c, stat fails for large
devices such as /dev/hdX blocks, or /dev/zero chars (this latter case
should be an Hurd-specific issue, but shouldn't matter for this case),
hence the counts done with grep {} and the ones done filtering the
output of `ls' don't match.

The attached patch enables the LFS using the same way used on linux.sh;
about t/op/lfs.t, it gets skipped at the "kernel/fs not configured to
use large files?" check, although it correctly detects sparse files and
(at least by looking at the disk usage) allocates the 5GB (or so) file
created with system() in that test.

12 years agoCorrect bug number in gv.t
Father Chrysostomos [Sun, 6 Nov 2011 18:42:21 +0000 (10:42 -0800)]
Correct bug number in gv.t

12 years agoMake multiple #line’s update dblines in evals
Father Chrysostomos [Sun, 6 Nov 2011 10:11:02 +0000 (02:11 -0800)]
Make multiple #line’s update dblines in evals

The array-copying stuff that happens when #line 3 "filename" is
encountered in a string eval is not sufficient.  If there are multiple
such statements, only the first one copies the debugger’s lines arrays
(@{"_<filename"}) into the new array.

Checking that CopFILESV(PL_curcop) begins with ‘(eval ’ is a bit
silly, since the parser already knows whether it’s processing a file
without having to check file names.  (And what if you have a real file
beginning with ‘(eval ’?)

See commit 8818d40 and others that it references, for the history of
this piece of code.

12 years agoStop toggling the FAKE flag for stringified GVs
Father Chrysostomos [Sun, 6 Nov 2011 09:40:57 +0000 (01:40 -0800)]
Stop toggling the FAKE flag for stringified GVs

Back in the old days, when GVs had magic attached to them, get-magic
used to stringify the glob and assign the string to the PV field.  It
was triggered in mg.c like this:

    gv_efullname3(sv,((GV*)sv), "*");

Because sv was both the glob being read *and* the string being
assigned to, the stringification would call set-magic on the glob and
flatten the glob into a string.  Or something like that.

That is not necessary any more.

12 years ago[perl #96326] *{$io} should not be semi-defined
Father Chrysostomos [Sun, 6 Nov 2011 09:35:38 +0000 (01:35 -0800)]
[perl #96326] *{$io} should not be semi-defined

gv_efullname4 produces undef if the GV points to no stash, instead of
using __ANON__, as it does when the stash has no name.

Instead of going through hoops to try and work around it elsewhere, fix
gv_efullname4.

This means that

   $x = *$io;
   $x .= "whate’er";

no longer produces an uninitialized warning.  (The warning was rather
strange, as defined() returned true.)

This commit also gives the glob the name $__ANONIO__ (yes, with a dol-
lar sign).  It may seem a little strange, but there is precedent in
other autovivified globs, such as those open() produces when it cannot
determine the variable name (e.g, open $t->{fh}).

12 years agoop.c:ck_eval: consting
Father Chrysostomos [Sun, 6 Nov 2011 08:25:00 +0000 (01:25 -0700)]
op.c:ck_eval: consting