perl/modules/Scope-Upper.git
3 years agoThis is 0.25 v0.25
Vincent Pit [Sun, 21 Sep 2014 17:10:00 +0000 (19:10 +0200)]
This is 0.25

3 years agoUpdate VPIT::TestHelpers to 4fb18792
Vincent Pit [Sun, 21 Sep 2014 15:35:28 +0000 (17:35 +0200)]
Update VPIT::TestHelpers to 4fb18792

3 years agoBump copyright year
Vincent Pit [Sun, 21 Sep 2014 15:33:38 +0000 (17:33 +0200)]
Bump copyright year

3 years agoWork around an assertion failure in perl 5.21.4
Vincent Pit [Sat, 20 Sep 2014 16:11:14 +0000 (18:11 +0200)]
Work around an assertion failure in perl 5.21.4

This was fixed in perl by commit 5988f306, in which Father Chrysostomos
says "CvNAMED should never be on after calling [CvGV_set], regardless
of the previous state of the CV".

3 years agoAdd support for PERL_OP_PARENT
Vincent Pit [Sat, 20 Sep 2014 15:59:52 +0000 (17:59 +0200)]
Add support for PERL_OP_PARENT

This was introduced in perl 5.21.2.

5 years agoThis is 0.24 v0.24
Vincent Pit [Tue, 10 Sep 2013 11:10:35 +0000 (13:10 +0200)]
This is 0.24

5 years agoPreserve lexicals across dounwind() calls on perl 5.19.4 and above
Vincent Pit [Mon, 9 Sep 2013 17:07:53 +0000 (19:07 +0200)]
Preserve lexicals across dounwind() calls on perl 5.19.4 and above

unwind() used to rely on the stack being preserved when dounwind() is
called. However, starting with change 25375124, dounwind() can now call
leave_scope() which will clean up lexicals in the unwinded scopes. We
can work around this by temporarily bumping the refcount of possibly
problematic scalars before calling dounwind().

See also https://rt.perl.org/rt3/Ticket/Display.html?id=119681.

5 years agoThis is 0.23 v0.23
Vincent Pit [Mon, 2 Sep 2013 11:31:20 +0000 (13:31 +0200)]
This is 0.23

5 years agoStyle nits
Vincent Pit [Mon, 2 Sep 2013 10:34:59 +0000 (12:34 +0200)]
Style nits

5 years agoAdjust t/07-context_info.t for perl 5.19.3 rt88177
Andrew Main [Mon, 2 Sep 2013 10:28:16 +0000 (12:28 +0200)]
Adjust t/07-context_info.t for perl 5.19.3

This fixes RT #88177.

5 years agoUpdate bundled Test::Leaner to 0.05
Vincent Pit [Sat, 24 Aug 2013 19:29:12 +0000 (16:29 -0300)]
Update bundled Test::Leaner to 0.05

5 years agoEnforce the perl dependency in the module file
Vincent Pit [Sat, 24 Aug 2013 18:45:41 +0000 (15:45 -0300)]
Enforce the perl dependency in the module file

5 years agoMake Perl version numbers more readable
Vincent Pit [Sat, 24 Aug 2013 18:13:24 +0000 (15:13 -0300)]
Make Perl version numbers more readable

5 years agoRemove obsolete kwalitee workarounds
Vincent Pit [Sat, 24 Aug 2013 16:32:27 +0000 (13:32 -0300)]
Remove obsolete kwalitee workarounds

5 years agoNo tabs please
Vincent Pit [Fri, 23 Aug 2013 19:00:18 +0000 (16:00 -0300)]
No tabs please

5 years agoStop bundling author tests
Vincent Pit [Tue, 20 Aug 2013 21:13:23 +0000 (18:13 -0300)]
Stop bundling author tests

5 years agoSilence experimental warnings on perl 5.17.11+ for given/when in tests rt88174
Vincent Pit [Wed, 14 Aug 2013 17:34:02 +0000 (14:34 -0300)]
Silence experimental warnings on perl 5.17.11+ for given/when in tests

Using if.pm would have been cleaner but it is core only on perl 5.6.2, and
we still support 5.6.1. Moreover, trusting the toolchain on such old perls
is not really an option.

