summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Unicode::UCD: Add prop_values() functionKarl Williamson2015-02-102-22/+133
| | | | This new function returns the input property's possible values.
* Correct grammatical error in Benchmark POD.James E Keenan2015-02-071-2/+2
| | | | Increment $VERSION and add entry to perldelta.
* Deparse: Don’t choke on SPECIAL constantsFather Chrysostomos2015-02-062-6/+12
| | | | | | | | | | | | | Some modules, e.g., POSIX, create constants in the form of references to immortals in the stash. B::Deparse started croaking on these in v5.21.6-584-g03b8f76. $ ./perl -Ilib -MO=Deparse -MPOSIX -e0 Can't locate object method "FLAGS" via package "B::SPECIAL" at lib/B/Deparse.pm line 745. CHECK failed--call queue aborted. At the same time I fixed the stash-probing code, I also had to fix deparsing of \!0, which had the same bug.
* [perl #123753] Fix assertion failure with map+mapFather Chrysostomos2015-02-061-0/+2
| | | | | | | | ck_grep calls ck_fun, which sets the lower private bits to indicate the number of operands. ck_grep usually undoes that, by clobbering op_private completetly. If an error has occurred, it doesn’t, so we may fail an assertion if the lower bits are not expected to be set on mapstart and grepstart.
* Increase $B::Deparse::VERSION to 1.33Father Chrysostomos2015-01-311-1/+1
|
* overload.pm: Document fifth arg for &|^~Father Chrysostomos2015-01-311-2/+11
|
* 5th arg to indicate numeric bitwise overloadingFather Chrysostomos2015-01-311-3/+35
|
* overload.pm: TypoFather Chrysostomos2015-01-311-1/+1
|
* feature.pm: Document the bitwise featureFather Chrysostomos2015-01-311-0/+18
|
* overload.t: Test experimental bitopsFather Chrysostomos2015-01-311-1/+32
|
* overload.pm: Document &. etc.Father Chrysostomos2015-01-311-6/+6
|
* Increase $overload::VERSION to 1.25Father Chrysostomos2015-01-311-1/+1
|
* overload.pm: Add string-specific bitopsFather Chrysostomos2015-01-311-4/+4
|
* Deparse new bitopsFather Chrysostomos2015-01-312-5/+33
|
* Deparse.t: Account for new warnings categoryFather Chrysostomos2015-01-311-6/+6
| | | | Hmm. This is not particularly maintainable.
* Add experimental::bitwise warnings categoryFather Chrysostomos2015-01-311-27/+32
|
* Increase $feature::VERSION to 1.40Father Chrysostomos2015-01-311-1/+1
|
* Add bitwise feature featureFather Chrysostomos2015-01-311-1/+2
|
* Add string- and number-specific bitop typesFather Chrysostomos2015-01-311-2/+10
| | | | | and also implement the pp functions, though nothing compiles to these ops yet.
* Add overload types for string-specifc bitopsFather Chrysostomos2015-01-311-0/+14
|
* Corrections to spelling and grammatical errors.Lajos Veres2015-01-282-2/+2
| | | | Extracted from patch submitted by Lajos Veres in RT #123693.
* Revert the support for new warning categories outside of "all"Ævar Arnfjörð Bjarmason2015-01-252-452/+356
| | | | | | | | | | | | | | | | | | | | | | | | This reverts & amends my v5.21.7-151-gea5519d and Karl Williamson's v5.21.7-183-g2f3cbe1, the latter was only need because of the former. I've also taken the opportunity to fix the long-standing trivial bug with misaligned code in warnings.{pm,h}. That was easier to commit along with this than to split it up from the other generated changes. Why revert this? See the "use warnings 'absolutely-all-almost';" thread on perl5-porters for the latest summary: http://www.nntp.perl.org/group/perl.perl5.porters/2015/01/msg225066.html Basically as I explained in v5.21.7-151-gea5519d the current design of the API makes it too contentious to freely add new warnings, but there's no consensus on how to solve that. I.e. whether we should just add them to "all", or do this change, or several other possible things outlined in that thread and elsewhere. Since the deadline for contentious changes for v5.22 is already past us I'm backing this out for now.
* mktables: White-space onlyKarl Williamson2015-01-211-6/+6
| | | | The previous commit added a block around this code
* mktables: Verify Unihan files versionsKarl Williamson2015-01-211-6/+16
| | | | | | | | | | | | Most Unicode files contain versioning information. Prior to this patch, mktables did not verify that the Unihan inputs were the correct version. This is in part because we don't usually compile the Unihan properties, and because the beta files for Unicode 7.0 had the version information in the same syntax as the rest of the files, so I thought we only had to wait till 7.0 came out, and we would get the protection automatically with the code that was already there. But the format changed between beta and release, so this patch adds code to check for the released format.
* mktables: Note that a property is deprecated by UnicodeKarl Williamson2015-01-211-1/+1
|
* Unicode::UCD: Allow internal properties in invmap()Karl Williamson2015-01-211-2/+8
| | | | | | This adds an undocumented way to get invmap() to return internal properties, like invlist(). This is intended only for Perl-core use.
* Unicode::UCD: pod nitsKarl Williamson2015-01-211-7/+22
|
* More bumpbing of version number to 5.21.9. Missed this yesterday.Matthew Horsfall2015-01-211-1/+1
|
* Make :const experimentalFather Chrysostomos2015-01-191-6/+6
|
* Add experimental::const_attr warning categoryFather Chrysostomos2015-01-191-32/+37
|
* Add :const anon sub attributeFather Chrysostomos2015-01-192-2/+7
|
* lib/locale.t: Suppress some warningsKarl Williamson2015-01-191-2/+3
| | | | | Move a 'no warnings' statement to earlier in the file, to before the first possibility of it being needed occurs.
* lib/locale.t: Generalize to work on non-ASCIIKarl Williamson2015-01-191-7/+14
|
* t/charset_tools.pl: Improve function namesKarl Williamson2015-01-141-1/+1
| | | | | | | | 'latin1_to_native' and 'native_to_latin1' actually operate on all code points, not just the ranges implied by their names. This commit changes the names to reflect that, to 'uni_to_native' and 'native_to_uni'. The old names have only been available since 5.21, so there is no backcompat issue.
* Use more universal function in tests where makes senseKarl Williamson2015-01-141-6/+1
| | | | | | | | | | | | | | By using a different function that is just as applicable, or more so, in these cases, we can avoid having to require a file. The functions that translate code points between character sets are always available and just as appropriate for the uses in the three tests t/re/fold_grind.t, t/re/reg_fold.t, and lib/unicore/TestProp.pl. Change to use it instead of the functions that take string inputs. This is slightly cleaner, as the file that contains it no longer has to be 'required'. And in some of the cases the code point function is a better choice, as there had to be translation between chr and ord before.
* Add new warnings category for "use re 'strict'"Karl Williamson2015-01-132-153/+158
| | | | This is a step in the process of adding that subpragma.
* Increase perl5db.pl’s $VERSION to 1.47Father Chrysostomos2015-01-051-1/+1
|
* perl5db.pl: Undefined subroutine &DB::db_warnE. Choroba2015-01-051-8/+8
| | | | | | | | | | | | | | | | | | | Perl debugger sometimes tries to call a non-existent subroutine db_warn. It's real name is _db_warn, though. How to replicate: perl -d -e1 !/ Output: /bin/bash: /: Is a directory Undefined subroutine &DB::db_warn called at /usr/lib/perl5/5.18.1/perl5db.pl line 6740. at /usr/lib/perl5/5.18.1/perl5db.pl line 6740. DB::_db_system('/bin/bash', '-c', '/') called at /usr/lib/perl5/5.18.1/perl5db.pl line 3923 DB::Obj::_handle_sh_command('DB::Obj=HASH(0x105df48)') called at /usr/lib/perl5/5.18.1/perl5db.pl line 2992 DB::DB called at -e line 1
* complement can have OPpTARGET_MYFather Chrysostomos2015-01-051-2/+2
| | | | | | | It always reads its argument out the outset and always returns its target, so there is no reason its target cannot be a lexical. (The OPpTARGET_MY optimisation makes $lexical = <some op> have the op write directly to the lexical; the assignment gets optimised away.)
* warnings.pm: Fix too long verbatim linesKarl Williamson2014-12-301-135/+135
| | | | By not indentins verbatim text so much, we don't run over 79 columns.
* lib/B/Deparse.pm: refactor a hash slightlyKarl Williamson2014-12-301-36/+34
| | | | | | Two of the three uses of this hash want the result to be of the form "\cX". The other wants "^X". This changes the hash to be the common substring to all three, and then the proper prefix is added to each.
* lib/B/Deparse.pm: Add commentKarl Williamson2014-12-301-1/+2
|
* lib/B/Deparse.pm: Generalize for non-ASCII platformsKarl Williamson2014-12-301-3/+9
| | | | This makes ASCII platform-specific code generalized to non-ASCII.
* lib/B/Deparse.pm: Output WARNING_BITS in binaryKarl Williamson2014-12-302-7/+9
| | | | | | | | | This binary value was being output as just another string, which would cause the bit patterns that coincidentally coincided with letters to be output as those. This is not portable to EBCDIC, but outputting it as \xXX is, which this commit does. I chose to output in hex instead of octal, as I think that is the more modern thing to do, and it's easier for me to grok the larger values when they are in hex.
* lib/B/Deparse.pm: Move hash to earlier in fileKarl Williamson2014-12-301-35/+35
| | | | | No other change besides the move is done. This is so the hash can be used from another place than currently.
* Enable OPpTARGET_MY optimisation for cmp/<=>Father Chrysostomos2014-12-292-4/+4
| | | | | | | | | We can only do it for <=> under ‘use integer’. The non-integer <=> will push undef on to the stack. Enabling the optimisation for it would cause \($lexical = $x <=> "nan") to leave $lexical with its previous value and return a reference to &PL_sv_undef.
* Add support for new warning categories outside of "all"Ævar Arnfjörð Bjarmason2014-12-292-161/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When someone suggests a new warning on p5p it always often up being argued about on the basis that it'll break existing code, and that we shouldn't add warnings for possibly legitimate code just because it's unusual or odd. As I pointed out in a discussion about RT #121025 (see [1]) we only keep having this discussion because until now we've had no facility to add new warnings outside of the default set that'll be retroactively enabled for everything that does 'use warnings'. This patch introduces such a facility. As a proof of concept I'm adding a warning for something that was added as a warning in the past, but pulled out because it was deemed too controversial at the time: warning about the use of grep in void context. That warning was added back in v5.10.0-218-g74295f0 but quickly pulled out in v5.10.0-230-gf5df478. See [2] for the discussion about it at the time. Now if you do: use warnings; grep /42/, (1,2); You'll get no warnings as before, but if you do: use warnings qw(extra); # Or its sole subcategory: void_unusual grep /42/, (1,2); You'll get a warning about "Unusual use of grep in void context". To turn off this warning once you've turned it on it's *not* sufficient to do: no warnings; You need to do: no warnings qw(pedantic); Or: no warnings qw(everything); I'm willing to change that, but first we should ask ourselves whether this should continue to remain a symmetric operation: {use,no} warnings ['all']; There's more elaboration on how this works in the changes I'm making to the perldelta and the warnings documentation. But briefly this should be 100% backwards compatible, but allow us to have our cake and eat it too in the future by adding new warnings without imposing them on existing code written against older perl versions (unless that code explicitly requested to get new warnings as they upgrade perl). The patch to the warnings.pm documentation lays out a backwards compatibility policy for warnings, we promise that we'll continue the status quo with the "all" category, but for other categories (including future additions) we'll make such promises on a per-category basis. TODO: I wanted to come up with some more general facility for being able to add these new warnings without altering the behavior of the -w and -W switches. I.e. now we'll emit this, as intended: $ ./perl -Ilib -w -e 'grep /42/, (1,2)' $ ./perl -Ilib -W -e 'grep /42/, (1,2)' $ ./perl -Ilib -e 'use warnings; grep /42/, (1,2)' $ ./perl -Ilib -e 'use warnings "extra"; grep /42/, (1,2)' Unusual use of grep in void context at -e line 1. I.e. we don't want -w and -W to mean "use warnings 'everything'", it should continue to mean "use warnings 'all'". But due to how they're implemented I couldn't find an easy way to generalize this. Right now I'm just hardcoding an exception to the new warning category I've added outside "all" for these warnings. That should be followed-up with a more general solution, but for now if we only have a few of these catogeries we should be fine. This patch incorporates work from Andreas Guðmundsson <andreasg@nasarde.org> who picked up an earlier version of mine and figured out the change being made to mg.c here. That change removes an optimization in the ${^WARNING_BITS} magic which might make things a tad slower. 1. https://rt.perl.org/Ticket/Display.html?id=121025#txn-1276663 2. http://www.nntp.perl.org/group/perl.perl5.porters/2007/12/msg131922.html
* Fixes to make test pass for regexp nocapture bit addition.Matthew Horsfall (alh)2014-12-281-1/+1
| | | | | | | | | | | * Make Devel-Peek/t/Peek.t less sensitive to regexp flag changes. Devel-Peek had flag names and binary representation hardcoded. Flag names *should* be enough. Otherwise we have to update bits of this test every time we muck with flags that don't affect the flags being tested. * Let B::Deparse know about the new RXf_PMf_CHARSET shift value.
* Fix typos in two unrelated test descriptionsAaron Crane2014-12-241-1/+1
|
* Fix deparsing of some unary-prototyped callsFather Chrysostomos2014-12-232-3/+63
| | | | | | | | | | This resulted in an infinite loop: sub optplus(;+) {} optplus($a < $b); The prototypes ;$ _ ;_ had the wrong predecence, causing foo($a<$b) to be deparsed wrongly, without the parentheses.