summaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAgeFilesLines
* t/re/re_tests: Add Todo testKarl Williamson2012-02-091-0/+2
| | | | | | This bug was spotted by Tom Christiansen, but no bug report has been written. /[[:ascii:]]/i should match the same set of code points as /\p{ASCII}/i. But it is matching things outside the ASCII range
* README.cygwin now has fewer pod issues, update known_pod_issues.dattonyc/cygnotesTony Cook2012-02-091-1/+1
|
* sync version.pm code with CPANDavid Golden2012-02-051-1/+1
| | | | | | Applied patch from John Peacock, but added whitespace fixes, corrected pod link error and updated known Pod issues to reflect a fix.
* In t/porting/authors.t, correct a typo in the git log format string.Nicholas Clark2012-02-051-1/+1
| | | | | The format added in commit 3ea0c581844689ab had a typo - %cn (committer name) used instead of %ce (committer e-mail).
* Unicode 6.1Karl Williamson2012-02-041-1/+1
| | | | | | This commit delivers the official Unicode character database files for release 6.1, plus the final bits needed to cope with the changes in them from release 6.0, including documentation.
* [perl #109762] Stop !$^V from leakingFather Chrysostomos2012-02-031-1/+3
| | | | by mortalising the temporary SVs.
* Revert "Add IO::Socket::IP 0.08 as dual-life module"Ricardo Signes2012-02-031-1/+0
| | | | This reverts commit 497f7de2d964167330f7260590736e9adb18899c.
* Add IO::Socket::IP 0.08 as dual-life modulePaul Evans2012-02-031-0/+1
| | | | Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
* Add 2 more CPAN mods to known_pod_issues.datFather Chrysostomos2012-02-021-0/+2
|
* make Carp messages match die properlyZefram2012-02-022-33/+33
| | | | | Add dot to end of message from Carp, to match the formatting from CORE::die. The stack trace, coming after the message, is unchanged.
* t/op/method.t: Add tests for subless AUTOLOAD and DESTROYBrian Fraser2012-02-011-1/+17
|
* Move more typemap-related documentation to the typemap doc fileSteffen Mueller2012-02-011-1/+1
| | | | | | Some of the discussion in perlxs was duplicated in perlxstypemap. This also adds several references to the new man page and fixes a few minor nits.
* Pod-Perldoc is now maintained on CPANFlorian Ragwitz2012-01-311-3/+3
|
* podcheck.t: Add commentKarl Williamson2012-01-301-0/+1
|
* stat.t: Use $>, not just $< for skippingFather Chrysostomos2012-01-301-1/+1
| | | | This is the paranoid version of just using $>.
* lc.t: Add tests for previously broken IN_UNI_8_BITKarl Williamson2012-01-291-1/+10
| | | | This adds tests for commit b36bf33f6564c3e9a9ff131f4f3c9980b7a8af15
* pod updates for fc and \FBrian Fraser2012-01-291-1/+0
|
* Implement the fc keyword and the \F string escape.Brian Fraser2012-01-295-9/+422
| | | | | | | | | | | | | | | | | | | | | | Along with the simple_casefolding and full_casefolding features. fc() stands for foldcase, a sort of pseudo case (like lowercase), which is used to implement Unicode casefolding. It maps a string to a form where all case differences are erased, so it's a locale-independent way of checking if two strings are the same, regardless of case. This functionality was, and still is, available through the regular expression engine -- /i matches would use casefolding internally. The fc keyword merely exposes this for easier access. Previously, one could attempt to case-insensitively test two strings for equality by doing lc($a) eq lc($b) But that might get you wrong results, for example in the case of \x{DF}, LATIN SMALL LETTER SHARP S.
* Add the fc keyword in regen/feature.plBrian Fraser2012-01-291-0/+1
| | | | It doesn't do anything yet.
* [perl #109264] ->method(my(...)) forcing lvalue cxFather Chrysostomos2012-01-281-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A simple my($foo,$bar) list is flagged as an lvalue: $ ./perl -Ilib -MO=Concise -e 'my($foo,$bar)' 7 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:{ ->3 6 <@> list vKPM/128 ->7 3 <0> pushmark vM/128 ->4 4 <0> padsv[$foo:1,2] vM/LVINTRO ->5 5 <0> padsv[$bar:1,2] vM/LVINTRO ->6 -e syntax OK That 128 that the list op is the same flag as LVINTRO. When a method call is compiled, the list op for the argument list is itself converted into an entersub op. That LVINTRO flag is never turned off. So foo->bar(my($foo,$bar)) becomes this: $ ./perl -Ilib -MO=Concise -e 'foo->bar(my($foo,$bar))' 9 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:{ ->3 8 <1> entersub[t4] vKMS/LVINTRO,TARG ->9 3 <0> pushmark sM/128 ->4 4 <$> const[PV "foo"] sM/BARE ->5 5 <0> padsv[$foo:1,2] lM/LVINTRO ->6 6 <0> padsv[$bar:1,2] lM/LVINTRO ->7 7 <$> method_named[PV "bar"] ->8 -e syntax OK This was rarely a problem until commit da1dff948 added lvalue check- ing for method calls (a fifth bug fix in that commit not mentioned in the commit message). Calling the method will now result in ‘Can't modify non-lvalue subrou- tine call’ unless the method has the :lvalue attribute. Before that, this would only cause problems with lvalue methods: $ perl -le ' sub clear_queue:lvalue { warn "called"; undef } 3==main->clear_queue(my ($id, $name)) ' called at -e line 2. Can't return undef from lvalue subroutine at -e line 3. Calling it with ($id, $name) was fine, and allowed undef to be returned. Perl_localize in op.c (which is called for my, our and local) calls my() (aka Perl_my_attrs) on the list itself for my or our. Perl_my_attrs was setting flags on the list, not just on its children. So this commit modifies my_attrs not to set any flags on the list op itself. local() was not affected, as it goes through op_lvalue_flags instead of my_attrs, and op_lvalue_flags doesn’t set flags on list ops (I mean ops of type OP_LIST, not listops in general). I added tests for it anyway.
* Fix bug #109206: ANCH_MBOL with while /.*/gYves Orton2012-01-291-1/+13
| | | | | | We had a fencepost error when ANCH_MBOL was enabled that meant we did not "see" matches at the end of string. This fixes the problem and adds tests.
* fix variable not shared warnings coming from the use statement being ↵Yves Orton2012-01-281-2/+4
| | | | executed too early
* Adjust skip counts in t/op/filetest_t.t.Craig A. Berry2012-01-281-3/+3
| | | | | Follow-up to 8db8f6b697e6f, where new tests were added without changing the (implicit) skip count of 1.
* Allow prototypes (_@) and (_%)Rafael Garcia-Suarez2012-01-271-1/+16
| | | | | | Those will be equivalent to (_;@) and (_;%) ; since perlsub already states that the semicolon is redundant before @ and % this is in line with the existing documentation.
* Show test names in outputRafael Garcia-Suarez2012-01-271-5/+5
|
* Allow ${^WARNING_BITS} to turn off lexical warningsFather Chrysostomos2012-01-261-2/+20
| | | | | | | | | | | | | | Various magical modules copy hints from one scope to another. But copying ${^WARNING_BITS} doesn’t always copy the same hints. If lexi- cal warnings are not on at all, ${^WARNING_BITS} returns a different value depending on the current value of $^W. Setting ${^WARNING_BITS} to its own value when $^W is true will stop $^W from being able to control the warnings in the current compilation scope. Setting ${^WARNING_BITS} to its own value when $^W is false causes even default warnings to be suppressed. This commit makes undef a special value that represents the default state, in which $^W controls warnings.
* pat.t: Test that . overloading gets passed qr refFather Chrysostomos2012-01-261-1/+18
| | | | | | This is something that my sample patch in ticked #108780 (for fixing /foo$qr/ under ‘no overloading’) would have broken had it been applied.
* stat.t: Skip test when running as rootRainer Tammer2012-01-261-0/+1
|
* Correctly escape UTF-8 in hash keys in uninitialized warningsRafael Garcia-Suarez2012-01-251-2/+2
|
* Update known_pod_issues.dat for x2p/psedChris 'BinGOs' Williams2012-01-251-0/+1
|
* Revert "Regen known_pod_issues.dat"Chris 'BinGOs' Williams2012-01-251-11/+0
| | | | | | This reverts commit 5fa409a90f64110c5708f7141b376e9bdc54fbe2. Resolved by update of Pod-Parser to version 1.51
* Make the display of the warning "Useless use of a constant (%s)" more robustRafael Garcia-Suarez2012-01-252-18/+20
| | | | | | | | | | | | | If the constant is a string (POK), we dump it using pv_pretty, to properly escape non-printable characters. This also improves detection of utf-8 encoding in the constant to be printed. Also, this patch streamlines the tests for the type and value of that constant. Potential backwards-compatibility issues : if the constant is a string it will now be enclosed in double quotes, like this : Useless use of a constant ("a") in void context instead of Useless use of a constant (a) in void context
* Call FETCH once for stacked filetest opsFather Chrysostomos2012-01-241-1/+3
|
* skip sigdispatch.t on cygwin RT#88814Reini Urban2012-01-241-3/+5
|
* [perl #77388] Make stacked -t workFather Chrysostomos2012-01-232-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up till now, -t was popping too much off the stack when stacked with other filetest operators. Since the special use of _ doesn’t apply to -t, we cannot simply have it use _ when stacked, but instead we pass the argument down from the previous op. To facilitate this, the whole stacked mechanism has to change. As before, in an expression like -r -w -x, -x and -w are flagged as ‘stacking’ ops (followed by another filetest), and -w and -r are flagged as stacked (preceded by another filetest). Stacking filetest ops no longer return a false value to the next op when a test fails, and stacked ops no longer check the truth of the value on the stack to determine whether to return early (if it’s false). The argument to the first filetest is now passed from one op to another. This is similar to the mechanism that overloaded objects were already using. Now it applies to any argument. Since it could be false, we cannot rely on the boolean value of the stack item. So, stacking ops, when they return false, now traverse the ->op_next pointers and find the op after the last stacked op. That op is returned to the runloop. This short-circuiting is proba- bly faster than calling every subsequent op (a separate function call for each). Filetest ops other than -t continue to use the last stat buffer when stacked, so the argument on the stack is ignored. But if the op is preceded by nothing other than -t (where preceded means on the right, since the ops are evaluated right-to-left), it *does* use the argument on the stack, since -t has not set the last stat buffer. The new OPpFT_AFTER_t flag indicates that a stacked op is preceded by nothing other than -t. In ‘-e -t foo’, the -e gets the flag, but not in ‘-e -t -r foo’, because -r will have saved the stat buffer, so -e can just use that.
* [rt.cpan.org #74289] Don’t make *CORE::foo read-onlyFather Chrysostomos2012-01-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | newATTRSUB requires the sub name to be passed to it wrapped up in a const op. Commit 8756617677dbd allowed it to accept a GV that way, since S_maybe_add_coresub (in gv.c) needed to pass it an existing GV not in the symbol table yet (to simplify code elsewhere). This had the inadvertent side-effect of making the GV read-only, since that’s what the check function for const ops does. Even if we were to call this a feature, it wouldn’t make sense as implemented, as GVs for non-ampable (&-able) subs like *CORE::chdir were not being made read-only. This commit adds a new flag to newATTRSUB, to allow a GV to be passed as the o parameter, instead of an op. While this may look as though it’s undoing the simplification in commit 8756617677dbd by adding more code, the new code is still conceptually simpler and more straightforward. Since newATTRSUB is in the API, I had to add a new _flags variant. (How did newATTRSUB get into the API to begin with?) In adding a test, I also discovered that ‘used once’ warnings were applying to these subs, which is obviously wrong. Commit 8756617677dbd caused that, too, as it was relying on the side-effect of newATTRSUB doing a GV lookup. This fixes that, too, by turning on the multi flag in S_maybe_add_coresub.
* Enforce Any ~~ Object smartmatch precedenceLeon Timmermans2012-01-231-3/+1
|
* Don’t allow read-only regexps to be tiedFather Chrysostomos2012-01-231-0/+10
| | | | | Since the test triggered another bug in freeing read-only regexps, this commit fixes that too.
* sv_force_normal: Don’t confuse regexps with cowsFather Chrysostomos2012-01-221-1/+13
| | | | | Otherwise we get assertion failures and possibly corrupt string tables.
* [perl #108794] Call special blocks in void contextFather Chrysostomos2012-01-221-1/+19
| | | | | Now BEGIN blocks, etc., are called in void context, so the result of evaluating the last statement is not wastefully copied.
* [rt.cpan.org #72767] Don’t propagate warnings into do-fileFather Chrysostomos2012-01-221-0/+22
| | | | | | I completely forgot about do-file when, in commit f45b078d2, I stopped eval from localising hints at run time. The result was that warning hints were propagating into do-file.
* Regen known_pod_issues.datChris 'BinGOs' Williams2012-01-221-0/+11
|
* Add :not_characters parameter to 'use locale'Karl Williamson2012-01-211-0/+2
| | | | | This adds the parameter handling, tests, and documentation for this new feature which allows locale and Unicode to play well with each other.
* perluniintro: Shorten too-long verbatim linesKarl Williamson2012-01-211-1/+0
|
* VMS-specific symlink tweak for stat.tCraig A. Berry2012-01-201-1/+3
| | | | | | If the target of a symlink has a version number in the symlink, that makes the symlink implementation unable to locate it, so trim off the version.
* Warn for stat(*unopened) after statting fileFather Chrysostomos2012-01-201-0/+5
| | | | | | | | | Statting an existing file used to prevent a subsequent stat(*unopened) from warning if the GV happened to have no IO. If the GV *did* have an IO, but an unopened one, it *would* warn. This inconsistency was introduced in 5.10.0 with commit 5228a96c60 (which was also backported to 5.8.9).
* [perl #71002] stat() on unopened fh _Father Chrysostomos2012-01-201-1/+11
| | | | | | | | stat _ was producing an erroneous warning about an unopened filehandle with _. But _ isn’t a real filehandle and is special-cased, so it shouldn’t warn. See also commit 8080e3c8.
* regen pod issuesFather Chrysostomos2012-01-191-1/+0
|
* re/reg_fold.t: Add and revise commentsKarl Williamson2012-01-191-2/+3
|
* reg_fold.t: Test bracketed character classesKarl Williamson2012-01-191-1/+2
| | | | | | | | | | | | | | | | These were removed when things were very broken, but now they work, except for things like "\N{LATIN SMALL LIGATURE FFI}" =~ /[a-z]{3}/i where the multi-char fold crosses single bracketed character class boundaries. These will probably never be fixed in Perl in the general case (using \F and fc() instead), but I expect that "\N{LATIN SMALL LIGATURE FFI}" =~ /[f][f][i]/i will eventually be changed so the brackets are optimized away, and will work. Then these TODOs will start passing.