5 years agoTypos in POD rt87178
Vincent Pit [Wed, 7 Aug 2013 17:23:53 +0000 (14:23 -0300)]
Typos in POD

Reported by dsteinbrunner@pobox.com.

This fixes RT #87178.

5 years agoUpdate the bug tracker URL in META after the rt.perl.org upgrade
Vincent Pit [Wed, 7 Aug 2013 14:37:23 +0000 (11:37 -0300)]
Update the bug tracker URL in META after the rt.perl.org upgrade

5 years agoGet rid of t/99-kwalitee.t
Vincent Pit [Tue, 6 Aug 2013 03:07:59 +0000 (00:07 -0300)]
Get rid of t/99-kwalitee.t

New versions started to throw warnings if specific environment variables
are not set. This may be appropriate for dist manager users, but not really
for the rest of the world.

Since kwalitee metrics are either obvious or useless, there's no big loss
in removing this test anyway.

5 years agoThis is 0.22 v0.22
Vincent Pit [Wed, 30 Jan 2013 23:30:43 +0000 (21:30 -0200)]
This is 0.22

5 years agoBump copyright year
Vincent Pit [Wed, 30 Jan 2013 23:18:32 +0000 (21:18 -0200)]
Bump copyright year

5 years agoUpdate VPIT::TestHelpers to e8344578
Vincent Pit [Wed, 30 Jan 2013 16:56:40 +0000 (14:56 -0200)]
Update VPIT::TestHelpers to e8344578

5 years agocontext_info() should ignore %warnings::Bits until perl 5.8.7
Vincent Pit [Fri, 4 Jan 2013 12:26:18 +0000 (13:26 +0100)]
context_info() should ignore %warnings::Bits until perl 5.8.7

Just like what caller() does.

5 years agoCorrect the top warnings mask for 5.6 in t/07-context_info.t
Vincent Pit [Fri, 4 Jan 2013 12:25:03 +0000 (13:25 +0100)]
Correct the top warnings mask for 5.6 in t/07-context_info.t

It changes depending on whether the test is called with -w or not, which
itself depends on the version of Test::Harness used. To add to the
confusion, perl 5.6.1 comes without Test::More, so installing it pulls a
recent version of Test::Harness that does no longer enforces -w.

5 years agoRequire perl 5.6.1
Vincent Pit [Fri, 4 Jan 2013 12:22:19 +0000 (13:22 +0100)]
Require perl 5.6.1

5 years agoAlso skip the uplevel across eval/local $@ test on perl 5.8.[345]
Vincent Pit [Wed, 2 Jan 2013 00:39:05 +0000 (01:39 +0100)]
Also skip the uplevel across eval/local $@ test on perl 5.8.[345]

A more recent set of debugging 5.8 perls shows that this test also causes
"Can't undef active subroutine during global destruction" errors with
perl 5.8.[345]. The test used to be skipped for perl 5.8.[0126], it is now
skipped for perl 5.8.[0-6], which makes definitely more sense anyway.

5 years agoSkip 'yield to subst context' tests on perl 5.8 and below
Vincent Pit [Wed, 2 Jan 2013 00:22:27 +0000 (01:22 +0100)]
Skip 'yield to subst context' tests on perl 5.8 and below

The snippet :

    my $s = "foo";
    eval { $s =~ s/./die "wut"/e };
    qr/bar/;

segfaults on a threaded, debugging and poisonous perl 5.8.9. Just to be
safe, the relevant test won't be run before perl 5.10.

5 years agoDon't run the POD spelling test in taint mode
Vincent Pit [Fri, 2 Nov 2012 00:27:25 +0000 (22:27 -0200)]
Don't run the POD spelling test in taint mode

This causes the test to crash on perl 5.12 and below with sensitive
architectures like FreeBSD. Ultimately the root of the issue seems to have
been https://rt.perl.org/rt3/Public/Bug/Display.html?id=60378.

Thanks Slaven Rezic for debugging this.

5 years agoAdd Config to build_requires
Vincent Pit [Fri, 2 Nov 2012 01:12:38 +0000 (23:12 -0200)]
Add Config to build_requires

5 years agoThis is 0.21 v0.21
Vincent Pit [Fri, 21 Sep 2012 15:09:54 +0000 (17:09 +0200)]
This is 0.21

