This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
11 years agoadd .gdb_history to .gitignore
Yves Orton [Sat, 17 Nov 2012 13:10:59 +0000 (14:10 +0100)]
add .gdb_history to .gitignore

11 years agoAdd a utility macro for reading hex digits.
Yves Orton [Sat, 17 Nov 2012 13:04:38 +0000 (14:04 +0100)]
Add a utility macro for reading hex digits.

Karl checked and it seems it actually works on EBCDIC as well
as on ASCII.

11 years agomake regcharclass hash order determinisitic
Yves Orton [Sat, 17 Nov 2012 13:02:18 +0000 (14:02 +0100)]
make regcharclass hash order determinisitic

11 years agoEliminate test from generated cp macros
Yves Orton [Sat, 17 Nov 2012 11:58:12 +0000 (12:58 +0100)]
Eliminate test from generated cp macros

Sayeth Karl:
In the _cp macros, the final test can be simplified:

/*** GENERATED CODE ***/
#define is_VERTWS_cp(cp)     \
( ( 0x0A <= cp && cp <= 0x0D ) || ( 0x0D < cp &&     \
( 0x85 == cp || ( 0x85 < cp &&     \
( 0x2028 == cp || ( 0x2028 < cp &&     \
0x2029 == cp ) ) ) ) ) )

That 0x2028 < cp can be omitted and it will still mean the same thing.

And So Be It.

11 years agoclone() wasn't cloning the whole stack
David Mitchell [Fri, 16 Nov 2012 18:04:49 +0000 (18:04 +0000)]
clone() wasn't cloning the whole stack

When cloning stacks (e.g. for fake fork), the stack is cloned
by copying the stack AV pointed to by PL_curstackinfo; but the
AvFILL on that AV may not be up to date, resulting in the top N
items of the stack not being cloned. Fix by saving PL_stack_sp
back into AvFILL(PL_curstack) before cloning

11 years agoOops, fix memory leak just introduced by 3fcdbd32b2
Steve Hay [Fri, 16 Nov 2012 14:21:06 +0000 (14:21 +0000)]
Oops, fix memory leak just introduced by 3fcdbd32b2

11 years agoDon't try to ansify the path if it is empty
Steve Hay [Fri, 16 Nov 2012 09:11:36 +0000 (09:11 +0000)]
Don't try to ansify the path if it is empty

Fixes a possible crash (manifested when running with the page heap enabled)
when running after clearing PATH, which at least one test in op/taint.t
does.

11 years agounder -Dusedl there are no warnings about the other dl_ functions
Tony Cook [Fri, 16 Nov 2012 11:14:16 +0000 (22:14 +1100)]
under -Dusedl there are no warnings about the other dl_ functions

without usedl, the warnings are like:

Subroutine DynaLoader::dl_error redefined at (eval 1) line 2
... warnings about every other DynaLoader function
Subroutine DynaLoader::dl_error redefined at (eval 2) line 2

with usedl, only dl_error is defined, so the other warnings disappear,
since the regexp expected two new-lines between the dl_error warnings
the test failed.

The change makes one of the newlines optional.

11 years agoleakfinder.pl requires XS::APItest which isn't built with -Uusedl
Tony Cook [Fri, 16 Nov 2012 09:57:32 +0000 (20:57 +1100)]
leakfinder.pl requires XS::APItest which isn't built with -Uusedl

11 years agosave_freeop is not an expression, remove PL_Xpv
Daniel Dragan [Thu, 15 Nov 2012 20:11:10 +0000 (15:11 -0500)]
save_freeop is not an expression, remove PL_Xpv

save_freeop and SAVEFREEOP are never used in expressions only statements.
Using PL_Xpv is never ideal. For me .text section dropped from 0xC1DFF to
0xC1DBF after applying this.

11 years agoleakfinder.pl: More exceptions
Father Chrysostomos [Thu, 15 Nov 2012 23:55:50 +0000 (15:55 -0800)]
leakfinder.pl: More exceptions

