summaryrefslogtreecommitdiff
path: root/pp_ctl.c
Commit message (Collapse)AuthorAgeFilesLines
* add more positive gofs GPOS tests and fix some bugs tooYves Orton2009-09-101-5/+8
|
* Corrupt filename when setting %INC entry in a @INC hookSalvador Ortiz Garcia2009-09-061-1/+1
| | | | | | | The code in pp_ctl.c after calling an @INC hook blindly assumes that the SV setted by the user in %INC is an SVPV (SvPOK true) for setting the filename. So when the user uses other scalar types, the output of __FILE__, warn, die, caller, etc. shows random garbage.
* Add clear magic to %^H so that the HE chain is reset when you empty it.Zefram2009-08-211-4/+1
| | | | This fixes [perl #68590] : %^H not lexical enough.
* add -DM flag to track smartmatch resolutionDavid Mitchell2009-08-201-4/+52
|
* In pp_caller, remove a GvMULTI_on() by adding GV_ADDMULTI to gv_fetchpvs().Nicholas Clark2009-08-081-3/+2
|
* Teach goto how to cross given/when blocksVincent Pit2009-07-221-0/+2
|
* Simplify the code that sets $_ in given()Rafael Garcia-Suarez2009-07-211-7/+1
| | | | | $_ is guaranteed to be lexical here, because the parser did an allocmy when parsing the given() statement.
* Fast enabling of strictures when version 5.11.0 is requiredRafael Garcia-Suarez2009-07-071-4/+1
| | | | | We don't load strict.pm, we just manipulate the hint bits. Plus more tests.
* use strict by default if "use 5.011" is in effect!Steffen Mueller2009-07-071-0/+8
|
* Make C<undef ~~ 0> and C<undef ~~ ""> not match (like in 5.10.0)Rafael Garcia-Suarez2009-07-011-0/+4
| | | | | | This makes ~~ commutative with regard to undef, and fixes an inconsistency, since C<undef ~~ [0]> was not matching, and ~~ should be distributive in this case.
* Trim all trailing / from "." in @INC when filling %INCRafael Garcia-Suarez2009-06-251-2/+4
| | | | | | This fixes bug #66942 : as a / was left in the directory name, $INC{"Foo.pm"} for a file loaded from the current directory was given the incorrect value "/Foo.pm".
* Fix [RT#63110] -- two small memory leaks were introduced in 5b9c067Alex Vandiver2009-05-301-1/+4
|
* Allow ~~ overloading on the left side, when the right side is a plain scalarRafael Garcia-Suarez2009-05-241-2/+19
|
* In the ~~ implementation, consistently use the SV-aware API for hash keys.Rafael Garcia-Suarez2009-05-241-13/+4
| | | | This way, we can handle tied hashes such as ones that have references as keys.
* WIN32 preprocessor symbols is usually tested with #ifdef, not #ifJan Dubois2009-05-141-1/+1
| | | | | | Doesn't really make a difference as WIN32 is defined as '1' when it is defined, but there is something to be said for consistent usage.
* do/require don't treat '.\foo' or '..\foo' as "absolute paths" on Windows.Christoph Lamprecht2009-05-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both 'do' and 'require' treat paths *explicitly* relative to the current directory (starting with './' or '../') as a special form of absolute path. That means they can be loaded directly and don't need to be resolved via @INC, so they don't rely on '.' being in @INC (unless running in taint mode). This behavior is "documented" in the P5P thread "Coderefs in @INC" from 2002. The code is missing special treatment of backslashes on Windows so that '.\\' and '..\\' are handled in the same manner. This change fixes http://rt.perl.org/rt3/Public/Bug/Display.html?id=63492 (Note that the references to taint mode in the bug report are only relevant as far as taint mode removes '.' from @INC). This change also fixes the following Scalar-List-Utils bug report: http://rt.cpan.org/Public/Bug/Display.html?id=25430 The Scalar::Util test failure in t/p_tainted.t only manifests itself under Test::Harness 3, and only outside the Perl core: * Test::Harness 2 (erroneously) puts '-I.' on the commandline in taint mode and runs something like this: `perl -I. t/p_tainted.t` so '.\t\tainted.t' can be found via '.' in @INC. * Core Perl runs something like this from the t/ directory: `..\perl.exe -I../lib ../ext/List-Util/t/p_tainted.t` so '.\..\ext\List-Util\t\tained.t' can be found via '../lib' in @INC. Signed-off-by: Jan Dubois <jand@activestate.com>
* Implement Hash/Array ~~ Regex (with tests)Rafael Garcia-Suarez2009-05-091-29/+45
|
* Treat blessed references on the left of C<~~> as scalarsRafael Garcia-Suarez2009-05-091-18/+35
|
* Implement distributivity in $scalar ~~ @arrayRafael Garcia-Suarez2009-05-091-17/+9
| | | | | Note that undef ~~ @array is not distributive, it only tests for definedness of array elements.
* Inline macros used only onceRafael Garcia-Suarez2009-05-081-8/+4
|
* Make ~~ overloading only be invoked on the right argumentRafael Garcia-Suarez2009-05-081-3/+2
|
* Merge branch 'blead' into smartmatchRafael Garcia-Suarez2009-05-051-37/+6
|\ | | | | | | | | Conflicts: t/op/switch.t
| * Remove warnings "Exiting given/when via next/last"Rafael Garcia-Suarez2009-05-031-4/+2
| | | | | | | | | | See bug [perl #65114] possible unnecesary warning / Exiting given via next. Those warnings were not necessary.
| * Remove all #ifdef MACOS_TRADITIONAL code in core and non-dual-life XS code.Nicholas Clark2009-04-271-33/+4
| | | | | | | | | | | | | | | | (MacOS support was removed from MakeMaker in 6.22, and merged to blead on 15th December 2004 with 5dca256ec738057dc331fb644a93eca44ad5fa14. After this point MacOS wouldn't even have been able to build the perl binary, because it would not have been able to build DynaLoader. If anyone wishes to resurrect MacOS, start by reversing this commit and the relevant part of that commit.)
* | Inline macro tryAMAGICbinSET() in smart match routineRafael Garcia-Suarez2009-03-241-1/+9
| | | | | | | | (to build tricks on a sane base)
* | Make []~~\&f and {}~~\&f matchRafael Garcia-Suarez2009-03-241-2/+2
| | | | | | | | (Zefram remarks that all(empty set) is true)
* | Implement "~~ $scalar" for numbers and stringsRafael Garcia-Suarez2009-03-241-27/+17
| | | | | | | | | | Make documentation more precise about the different cases, and add tests.
* | Make ~~ qr// non-commutativeRafael Garcia-Suarez2009-03-231-22/+9
| | | | | | | | | | Pass elements in correct order to the sub-smart-match when comparing two arrays. And more tests
* | Refactoring work on '~~ @array' implementationRafael Garcia-Suarez2009-03-231-28/+43
| | | | | | | | (remove commutativity)
* | Smart match when a hash is on the RHSRafael Garcia-Suarez2009-03-181-7/+15
| | | | | | | | | | | | This implement the new semantics of C<~~ HASH> smart matching. This also reveals that overloading actually does not work at all. Add also tests for C<undef ~~ %hash>.
* | Document that empty sets don't smart-matchRafael Garcia-Suarez2009-03-171-1/+5
| | | | | | | | (and implement this for the C<~~ coderef> form)
* | Iterative smart match over keys/elements when a coderef is on the RHSRafael Garcia-Suarez2009-03-171-15/+71
| |
* | Make smart matching ~~ undef dispatch only on the RHSRafael Garcia-Suarez2009-03-131-16/+8
| |
* | Remove special case for coderefs with empty prototypes in smart matchRafael Garcia-Suarez2009-03-061-54/+1
|/ | | | (plus, fix a metasyntactic name clash in the switch test)
* $object ~~ undef should always test for definednessRafael Garcia-Suarez2009-02-131-2/+6
| | | | (even if $object hasn't overloaded the ~~ operator)
* Add get_cvs() as a shortcut for STR_WITH_LEN() and Perl_get_cvn_flags(), andNicholas Clark2009-01-211-2/+2
| | | | use it where possible.
* Correct the form of the flags passed to perl_get_cv().Nicholas Clark2009-01-211-2/+2
|
* Update the documentation of get_hv() to note that it calls Perl_gv_fetchpv(),Nicholas Clark2009-01-211-1/+1
| | | | | and hence the 'create' argument is actually 'flags'. Fix code and documentation that used TRUE or FALSE to use 0 or GV_ADD.
* Combine sv_utf8_upgrade with a following growKarl2009-01-191-5/+4
|
* Change PL_debug behaviour so that string eval lines are saved wheneverNicholas Clark2008-12-021-1/+3
| | | | | | | a subroutine is defined, even if the eval'd string has subsequent syntax errors. This allows the debugger to single step into these subroutines. p4raw-id: //depot/perl@34986
* Implement PERLDBf_SAVESRC_INVALID, which saves source lines for stringNicholas Clark2008-12-021-28/+22
| | | | | evals that fail to compile. p4raw-id: //depot/perl@34985
* Followup to change 34979. Tests are good, m'kay. Particularly when theyNicholas Clark2008-12-021-1/+10
| | | | | | | show you that something you thought worked doesn't. Sadly it's not possible to trivially make it work, so for now they're todo_skip(). p4raw-id: //depot/perl@34981
* Add two more flags, PERLDBf_SAVESRC_NOSUBS and PERLDBf_SAVESRC_INVALID,Nicholas Clark2008-12-021-3/+4
| | | | | | which give total control over when source code from evals is stored. The debugger doesn't need them, but I forsee that profilers might. p4raw-id: //depot/perl@34979
* rxres_free() and rxres_restore() are only used in pp_ctl.c, so can beNicholas Clark2008-11-261-4/+4
| | | | | static. Macros PUSHSUBST() and POPSUBST() are only viable in PERL_CORE. p4raw-id: //depot/perl@34935
* Rename PL_breakable_sub_generation to PL_breakable_sub_gen, to pleaseNicholas Clark2008-11-181-2/+2
| | | | | the ANSI gods of VMS. p4raw-id: //depot/perl@34886
* Use only unsigned ints for comparisons to PL_breakable_sub_generationRafael Garcia-Suarez2008-11-181-2/+2
| | | p4raw-id: //depot/perl@34880
* Rafael noticed a bug in 34873 - I was comparing against the wrongNicholas Clark2008-11-181-1/+1
| | | | | | variable, and hence (usually) saving all globs, not just those that should be kept. p4raw-id: //depot/perl@34879
* S_save_lines() was using strchr() when it should have been usingNicholas Clark2008-11-171-1/+1
| | | | | | | | memchr(). Result - eval""ed source with embedded NULs was not split correctly into lines for the debugger. Obscure. But still a bug. Maybe the Campaign for the Elimination of strlen() needs to take a long hard stare at every strchr() too. And strmp() while we're looking. p4raw-id: //depot/perl@34876
* No need to str*cpy() a string of known fixed length ("_<(eval )") whenNicholas Clark2008-11-171-5/+8
| | | | | | | a simple 1 byte write has the same desired effect. Clearly the Campaign for the Elimination of strlen() needs to branch out into str*cat() and str*cpy(). p4raw-id: //depot/perl@34874
* Fix the bug introduced with MRO, whereby the internals were not savingNicholas Clark2008-11-171-1/+1
| | | | | lines in subroutines defined inside eval ""s for the debugger. p4raw-id: //depot/perl@34873