5 years agoRemove an extra ;
Vincent Pit [Fri, 21 Sep 2012 14:08:15 +0000 (16:08 +0200)]
Remove an extra ;

5 years agoForce linking against the perl dll when using gcc 3.4 on Windows
Vincent Pit [Fri, 21 Sep 2012 14:07:13 +0000 (16:07 +0200)]
Force linking against the perl dll when using gcc 3.4 on Windows

When a Windows perl links an XS shared object to an import library using
gcc/g++ version 3.4.x, strange breakage happens at load time because the
mutex-related symbols seems not to be reachable. This situation happens
especially for AS perl and the default compiler suite it installs.

We fix this by forcing g++ to link against the dll instead, which should
be in the same directory as the perl executable (at least for AS perl).

5 years agoMake t/07-context_info.t pass with perls that have usesitecustomize set
Vincent Pit [Fri, 21 Sep 2012 14:02:02 +0000 (16:02 +0200)]
Make t/07-context_info.t pass with perls that have usesitecustomize set

sitecustomize.pl adds a "BEGIN { do { my $x; 1 } }" at the beginning of
the test code, which causes HINT_BLOCK_SCOPE to leak to the main program.

5 years agoFix context_info() warnings field for perl 5.17.4
Vincent Pit [Thu, 20 Sep 2012 19:38:41 +0000 (21:38 +0200)]
Fix context_info() warnings field for perl 5.17.4

5 years agoReformat the section of context_info() that extracts the warnings
Vincent Pit [Thu, 20 Sep 2012 19:18:44 +0000 (21:18 +0200)]
Reformat the section of context_info() that extracts the warnings

This will ease up future alterations to this code.

5 years agoMinor POD tweaks
Vincent Pit [Thu, 20 Sep 2012 19:02:32 +0000 (21:02 +0200)]
Minor POD tweaks

6 years agoThis is 0.20 v0.20
Vincent Pit [Mon, 17 Sep 2012 11:00:01 +0000 (13:00 +0200)]
This is 0.20

6 years agoImplement context_info()
Vincent Pit [Sun, 16 Sep 2012 22:19:33 +0000 (00:19 +0200)]
Implement context_info()

6 years agoSmall POD fixup
Vincent Pit [Sun, 16 Sep 2012 22:19:20 +0000 (00:19 +0200)]
Small POD fixup

6 years agoFix debugger compatibility with perl 5.17.1 and above
Vincent Pit [Sun, 16 Sep 2012 20:48:34 +0000 (22:48 +0200)]
Fix debugger compatibility with perl 5.17.1 and above

6 years agoTest 'return from do' in special cases
Vincent Pit [Fri, 14 Sep 2012 12:25:43 +0000 (14:25 +0200)]
Test 'return from do' in special cases

6 years agoFix spelling in a couple of new error messages
Vincent Pit [Fri, 14 Sep 2012 00:12:53 +0000 (02:12 +0200)]
Fix spelling in a couple of new error messages

6 years agoImplement leave()
Vincent Pit [Fri, 14 Sep 2012 00:04:31 +0000 (02:04 +0200)]
Implement leave()

6 years agoMove PL_stack_sp/items adjustments from su_unwind/su_yield to XSubs
Vincent Pit [Thu, 13 Sep 2012 23:44:06 +0000 (01:44 +0200)]
Move PL_stack_sp/items adjustments from su_unwind/su_yield to XSubs

6 years agoExplicitely require a C compiler
Vincent Pit [Thu, 13 Sep 2012 23:07:49 +0000 (01:07 +0200)]
Explicitely require a C compiler

6 years agoImplement yield()
Vincent Pit [Sun, 9 Sep 2012 22:06:07 +0000 (00:06 +0200)]
Implement yield()

6 years agoFix the documentation of the context argument of unwind() and uplevel()
Vincent Pit [Thu, 13 Sep 2012 17:33:07 +0000 (19:33 +0200)]
Fix the documentation of the context argument of unwind() and uplevel()

6 years agoNormalize words
Vincent Pit [Tue, 11 Sep 2012 23:27:42 +0000 (01:27 +0200)]
Normalize words

6 years agoBanish (most) eval STRING from t/84-stress-unwind.t
Vincent Pit [Tue, 11 Sep 2012 19:07:26 +0000 (21:07 +0200)]
Banish (most) eval STRING from t/84-stress-unwind.t