11 years ago[perl #115742] Push a new pad for recursive DB::DB
Father Chrysostomos [Thu, 15 Nov 2012 23:53:13 +0000 (15:53 -0800)]
[perl #115742] Push a new pad for recursive DB::DB

When invoking the debugger recursively, pp_dbstate needs to push a new
pad (like pp_entersub) so that DB::DB doesn’t stomp on the lexical
variables belonging to the outer call.

11 years agoperlre: Fix syntax error in example
Father Chrysostomos [Thu, 15 Nov 2012 20:46:36 +0000 (12:46 -0800)]
perlre: Fix syntax error in example

11 years agoperlfunc: Correct note about eval in DB package
Father Chrysostomos [Thu, 15 Nov 2012 20:38:27 +0000 (12:38 -0800)]
perlfunc: Correct note about eval in DB package

It’s where the subroutine is defined, not the current package,
that matters.

#!perl -l
sub { my $x = 3; foo(); print $x }->();
sub foo { package DB; eval q"$x = 42" }
__END__
3

#!perl -l
sub { my $x = 3; DB::foo(); print $x }->();
package DB;
sub foo { package main; eval q"$x = 42"; }
__END__
42

11 years agoleakfinder.pl: Run evals four times
Father Chrysostomos [Thu, 15 Nov 2012 02:08:34 +0000 (18:08 -0800)]
leakfinder.pl: Run evals four times

With three times we still get false positives

11 years agoleakfinder.pl: More exceptions
Father Chrysostomos [Thu, 15 Nov 2012 02:05:04 +0000 (18:05 -0800)]
leakfinder.pl: More exceptions

11 years ago[MERGE] refactor pp_iter
David Mitchell [Thu, 15 Nov 2012 22:46:31 +0000 (22:46 +0000)]
[MERGE] refactor pp_iter

Refactor the code in this hot function. Chiefly, the if/else chain
was replaced with a single switch statment, and various bits of code were
tidied up, duplicate code eliminated, local vars added to avoid repeated
evaluation of expressions etc; along with big whitespace changes to fix up
indentation etc afterwards.

With these changes, these trivial benchamarks run about 7% faster:

    $x++ for @a; # @a has 30_000 elements
    $x++ for 1..30_000;

while this one stayed about the same, presumably due to the relatively
costly overhead of sv_inc():

    $x++ for 'aaa' .. 'zzz';

11 years agopp_iter: final whitespace/comment tidy up
David Mitchell [Thu, 15 Nov 2012 22:34:40 +0000 (22:34 +0000)]
pp_iter: final whitespace/comment tidy up

reindent the LAZYSV block to be consistent with the other two;
move the comments to be on the same line as the case statements,
and fix the indent on the RETPUSHYES.

Only whitespace/moving comment changes; nothing functional

11 years agopp_iter: refactor CXt_LOOP_LAZYSV branch
David Mitchell [Tue, 13 Nov 2012 13:12:31 +0000 (13:12 +0000)]
pp_iter: refactor CXt_LOOP_LAZYSV branch

11 years agopp_iter: refactor CXt_LOOP_LAZYIV branch
David Mitchell [Tue, 13 Nov 2012 12:51:05 +0000 (12:51 +0000)]
pp_iter: refactor CXt_LOOP_LAZYIV branch

11 years agopp_iter: a bit more refactoring of CXt_LOOP_FOR branch
David Mitchell [Tue, 13 Nov 2012 12:20:34 +0000 (12:20 +0000)]
pp_iter: a bit more refactoring of CXt_LOOP_FOR branch

11 years agopp_iter: factor out some common code in CXt_LOOP_FOR
David Mitchell [Tue, 13 Nov 2012 11:55:19 +0000 (11:55 +0000)]
pp_iter: factor out some common code in CXt_LOOP_FOR

11 years agopp_iter: move var declarations to narrower scope
David Mitchell [Tue, 13 Nov 2012 11:15:01 +0000 (11:15 +0000)]
pp_iter: move var declarations to narrower scope

11 years agopp_iter: reindent after removing if block
David Mitchell [Tue, 13 Nov 2012 11:02:36 +0000 (11:02 +0000)]
pp_iter: reindent after removing if block

only whitespace changes

11 years agopp_iter: move RETPUSHYES outside switch
David Mitchell [Tue, 13 Nov 2012 10:57:35 +0000 (10:57 +0000)]
pp_iter: move RETPUSHYES outside switch

11 years agopp_iter: reindent code after previous change
David Mitchell [Tue, 13 Nov 2012 10:52:49 +0000 (10:52 +0000)]
pp_iter: reindent code after previous change

Only whitespace changes

11 years agopp_iter: replace if/else with switch
David Mitchell [Tue, 13 Nov 2012 10:35:34 +0000 (10:35 +0000)]
pp_iter: replace if/else with switch

Makes the code neater and slightly faster

11 years agoFix unescaped left brace warning in uni/parser.t.
Craig A. Berry [Thu, 15 Nov 2012 17:12:25 +0000 (11:12 -0600)]
Fix unescaped left brace warning in uni/parser.t.

Which was causing the test to fail (on VMS at least) with
"unexpected output at test 0".

11 years agodump.c: Fix non-mad threaded build error
Father Chrysostomos [Wed, 14 Nov 2012 22:19:52 +0000 (14:19 -0800)]
dump.c: Fix non-mad threaded build error

This was introduced by 75a6ad4aa3.

C preprocessors treat the ‘aTHX_ foo’ in MACRO(aTHX_ foo) as a sin-
gle argument.

11 years agoSVf_IsCOW
Father Chrysostomos [Wed, 14 Nov 2012 21:02:48 +0000 (13:02 -0800)]
SVf_IsCOW

As discussed in ticket #114820, instead of using READONLY+FAKE to mark
a copy-on-write string, we should make it a separate flag.

There are many modules in CPAN (and 1 in core, Compress::Raw::Zlib)
that assume that SvREADONLY means read-only.  Only one CPAN module,
POSIX::pselect will definitely be broken by this.  Others may need to
be tweaked.  But I believe this is for the better.

It causes all tests except ext/Devel-Peek/t/Peek.t (which needs a tiny
tweak still) to pass under PERL_OLD_COPY_ON_WRITE, which is a prereq-
uisite for any new COW scheme that creates COWs under the same cir-
cumstances.

11 years agoleakfinder.pl: Duh!
Father Chrysostomos [Wed, 14 Nov 2012 19:22:56 +0000 (11:22 -0800)]
leakfinder.pl: Duh!

I hadn’t tested this before I committed it.  It had a syntax error.

11 years agoCombine duplicate dump code
Reini Urban [Wed, 14 Nov 2012 18:33:43 +0000 (12:33 -0600)]
Combine duplicate dump code

Combine op_flags and op_private dumper for MAD (xml) and -Dx dump.
Add some previously missing flags.

11 years agoremove most calls to strlen in S_force_ident
Daniel Dragan [Wed, 14 Nov 2012 11:18:54 +0000 (06:18 -0500)]
remove most calls to strlen in S_force_ident

I saw strlen("\"") being called here, where the string came from
Perl_yylex. This commit provides a shortcut to not call strlen for a
1 character + null character string.

11 years agoStop eval "END OF TERMS" from leaking
Father Chrysostomos [Wed, 14 Nov 2012 14:10:37 +0000 (06:10 -0800)]
Stop eval "END OF TERMS" from leaking

I found this memory leak by evaluating lines of the Copying file as
Perl code. :-)

The parser requires yylex to return exactly one token with each call.
Sometimes yylex needs to record a few tokens ahead of time, so its
puts them in its forced token stack.  The next call to yylex then pops
the pending token off that stack.

Ops belong to their subroutines.  If the subroutine is freed before
its root is attached, all the ops created when PL_compcv pointed
to that sub are freed as well.  To avoid crashes, the ops on the
savestack and the forced token stack are specially marked so they are
not freed when the sub is freed.

When it comes to evaluating "END OF TERMS AND CONDITIONS", the END
token causes a subroutine to be created and placed in PL_compcv.  The
OF token is treated by the lexer as a method call on the TERMS pack-
age.  The TERMS token is placed in the forced token stack as an sv in
an op for a WORD token, and a METHOD token for OF is returned.  As
soon as the parser sees the OF, it generates an error, which results
in LEAVE_SCOPE being called, which frees the subroutine for END while
TERMS is still on the forced token stack.  So the subroutine’s op
cleanup skips that op.  Then the parser calls back into the lexer,
which returns the TERMS token from the forced token stack.  Since
there has been an error, the parser discards that token, so the op
is never freed.  The forced token stack cleanup that happens in
parser_free does not catch this, as the token is no longer on
that stack.

Earlier, to solve the problem of yylex returning freed ops to the
parser, resulting in crashes, I set the op_savefree flag on ops on the
forced token stack.  But that resulted in a leak.

So now I am using a different approach: When the sub is freed and
frees all its ops, have it also look in the parser’s forced token
stack, freeing any ops that belong to it, and setting the point-
ers to null.

11 years agoStop my subs with syntax errors from leaking
Father Chrysostomos [Wed, 14 Nov 2012 07:41:19 +0000 (23:41 -0800)]
Stop my subs with syntax errors from leaking

11 years agoutf8.c: Don't copy a buffer to itself
Karl Williamson [Mon, 12 Nov 2012 23:43:12 +0000 (16:43 -0700)]
utf8.c: Don't copy a buffer to itself

memcpy(), which is what Copy() resolves to, is not supposed to handle
the possibility of overlapping source and destination.  In some cases
in this code, the source and destination pointers are identical.  What
should happen then is a no-op, so just don't do the copy in that case.
If the ptrs aren't identical, they won't otherwise overlap, so the
Copy() is valid except for when they are identical.

11 years agoUpdate Unicode-Collate to CPAN version 0.92
Chris 'BinGOs' Williams [Wed, 14 Nov 2012 14:46:15 +0000 (14:46 +0000)]
Update Unicode-Collate to CPAN version 0.92

  [DELTA]

  0.92  Wed Nov 14 20:58:19 2012
    - fix: index() etc. with preprocess/normalization should be always croaked.
    - doc: referred to the latest UTS #10 and updated its section numbers.
    - supported the identical level (see 'identical' in POD).
    - Now UCA_Version 26 (for Unicode 6.2.0) is supported.
    - added ident.t in t.
    - modified tests: cjkrange.t, compatui.t, hangtype.t, index.t,
      overcjk0.t, overcjk1.t, test.t, view.t in t.

    * But the default UCA_Version is still 24.
     (In the next release, UCA_Version 26 will be the default.)

11 years agoSync Module-CoreList in Maintainers.pl with CPAN
Chris 'BinGOs' Williams [Wed, 14 Nov 2012 14:44:56 +0000 (14:44 +0000)]
Sync Module-CoreList in Maintainers.pl with CPAN

11 years agoleakfinder.pl: more exceptions
Father Chrysostomos [Wed, 14 Nov 2012 06:49:36 +0000 (22:49 -0800)]
leakfinder.pl: more exceptions

11 years agoFix various mad eval leaks
Father Chrysostomos [Wed, 14 Nov 2012 05:54:32 +0000 (21:54 -0800)]
Fix various mad eval leaks

Several SVs that exist for the sake of mad dumps were being set up
even for normal execution.

11 years agoop.c: Fix mad+POISON build under clang
Father Chrysostomos [Wed, 14 Nov 2012 00:47:24 +0000 (16:47 -0800)]
op.c: Fix mad+POISON build under clang

11 years agoPreserve case for the current perldelta on VMS.
Craig A. Berry [Wed, 14 Nov 2012 01:20:38 +0000 (19:20 -0600)]
Preserve case for the current perldelta on VMS.

Both MMS and MMK upcase whenever there is a double macro expansion,
but by going through only one expansion, we can preserve the case
of the target filename on copy under extended parse.

11 years agodTHX implies dVAR, using both fails to build under -DPERL_GLOBAL_STRUCT
Tony Cook [Tue, 13 Nov 2012 23:44:25 +0000 (10:44 +1100)]
dTHX implies dVAR, using both fails to build under -DPERL_GLOBAL_STRUCT

11 years agoleakfinder.pl: More exceptions
Father Chrysostomos [Tue, 13 Nov 2012 22:53:33 +0000 (14:53 -0800)]
leakfinder.pl: More exceptions

11 years agoFix assertion failures with anon subs
Father Chrysostomos [Tue, 13 Nov 2012 22:52:09 +0000 (14:52 -0800)]
Fix assertion failures with anon subs

In commit 9ffcdca1f50, I did not take into account that the newATTRSUB’s
caller makes sure that the CV is freed if it is an anonymous sub.  So I
only needed to free the sub explicitly after a syntax error for a named
sub.

By returning 0 for anonymous subs as well, I ended up causing assertion
failures.  Why I wasn’t getting them before I don’t know, as I was using
a debugging build.

11 years agoStop /(??{})/ from leaking temporary regexps
Father Chrysostomos [Tue, 13 Nov 2012 20:44:16 +0000 (12:44 -0800)]
Stop /(??{})/ from leaking temporary regexps

11 years agoregexec.c: Safer stack handling for re-evals
Father Chrysostomos [Tue, 13 Nov 2012 17:10:09 +0000 (09:10 -0800)]
regexec.c: Safer stack handling for re-evals

I don’t believe there is an actual bug here (only a theoretical one), but comparing pointers into an array that has been reallocated meanwhile is not a good idea.

11 years agoSilence two build warnings on systems where ivsize > ptrsize.
Eric Brine\" (via RT) [Tue, 13 Nov 2012 10:42:47 +0000 (02:42 -0800)]
Silence two build warnings on systems where ivsize > ptrsize.

# New Ticket Created by  "Eric Brine"
# Please include the string:  [perl #115710]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=115710 >

This is a bug report for perl from ikegami@adaelis.com,
generated with the help of perlbug 1.39 running under perl 5.14.2.

-----------------------------------------------------------------
[Please describe your issue here]

Attached patch silences two build warnings on systems where ivsize >
ptrsize.

They are safe to ignore, a side-effect of a function with a polymorphic
interface.

cv = find_runcv_where(FIND_RUNCV_level_eq, iv,        NULL);
cv = find_runcv_where(FIND_RUNCV_padid_eq, PTR2IV(p), NULL);  // p is a
PADNAMELIST*

[Please do not change anything below this line]
-----------------------------------------------------------------

11 years agoleakfinder.pl: More exceptions
Father Chrysostomos [Tue, 13 Nov 2012 08:00:45 +0000 (00:00 -0800)]
leakfinder.pl: More exceptions

11 years agoleakfinder.pl: Run code more times
Father Chrysostomos [Tue, 13 Nov 2012 07:46:16 +0000 (23:46 -0800)]
leakfinder.pl: Run code more times

Sometimes a piece of code will still create new SVs on the second
or even the third iteration, but not after that.  That doesn’t count
as a leak.

11 years agoDo a better job of escaping components of ldlibpth for the shell
Eric Brine [Tue, 13 Nov 2012 00:40:49 +0000 (19:40 -0500)]
Do a better job of escaping components of ldlibpth for the shell

It's not unusual, for example, for the search path to include "(" and ")" in cygwin.

11 years agoPrune dead code in pp_ctl.c:pp_goto
Father Chrysostomos [Tue, 13 Nov 2012 07:11:34 +0000 (23:11 -0800)]
Prune dead code in pp_ctl.c:pp_goto

We croak if CxTYPE(cx) == CXt_EVAL before reaching the code
in question.

11 years agoDon’t leak subs containing syntax errors
Father Chrysostomos [Tue, 13 Nov 2012 07:04:16 +0000 (23:04 -0800)]
Don’t leak subs containing syntax errors

I fixed this for BEGIN blocks earlier, but missed the fact that
all subs are affected.

When called without an o argument (from newANONATTRSUB), newATTRSUB
is expected to return a CV with an unowned reference count of which
the caller will take ownership.  We cannot have newATTRSUB returning
a freed CV, so we have it return null instead.  But that means
ck_anoncode and pm_runtime have to account for that.

11 years agoStop anon subs with bad attributes from leaking
Father Chrysostomos [Tue, 13 Nov 2012 04:10:56 +0000 (20:10 -0800)]
Stop anon subs with bad attributes from leaking

11 years agoStop goto &sub from leaking when it croaks
Father Chrysostomos [Tue, 13 Nov 2012 00:04:07 +0000 (16:04 -0800)]
Stop goto &sub from leaking when it croaks

11 years agoUpdate IO-Compress to CPAN version 2.058
Chris 'BinGOs' Williams [Mon, 12 Nov 2012 23:49:19 +0000 (23:49 +0000)]
Update IO-Compress to CPAN version 2.058

  [DELTA]

  2.058 12 November 2012

      * RT# 81119: Latest IO::Compress 2.057 fails tests on 5.8.x

11 years agoUpdate Compress-Raw-Bzip2 to CPAN version 2.058
Chris 'BinGOs' Williams [Mon, 12 Nov 2012 23:46:12 +0000 (23:46 +0000)]
Update Compress-Raw-Bzip2 to CPAN version 2.058

  [DELTA]

  2.058 12 November 2012

      * No Changes

11 years agoUpdate Compress-Raw-Zlib to CPAN version 2.058
Chris 'BinGOs' Williams [Mon, 12 Nov 2012 23:44:13 +0000 (23:44 +0000)]
Update Compress-Raw-Zlib to CPAN version 2.058

  [DELTA]

  2.058 12 November 2012

      * No Changes

11 years agoAdd Tom Wyant’s e-mail to AUTHORS
Father Chrysostomos [Mon, 12 Nov 2012 20:45:43 +0000 (12:45 -0800)]
Add Tom Wyant’s e-mail to AUTHORS

11 years agoperlvar: two spaces after dots
Father Chrysostomos [Mon, 12 Nov 2012 20:42:55 +0000 (12:42 -0800)]
perlvar: two spaces after dots

11 years agoDocumentation of non-handle IO::Handle methods in perlvar.pod
Tom Wyant [Mon, 12 Nov 2012 20:41:38 +0000 (12:41 -0800)]
Documentation of non-handle IO::Handle methods in perlvar.pod

The documentation to IO::Handle says that certain methods may not be set
on file handles, only statically. It would be nice (in my perhaps
not-so-humble opinion) if the distinction between per-filehandle and
non-perl-filehandle methods were recognized in perlvar.pod. The appended
universal diff is my cut at this.

diff a/pod/perlvar.pod b/pod/perlvar.pod

11 years agopv->pvn for literals in pp_require and Perl_sv_derived_from_pvn
Daniel Dragan [Mon, 12 Nov 2012 16:08:44 +0000 (11:08 -0500)]
pv->pvn for literals in pp_require and Perl_sv_derived_from_pvn

I found these 2 strlens while stepping through the interp while running a
script and both came from a pp_require. UNIVERSAL::can was not modified
since it is more rarely called than pp_require. A better more through
investigation of version obj comparison and upgrading will need to be done
in the future (new funcs needed for the derived/upg_version idiom, remove
the upg_version since it was changed to always be a ver obj, etc).

11 years agofix typo in comment
Lukas Mai [Mon, 12 Nov 2012 17:21:28 +0000 (18:21 +0100)]
fix typo in comment

11 years agomore dTHX optimizations
Daniel Dragan [Mon, 12 Nov 2012 08:22:12 +0000 (03:22 -0500)]
more dTHX optimizations

Either delay fetching of the context, or move the declaration close to the
first usage point, or remove the dependency on a context.

11 years agoadd items checking to Internals::SvREFCNT
Daniel Dragan [Sat, 10 Nov 2012 17:49:38 +0000 (12:49 -0500)]
add items checking to Internals::SvREFCNT

Add item count checking to Internals::SvREFCNT in case prototype is
bypassed. Getting rid of the undef saves some instructions. Reading
SvREFCNT(sv) only once save an instruction.

11 years agoclean up the users of PL_no_mem
Daniel Dragan [Mon, 12 Nov 2012 14:19:10 +0000 (06:19 -0800)]
clean up the users of PL_no_mem

This commit eliminates a couple strlen()s of a literal. "Out of memory!\n"
and PL_no_mem did not string pool on Visual C, so PL_no_mem was given a
length. This commit removes S_write_no_mem and replaces it with nonstatic.
Perl_croak_no_mem was made nocontext to save instructions in it's callers.
NORETURN_FUNCTION_END caused a syntax error on Visual C C++ mode and
therefore was removed.

11 years agoMerge branch 'debugger-refactoring' into blead
Ricardo Signes [Mon, 12 Nov 2012 14:21:01 +0000 (09:21 -0500)]
Merge branch 'debugger-refactoring' into blead

11 years agoSmall cleanups.
Shlomi Fish [Wed, 7 Nov 2012 22:37:51 +0000 (00:37 +0200)]
Small cleanups.

11 years agoConvert to a lexical file handle.
Shlomi Fish [Sat, 3 Nov 2012 20:47:49 +0000 (22:47 +0200)]
Convert to a lexical file handle.

11 years ago[perl5db] unless+eq --> ne.
Shlomi Fish [Mon, 29 Oct 2012 09:08:54 +0000 (11:08 +0200)]
[perl5db] unless+eq --> ne.

11 years ago[perl5db] Refactored cmd_b_sub.
Shlomi Fish [Mon, 29 Oct 2012 08:56:53 +0000 (10:56 +0200)]
[perl5db] Refactored cmd_b_sub.

11 years agoperl5db: extract some subroutines.
Shlomi Fish [Thu, 25 Oct 2012 16:47:09 +0000 (18:47 +0200)]
perl5db: extract some subroutines.

11 years agoExtract a closure.
Shlomi Fish [Thu, 25 Oct 2012 16:29:25 +0000 (18:29 +0200)]
Extract a closure.

11 years agoConvert DB::system to _db_system.
Shlomi Fish [Wed, 17 Oct 2012 16:04:10 +0000 (18:04 +0200)]
Convert DB::system to _db_system.

11 years agoRemove some declared but unused lexicals.
Shlomi Fish [Wed, 17 Oct 2012 15:48:37 +0000 (17:48 +0200)]
Remove some declared but unused lexicals.

11 years agoConvert from DB::warn to _db_warn.
Shlomi Fish [Wed, 17 Oct 2012 15:37:51 +0000 (17:37 +0200)]
Convert from DB::warn to _db_warn.

This way we are not abusing a built-in. The old DB::warn was kept in for
backwards compatibility.

11 years agoGot rid of leading ampersands in sub calls.
Shlomi Fish [Wed, 17 Oct 2012 14:48:23 +0000 (16:48 +0200)]
Got rid of leading ampersands in sub calls.

11 years agoFinish the refactoring into cmd_verb and cmd_args.
Shlomi Fish [Tue, 16 Oct 2012 15:48:35 +0000 (17:48 +0200)]
Finish the refactoring into cmd_verb and cmd_args.

11 years agoConvert up to _DB__handle_y_command to cmd_args.
Shlomi Fish [Tue, 16 Oct 2012 09:05:10 +0000 (11:05 +0200)]
Convert up to _DB__handle_y_command to cmd_args.

11 years agoConvert more to the ->cmd_args() method.
Shlomi Fish [Tue, 16 Oct 2012 08:50:03 +0000 (10:50 +0200)]
Convert more to the ->cmd_args() method.

11 years agoExtract _is_full().
Shlomi Fish [Mon, 15 Oct 2012 18:48:12 +0000 (20:48 +0200)]
Extract _is_full().

11 years agoMore refactoring into cmd_args.
Shlomi Fish [Mon, 15 Oct 2012 17:53:27 +0000 (19:53 +0200)]
More refactoring into cmd_args.

11 years agoRefactor some more command-handlers.
Shlomi Fish [Mon, 15 Oct 2012 15:34:00 +0000 (17:34 +0200)]
Refactor some more command-handlers.

11 years agoStart converting to cmd_args.
Shlomi Fish [Mon, 15 Oct 2012 14:57:44 +0000 (16:57 +0200)]
Start converting to cmd_args.

This is the string of arguments that follows the verb of the command,
and can be used instead of matching the command again.

11 years agoRefactoring: more renaming and lexicalising.
Shlomi Fish [Mon, 15 Oct 2012 10:28:29 +0000 (12:28 +0200)]
Refactoring: more renaming and lexicalising.

Some variables need not be placed inside cmd_verb.

11 years agoRename "i" as cmd_verb.
Shlomi Fish [Mon, 15 Oct 2012 10:14:30 +0000 (12:14 +0200)]
Rename "i" as cmd_verb.

It is a more representative name.

11 years agoPass $obj to _DB__trim_command*.
Shlomi Fish [Mon, 15 Oct 2012 10:03:39 +0000 (12:03 +0200)]
Pass $obj to _DB__trim_command*.

We are about to enhance it with further enhancements.

11 years ago_handle_cmd_wrapper_commands to %cmd_lookup.
Shlomi Fish [Sun, 14 Oct 2012 14:32:47 +0000 (16:32 +0200)]
_handle_cmd_wrapper_commands to %cmd_lookup.

This is part of the ongoing perl5db.pl refactoring.

11 years agoRemove extraneous =cut-s from the POD.
Shlomi Fish [Sun, 14 Oct 2012 11:36:47 +0000 (13:36 +0200)]
Remove extraneous =cut-s from the POD.

11 years agoLow hanging fruit is now in %cmd_lookup.
Shlomi Fish [Sun, 14 Oct 2012 11:22:45 +0000 (13:22 +0200)]
Low hanging fruit is now in %cmd_lookup.

11 years agoMove more commands to the dispatch.
Shlomi Fish [Sun, 14 Oct 2012 11:09:05 +0000 (13:09 +0200)]
Move more commands to the dispatch.

11 years agoAdd more commands to the lookup table.
Shlomi Fish [Sun, 14 Oct 2012 10:56:53 +0000 (12:56 +0200)]
Add more commands to the lookup table.

11 years agoStart converting to %cmd_lookup.
Shlomi Fish [Sun, 14 Oct 2012 10:35:19 +0000 (12:35 +0200)]
Start converting to %cmd_lookup.

This is a dispatch table for the commands based on their command
component.

11 years agoPass $obj to _DB__handle_f_command.
Shlomi Fish [Sun, 14 Oct 2012 10:04:31 +0000 (12:04 +0200)]
Pass $obj to _DB__handle_f_command.

For consistency with the other commands.

11 years agoExtract _handle_cmd_wrapper_commands.
Shlomi Fish [Sat, 13 Oct 2012 18:25:28 +0000 (20:25 +0200)]
Extract _handle_cmd_wrapper_commands.

11 years agoExtract _handle_q_command .
Shlomi Fish [Sat, 13 Oct 2012 17:36:17 +0000 (19:36 +0200)]
Extract _handle_q_command .

11 years agoExtract the CMD: continue() into a subroutine.
Shlomi Fish [Thu, 11 Oct 2012 13:33:57 +0000 (15:33 +0200)]
Extract the CMD: continue() into a subroutine.

11 years agoExtract _DB__handle_m_command.
Shlomi Fish [Thu, 11 Oct 2012 12:22:47 +0000 (14:22 +0200)]
Extract _DB__handle_m_command.

11 years agoExtract _handle_x_command.
Shlomi Fish [Thu, 11 Oct 2012 09:14:18 +0000 (11:14 +0200)]
Extract _handle_x_command.

11 years agoConvert from ^ to \A.
Shlomi Fish [Thu, 11 Oct 2012 08:29:36 +0000 (10:29 +0200)]
Convert from ^ to \A.

This is part of the debugger refactoring.