summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* make sure perl doesn't touch stat.t between statsTony Cook2010-09-221-3/+13
| | | | | | | | | | | | | | | | ebcfa0534 changed stat.t to avoid using TEST as the stat target, since it is read by other test scripts. But with the initial stat() in the BEGIN block perl is still reading the script for compilation, which will update the access time. Since the system clock usually didn't tick another second between the first and second stats, the test usually succeeded, but occasionally the clock would tick, and the test would fail. Moved the stat() out of the BEGIN block to avoid that. As a check I temporarily added a 2 second sleep after the initial stat to ensure we didn't have a similar problem to that will allowed this to pass most of the time.
* Test localization of English.pm’s $LIST_SEPARATOR [perl #47107]Michael G Schwern2010-09-201-1/+11
|
* compare stat results on a file that isn't touched elsewhereTony Cook2010-09-211-1/+1
| | | | | | lib/File/stat.t compares two stat calls on t/TEST against each other, but other tests read t/TEST, modifying its access time, causing rare random failures in stat.t in parallel tests.
* Add (?^...) regex constructKarl Williamson2010-09-201-1/+1
| | | | | | | | | | | | | | | | | | This adds (?^...) to signify to use the default regex modifiers for the cluster or embedded pattern-match modifier change. The major purpose of this is to simplify regex stringification, so that "^" is output in place of "-xism". As a result, the stringification will not change in the future when new regex modifiers are added, so tests, etc. that rely on a particular stringification will have to change now, but never again. Code that needs to work properly with both old- and new-style regexes can use something like the following: # Accept both old and new-style stringification my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism'; This construct is Ben Morrow's idea.
* Back out the mauve module and related changesFlorian Ragwitz2010-09-162-541/+0
| | | | | | | | | | | | | | | | | | | | | It's was intended as a temporary namespace only, and we really don't want to ship it in any release until we've figured out what it should really look like. This reverts commit 05c0d6bbe3ec5cc9af99d105b8648ad02ed7cc95, "add sv_reftype_len() and make sv_reftype() be a wrapper for it" commit 792477b9c2e4c75cb03d07bd6d25dc7e1fdf448e, "create the "mauve" temporary namespace for things like reftype" commit 8df6b97c1de8326d50ac9c8cae4bf716393b45bb, "mauve.t needs access to %Config, make sure it's available" commit cfe9162d0d593cd12a979c73df82c7509b324343, "use more efficient sv_reftype_len() interface" and commit 47b13905e23c2a72acdde8bb4669e25e5eaefec4 "add more tests to lib/mauve.t so it tests also that mauve::reftype can return "LVALUE"" There's a `mauve' branch still containing all the code for the temporary mauve namespace. That should be used to work on it until it's mostly ready to be released, and only then merged to blead. Alternatively, it should be deleted if another way to provide mauve's features in the core is found.
* Bump $open::VERSIONFlorian Ragwitz2010-09-151-1/+1
|
* improve open.pm layer class error messageAristotle Pagaltzis2010-09-131-1/+1
|
* Test %main::OVERLOAD, which was almost broken by a proposed fix forFather Chrysostomos2010-09-131-1/+10
| | | | [perl #76138].
* rename &warnings::register to avoid ambiguityRicardo Signes2010-09-122-4/+4
| | | | | until this change code calling "warnings::register->import" was confused by &warnings::register existing.
* Upgrade EUMM from version 6.57_01 to 6.57_05Florian Ragwitz2010-09-111-0/+1
|
* Bump $warnings{,::register}::VERSIONFlorian Ragwitz2010-09-102-2/+2
|
* Update warnings.pl with the ::register changesFlorian Ragwitz2010-09-101-2/+1
| | | | Also regenerate lib/warnings.pm from that.
* improve registration of warning categoriesRicardo Signes2010-09-102-10/+40
| | | | | | | | | | | | | | | | | | | | 1. &warnings::register is added as the public mechanism for adding new warning categories, rather than warnings::register::import knowing about warnings's internals 2. warnings::register::import is updated to use &warnings::register 3. warnings::register::import can take a list of subcategories The upshot is that you can now write: package MyTool; use warnings::register qw(io typos); warnings::warnif('MyTool::io', $message); ...and tools that register new warnings categories do not need to cargo cult code from warnings/register.pm
* Remove qw(...) as parentheses deprecated warningsPaul Johnson2010-09-101-1/+1
|
* make qw(...) first-class syntaxZefram2010-09-082-15/+15
| | | | | | | | | | This makes a qw(...) list literal a distinct token type for the parser, where previously it was munged into a "(",THING,")" sequence. The change means that qw(...) can't accidentally supply parens to parts of the grammar that want real parens. Due to many bits of code taking advantage of that by "foreach my $x qw(...) {}", this patch also includes a hack to coerce qw(...) to the old-style parenthesised THING, emitting a deprecation warning along the way.
* Tests using t/lib/common.pl need to run in separate directories.Nicholas Clark2010-09-011-2/+2
| | | | | | | Commit 8f776eae73090661 turned out to be a bit optimistic with "should be capable of running in parallel", as the temporary files and modules written out by the various test scripts have clashing names. Hence run each test a private subdirectory.
* Add test for deprecation warnings from h2phFlorian Ragwitz2010-09-011-8/+10
| | | | This makes sure the fix for RT#74404 is working.
* Stop Tie::Hash->TIEHASH() looping forever.Nicholas Clark2010-09-012-4/+28
| | | | | This change is analogous to bc3707112523ba7a in Tie::Scalar, but with far fewer tests.
* Bump blib::VERSION after 3f9bb6bFlorian Ragwitz2010-09-011-5/+5
|
* Avoid needless use of UTF8=1 format [RT#56336]Eric Brine2010-08-311-1/+0
| | | | | Some literals (e.g. q'abc') don't set the UTF8 flag for pure ASCII literals. Others (e.g. -abc) do. This should be consistent.
* TODO tests for avoid needless use of UTF8=1 format [RT#56336]Eric Brine2010-08-311-1/+13
| | | | | Some literals (e.g. q'abc') don't set the UTF8 flag for pure ASCII literals. Others (e.g. -abc) do. This should be consistent.
* add more tests to lib/mauve.t so it tests also that mauve::reftype can ↵Zsbán Ambrus2010-08-301-17/+40
| | | | return "LVALUE"
* mauve.t needs access to %Config, make sure it's availableTony Cook2010-08-301-0/+1
|
* create the "mauve" temporary namespace for things like reftypeYves Orton2010-08-302-0/+517
| | | | | | | | | | | | | | | | | | | | | | Scalar::Util::reftype(), refaddr() and blessed() are all a bit less useful than they could be as they all return C<undef> when their argument is not a reference. While this is logical, it also means that using these routines has to be guarded, and normally guarded in such a way that the internal logic is called twice. Additionally these routines are quite commonly used and having to load an additional DLL and XS code every program is inefficient. Therefore we introduce the "mauve" namespace for to hold the "fixed" equivalents, this namespace is /always/ loaded (like the 're' or 'utf8' namespaces), and thus these routines can be accessed easily at any time. We also provide a new module wrapper in t/lib which allows these routines to be exported into other namespaces if the user so chooses. At Jesse's request I have included weaken() and as it seemed logical to do so I have also added isweak(). Once we have a good name for the namespace we can s/mauve/whatever/g
* mktables: Silence common build warningKarl Williamson2010-08-281-2/+5
| | | | | | | | | | The first time mktables is run on a clean directory, mktables.lst is non-existent. Rather than warn on this common occurrence, just assume it is ok, and continue. The point of the warning was to point out a potential problem. But it occurs so often that people have gotten inured (habituated) to it, and it has lost all effectiveness. Better to not output it, and have any problems show up as repeated rebuilds that will annoy enough to be dealt with.
* In mktables, disable string overloading when de-duping lists.Nicholas Clark2010-08-261-0/+6
| | | | | | | | | As the unique() function is called with either a list of strings or a list of objects, and all objects stringify to distinct values, there is no behaviour difference between using object stringification and object address for a "seen" hash. There is, however, an 8% run time difference :-) Devel::NYTProf strikes again.
* Convert mktables to assign lexicals via do { no overloading; ... }; blocks.Nicholas Clark2010-08-261-69/+69
| | | | | This avoids repeating the lexical's name, whilst retaining the tight scope of no overloading.
* Change mktables to use pack 'J', $addr; to key its inside-out objects.Nicholas Clark2010-08-261-99/+100
| | | | | Using pack 'J', $addr; instead of 0 + $addr; reduces run time by about 1%, according to my benchmarking.
* In lib/unicore/mktables tweaks to tidy the file writing code.Nicholas Clark2010-08-261-78/+59
| | | | | | | | | In write(), don't concatenate all the lines to one scalar to print them, as it takes fewer ops and less memory to pass print a list of values. die if the print or close return errors, and don't print the success message until the file is successfully closed. Refactor make_property_test_script() to use write().
* In lib/unicore/mktables minor tidying of the numifciation code.Nicholas Clark2010-08-261-4/+4
| | | | | | In the inside-out object lookup code, strive for consistency, by always writing 0 + $ref with no spaces. No need to use 0+$ref as the arguments to == as it will force numeric context.
* mktables: Clarify comment output in filesKarl Williamson2010-08-251-1/+3
| | | | | I never understood this comment until it bit me. Based on my new-found experience, I've expanded it.
* don't taint $DB::subDavid Mitchell2010-08-252-1/+27
| | | | | | | | | | | | | | | | [perl #76872] showed a case where code like the following, run under -d, would cause $DB::sub to get set: $tainted_expression && func() The tainted expression sets PL_tainted, so calling func() under -d, which sets $DB::sub, causes it to get tainted. Consequently any further sub calls would set PL_tainted while getting the old value of $DB::sub (and cause the new value to be tainted too), and if the sub was XS, then its code would be executed with PL_tainted set. It isn't an issue with perl subs as the first nextstate op resets PL_tainted.
* detaint paths added by blib.pmDavid Mitchell2010-08-241-0/+5
|
* Bump $feature::VERSIONFlorian Ragwitz2010-08-171-1/+1
| | | | | It hasn't seen many changes since 5.13.3, but it was changed slightly in the docs, and cmpVERSION.pl kindly asked me to bump the verion even for that.
* Fix the overload tests marked as TODO in ↵Chris 'BinGOs' Williams2010-08-151-6/+4
| | | | | | 22afb09b13a6dc17f20388991422fdbe6166e3ed As is() doesn't stringify its arguments anymore we have to.
* Made a number of tests TODO in lib/overload.t due to changes to Test-SimpleChris 'BinGOs' Williams2010-08-141-1/+3
| | | | | | | | | Feature Changes * is() and others will no longer stringify its arguments before comparing. Overloaded objects will make use of their eq overload rather than their "" overload. This can break tests of impolitely string overloaded objects. DateTime prior to 0.54 is the biggest example.
* use charnames (); failsKarl Williamson2010-08-131-7/+34
| | | | | | If "use charnames ()" are the only usages of this pragma in a program, it fails due to the pragma's import method not getting called. This fixes that.
* charnames.t: tweak amount of testing of CJK charsKarl Williamson2010-08-131-6/+13
| | | | | | | | | | | | Actually, this tweaks the amount of testing of characters whose names are algorithmically determinable, most of which are CJK characters. This patch changes the testing to test not 1% of them, but to test 1 in each block, no matter what the block size. We really don't need to test many of these to be confident the algorithm is working. It also adds some comments to clarify what happens if one tweaks the block size.
* charnames.t: Change message to fit in 80 columnsKarl Williamson2010-08-131-3/+3
| | | | This is an important message. Better not to wrap it.
* charnames.t: Guard agains empty lines in __DATA__Karl Williamson2010-08-131-0/+1
| | | | | | | | Somehow an empty line got inserted at the end of the file, and got interpreted as 0's which caused the test for NULL to fail. This guards against that. I removed the empty line, but I'm not sure git has picked that up.
* charnames.t: use srand's seedKarl Williamson2010-08-131-5/+5
| | | | Don't calculate our own seed
* feature.pm: Note unicode_strings is not completeKarl Williamson2010-08-111-1/+1
|
* Add tests for Tie::ExtraHashDavid Cantrell2010-08-021-0/+50
|
* Merge remote branch 'khwilliamson/ncharnames' into bleadRafael Garcia-Suarez2010-07-273-174/+11744
|\ | | | | | | | | Conflicts: pod/perl5133delta.pod
| * mktables: Move some CJK chars out of Name.pl tableKarl Williamson2010-07-131-15/+14
| | | | | | | | | | | | | | | | Now that charnames can handle algorithmically determinable character names, change mktables to put all such into the algorithms it generates for charnames to use. For historical reasons, they had been placed in the large main table. This patch shortens that table by approximately 1000 names, which should speed up everything.
| * [perl 71764] Extend charnames to all of UnicodeKarl Williamson2010-07-132-23/+11405
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch causes \N{}, vianame, and viacode to know the names of all Unicode code points. Previously the names that are algorithmically determinable were not handled. These include the Hangul syllables and many CJK characters. It simply adds using the routines that mktables inserts into Name.pl that handle these characters. mktables generates these algorithms from data in the Unicode data base. The routines have been there since 11/2009 in anticipation of this change, but have been unused until now. They probably have not been reviewed thoroughly. The major change to this is the .t file. Now that all code points are understood, the .t tests them all. But this would take too long each time, so it tests a random sample. If there is a failure, the seed is output so that the test can be reproduced. This idea came from Michael Schwern, and is the same he uses in Test::Sims. Various parameters about the sampling are easily adjustable.
| * charnames.pm: More refactoring for performanceKarl Williamson2010-07-131-32/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I realized after the last commit that it might be faster to use a trie when there are multiple scripts that a letter could be in, instead of searching the table for each script. When there were 6 possible scripts and the letter was found in the final one, the speed-up was a factor of 5. This also simplified things. The list of scripts can be stored as a string like A|B|C instead of a stringified array, and the code just gets simpler. Also, there were complications to the code to keep from zapping the input name, just in case it was needed for an error message. But I realized that instead of using a shift to get the name, just copy it from $_[0], and on the error leg that needs the original, it still is in $_[0]. If a user-defined alias is to a character name to lookup and that one is invalid, we want to output the invalid one, so a further variable, $save_input is used to hold it
| * charnames.pm: refactor so complex re is used onceKarl Williamson2010-07-131-24/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The :short option which looks like "greek:letter" is just a special case of the option where a list of possible scripts is set up in the pragma call. In this case, greek is the single script to look up. It also turns out that, contrary to the prior code, :short is effectively mutually exclusive of checking through that list of scripts. That is, "greek:letter" didn't match in the :short option, it won't match any script option either because ':' is not a legal character in a name. So there is no need to execute both. I refactored the code to do an if then else because of this. And they both use the same complicated regex that I may have to change in future patches. So I refactored the code to use the same re Finally, I added a goto to eliminate a test.
| * charnames.pm: Change variable's nameKarl Williamson2010-07-131-8/+4
| | | | | | | | It makes more sense to me in light of patches coming up.
| * charnames.pm: expand tabsKarl Williamson2010-07-131-66/+66
| | | | | | | | It was getting painful to have tabs, so change to expand them to blanks