The span of tested configurations has changed slightly, but this test is
now about 70% faster.

6 years agoSilence a couple of warnings reported by gcc
Vincent Pit [Tue, 11 Sep 2012 12:27:00 +0000 (14:27 +0200)]
Silence a couple of warnings reported by gcc

6 years agoRevamp the logic used for skipping debugger frames
Vincent Pit [Mon, 10 Sep 2012 12:42:27 +0000 (14:42 +0200)]
Revamp the logic used for skipping debugger frames

6 years agoFix and test UP and SCOPE crossing loop/subst/given/when/default blocks
Vincent Pit [Mon, 10 Sep 2012 11:03:20 +0000 (13:03 +0200)]
Fix and test UP and SCOPE crossing loop/subst/given/when/default blocks

6 years agoMake t/63-uplevel-ctl.t pass with the debugger enabled
Vincent Pit [Mon, 10 Sep 2012 09:12:55 +0000 (11:12 +0200)]
Make t/63-uplevel-ctl.t pass with the debugger enabled

6 years agoMake some room in test ordering
Vincent Pit [Sun, 9 Sep 2012 13:34:56 +0000 (15:34 +0200)]
Make some room in test ordering

6 years agoMove the fallback OP_GIMME_REVERSE() up to the compat section
Vincent Pit [Sun, 9 Sep 2012 12:41:14 +0000 (14:41 +0200)]
Move the fallback OP_GIMME_REVERSE() up to the compat section

6 years agoFactor our verbose is() in Scope::Upper::TestGenerator
Vincent Pit [Sun, 9 Sep 2012 10:14:22 +0000 (12:14 +0200)]
Factor our verbose is() in Scope::Upper::TestGenerator

6 years agoDo less function calls in Scope::Upper::TestGenerator::gen()
Vincent Pit [Sun, 9 Sep 2012 09:31:57 +0000 (11:31 +0200)]
Do less function calls in Scope::Upper::TestGenerator::gen()

6 years agoRework how Scope::Upper::TestGenerator generates its 'local' tests
Vincent Pit [Sun, 9 Sep 2012 09:16:30 +0000 (11:16 +0200)]
Rework how Scope::Upper::TestGenerator generates its 'local' tests

6 years agoUpdate VPIT::TestHandlers
Vincent Pit [Sun, 9 Sep 2012 09:15:43 +0000 (11:15 +0200)]
Update VPIT::TestHandlers

6 years agoDo less eval STRING in t/85-stress-unwind.t
Vincent Pit [Sun, 9 Sep 2012 08:44:52 +0000 (10:44 +0200)]
Do less eval STRING in t/85-stress-unwind.t

This yields a 40% speedup.

6 years agoMake t/85-stress-unwind.t predictable
Vincent Pit [Sat, 8 Sep 2012 23:05:20 +0000 (01:05 +0200)]
Make t/85-stress-unwind.t predictable

6 years agoRevamp t/85-stress-unwind.t
Vincent Pit [Sat, 8 Sep 2012 17:48:52 +0000 (19:48 +0200)]
Revamp t/85-stress-unwind.t

Stop using eval() to compute the expected value. This highlighted an issue
with how list() was defined.

This test now runs about 25% faster.

6 years agoMake SU_CXNAME take the context as argument
Vincent Pit [Sat, 8 Sep 2012 17:46:21 +0000 (19:46 +0200)]
Make SU_CXNAME take the context as argument

6 years agoCheck that unwind(-1) dies and that unwind() doesn't
Vincent Pit [Fri, 7 Sep 2012 22:54:14 +0000 (00:54 +0200)]
Check that unwind(-1) dies and that unwind() doesn't

6 years agoFix building with the newest version of 5.17.4
Father Chrysostomos [Fri, 7 Sep 2012 12:28:05 +0000 (14:28 +0200)]
Fix building with the newest version of 5.17.4

6 years agoReally make POD headers linkable
Vincent Pit [Fri, 7 Sep 2012 11:06:34 +0000 (13:06 +0200)]
Really make POD headers linkable

6 years agoThis is 0.19 v0.19
Vincent Pit [Sat, 1 Sep 2012 13:25:22 +0000 (15:25 +0200)]
This is 0.19

6 years agoBump copyright year
Vincent Pit [Sat, 1 Sep 2012 13:01:35 +0000 (15:01 +0200)]
Bump copyright year

6 years agoAdd BUILD_REQUIRES to WriteMakefile()
Vincent Pit [Wed, 22 Aug 2012 10:10:24 +0000 (12:10 +0200)]
Add BUILD_REQUIRES to WriteMakefile()

6 years agoPort module loading in tests to VPIT::TestHelpers
Vincent Pit [Wed, 22 Aug 2012 09:45:18 +0000 (11:45 +0200)]
Port module loading in tests to VPIT::TestHelpers

6 years agoKill Debian_CPANTS.txt suffixes as well
Vincent Pit [Wed, 22 Aug 2012 09:35:49 +0000 (11:35 +0200)]
Kill Debian_CPANTS.txt suffixes as well

6 years agoUpdate author tests, and add a POD spelling test
Vincent Pit [Wed, 22 Aug 2012 09:34:25 +0000 (11:34 +0200)]
Update author tests, and add a POD spelling test

Also make sure that the kwalitee test unlinks its byproducts.

6 years agoFix build with the new PADLIST API from 5.17.4 rt79182
Vincent Pit [Wed, 22 Aug 2012 09:24:55 +0000 (11:24 +0200)]
Fix build with the new PADLIST API from 5.17.4

6 years agoEnable the "save last context" workaround more selectively
Vincent Pit [Wed, 22 Aug 2012 09:18:22 +0000 (11:18 +0200)]
Enable the "save last context" workaround more selectively

6 years agoVersion requirements overhaul
Vincent Pit [Wed, 18 Jul 2012 21:03:35 +0000 (23:03 +0200)]
Version requirements overhaul

6 years agoTest uplevel's behaviour regarding to match variables more thoroughly
Vincent Pit [Wed, 18 Jul 2012 20:59:16 +0000 (22:59 +0200)]
Test uplevel's behaviour regarding to match variables more thoroughly

6 years agoRequire Module::ExtractUse 0.24 for the Kwalitee test
Vincent Pit [Sun, 19 Feb 2012 13:09:03 +0000 (14:09 +0100)]
Require Module::ExtractUse 0.24 for the Kwalitee test

6 years agoMake sure the POD headings are linkable
Vincent Pit [Fri, 11 Nov 2011 18:59:22 +0000 (19:59 +0100)]
Make sure the POD headings are linkable

6 years agoRename sud->new_uid_storage to sud->tmp_uid_storage
Vincent Pit [Fri, 11 Nov 2011 17:30:17 +0000 (18:30 +0100)]
Rename sud->new_uid_storage to sud->tmp_uid_storage

6 years agoPack uplevel()'s internal data structure more tightly
Vincent Pit [Fri, 11 Nov 2011 17:16:35 +0000 (18:16 +0100)]
Pack uplevel()'s internal data structure more tightly

It is now about 7% smaller on x86_64.

6 years agot/59-unwind-threads.t should always run at least one test
Vincent Pit [Sat, 22 Oct 2011 17:37:07 +0000 (19:37 +0200)]
t/59-unwind-threads.t should always run at least one test

No test means failure.

6 years agoThreads tests may not be able to spawn all the threads
Vincent Pit [Sat, 22 Oct 2011 16:55:36 +0000 (18:55 +0200)]
Threads tests may not be able to spawn all the threads

To work around this :
- move all the threads boilerplate to a new helper test module ;
- capture the warnings/errors that threads->create may throw and reprint
them properly as diagnostics ;
- use Test::Leaner instead of Test::More, as older Test::More sometimes
cause out of sequence bugs ;
- last but not least, do not hardcode the plan and use done_testing with
the actual number of spawned threads instead.

6 years agoThis is 0.18 v0.18
Vincent Pit [Mon, 10 Oct 2011 20:50:59 +0000 (22:50 +0200)]
This is 0.18

6 years agoSkip a destructor test on perl 5.6 in t/74-uid-validate.t
Vincent Pit [Mon, 10 Oct 2011 20:04:36 +0000 (22:04 +0200)]
Skip a destructor test on perl 5.6 in t/74-uid-validate.t

An object destructor is always fired last before 5.8. For example,

    our $y = 1;
    sub X::DESTROY { print $y }
    {
     local $y = 2;
     my $x = bless [], "X"
    }

will print 1 on 5.6 and 2 on 5.8.

6 years agoMake sure the code snippets fit in 80-columns wide terminal
Vincent Pit [Mon, 10 Oct 2011 17:55:39 +0000 (19:55 +0200)]
Make sure the code snippets fit in 80-columns wide terminal

6 years agoTrailing whitespace in tests
Vincent Pit [Mon, 10 Oct 2011 17:48:52 +0000 (19:48 +0200)]
Trailing whitespace in tests

6 years agoImplement uid() and validate_uid()
Vincent Pit [Fri, 9 Sep 2011 23:53:46 +0000 (01:53 +0200)]
Implement uid() and validate_uid()

6 years agoDon't rely on accessing the values of Perl_runops_{standard,debug}
Vincent Pit [Sat, 8 Oct 2011 20:55:31 +0000 (22:55 +0200)]
Don't rely on accessing the values of Perl_runops_{standard,debug}

This doesn't work on Windows, so we have to use PL_runops_{std,dbg} instead.
But those two variables are not available before perl 5.8, so we have to
forbid the whole goto handling altogether on those perls for consistency.

6 years agoFix Changes buggery
Vincent Pit [Mon, 3 Oct 2011 21:57:35 +0000 (23:57 +0200)]
Fix Changes buggery

6 years agoThis is 0.17 v0.17
Vincent Pit [Mon, 3 Oct 2011 21:46:51 +0000 (23:46 +0200)]
This is 0.17

6 years agoTalk about the goto() overhead in the documentation
Vincent Pit [Mon, 3 Oct 2011 21:25:20 +0000 (23:25 +0200)]
Talk about the goto() overhead in the documentation

6 years agoFix goto &xsub in uplevel
Vincent Pit [Sun, 2 Oct 2011 21:00:53 +0000 (23:00 +0200)]
Fix goto &xsub in uplevel

The old debugging hack has been removed, because it could not cope at all
with the XSUB case. It is replaced by an runloop hijack.

Note that a side effect of this change is that su_uplevel_ud tokens are no
longer freed by su_uplevel_restore on pre-5.13.7 perls. This is needed in
order to ensure that the topmost token is available at all time for our
runloop replacement.

6 years agoFix uplevel() recalling into an XSUB
Vincent Pit [Fri, 23 Sep 2011 09:21:31 +0000 (11:21 +0200)]
Fix uplevel() recalling into an XSUB

7 years agoTest that goto-to-uplevel does not mess up returned values
Vincent Pit [Mon, 19 Sep 2011 21:31:22 +0000 (23:31 +0200)]
Test that goto-to-uplevel does not mess up returned values

7 years agoRemove trailing whitespace
Vincent Pit [Mon, 19 Sep 2011 21:16:37 +0000 (23:16 +0200)]
Remove trailing whitespace

7 years agoPrevent simple uplevel argument tests from reifying @_
Vincent Pit [Mon, 19 Sep 2011 21:16:17 +0000 (23:16 +0200)]
Prevent simple uplevel argument tests from reifying @_

7 years agoFix calling goto to replace an uplevel'd subroutine frame
Vincent Pit [Fri, 16 Sep 2011 19:16:54 +0000 (21:16 +0200)]
Fix calling goto to replace an uplevel'd subroutine frame

7 years agoCreate the renamed CV as a shallow copy of the original one
Vincent Pit [Mon, 19 Sep 2011 10:35:15 +0000 (12:35 +0200)]
Create the renamed CV as a shallow copy of the original one

From now they share the exact same pad, without any refcount bump. This
means that we have to handle the renamed CV destruction ourselves by
clearing its padlist entry before freeing it, but we need to reset its
depth anyway before that (or that would cause "still in use" warnings).

This allows us to call pp_entersub directly with the renamed CV as we were
doing earlier, and to remove the exotic destruction dance from
su_uplevel_restore().

7 years agoFix a test in t/60-uplevel-target.t that does not test anything
Vincent Pit [Tue, 13 Sep 2011 21:32:59 +0000 (23:32 +0200)]
Fix a test in t/60-uplevel-target.t that does not test anything