1 Revision history for Scope-Upper
3 0.29 2016-06-06 12:00 UTC
4 + Chg : A large chunk of boilerplate XS code, which is also used in
5 other XS modules, has been factored out of the main .xs file
6 to a collection of .h files in the xsh subdirectory.
7 + Fix : [RT #112246] : Blead breaks Scope::Upper
8 Dave Mitchell provided a new implementation of reap(),
9 localize_*() and uplevel() to match the new context stack
10 handling in perl 5.24. Many thanks to him.
12 0.28 2015-08-18 15:00 UTC
13 + Chg : SUB() and EVAL() will now warn if they cannot find an
14 appropriate context in the current stack. They will still
15 return undef in this case, which is interpreted as the current
16 context when combined with other words.
17 + Fix : [RT #104751] : Scope::Upper does not handle exotic stack types
18 Trying to target a scope above the current perl scope will now
19 result in a warning. In that case, the topmost context in the
20 current stack will still be returned.
21 Thanks Rafaël Garcia-Suarez for the report.
22 + Fix : Test failures of threads tests on systems with harsh resource
23 constraints causing the threads to exit() during run.
24 + Opt : Some internal structures were shrunk, resulting in memory
25 savings and small speedups.
27 0.27 2015-03-27 22:10 UTC
28 + Chg : The new environment variable to enable thread tests on older
29 perls is PERL_FORCE_TEST_THREADS. Note that this variable
30 should only be turned on by authors.
31 + Fix : Segfaults when the module is loaded by several threads (or
32 Windows emulated processes) ran in parallel.
33 + Fix : Memory leak with the uid() feature.
34 + Fix : Update the Windows ActivePerl + gcc 3.4 workaround for
35 ExtUtils::MakeMaker 7.04. Thanks Christian Walde for reporting
36 and feedback on this issue.
37 + Fix : reap(), localize(), localize_elem() and localize_delete()
38 will again work correctly on perl 5.19.4+ when the debugger
40 + Fix : Silence some compiler warnings.
42 0.26 2015-03-12 23:30 UTC
43 + Fix : [RT #100264] : Don't use CvPADLIST on XSUBs
44 Thanks Father Chrysostomos for reporting and contributing a
46 + Fix : Be really compatible with the optional OP_PARENT feature.
48 0.25 2014-09-21 17:10 UTC
49 + Add : Support for the PERL_OP_PARENT optional feature introduced in
51 + Fix : Work around an assertion failure in perl 5.21.4.
53 0.24 2013-09-10 11:10 UTC
54 + Fix : Lexicals returned with unwind(), yield() and leave() will no
55 longer be lost on perl 5.19.4 and above.
57 0.23 2013-09-02 11:30 UTC
58 This is a maintenance release. The code contains no functional change.
59 Satisfied users of version 0.22 can skip this update.
60 + Fix : [RT #87178] : typo fixes.
61 Thanks dsteinbrunner@pobox.com for the patch.
62 + Fix : [RT #88177] : 5.19.3 block hint test breakage
63 t/07-context_info.t has been taught about perl 5.19.3.
64 Thanks Andrew Main for the patch.
65 + Tst : Author tests are no longer bundled with this distribution.
66 They are only made available to authors in the git repository.
67 + Tst : "given is experimental" warnings when running tests on perl
68 5.18 and above have been silenced.
70 0.22 2013-01-30 23:35 UTC
71 + Chg : perl 5.6.1 is required.
72 + Fix : context_info() now ignores %warnings::Bits for perl 5.8.6 and
73 below, just like caller().
74 + Fix : [RT #82220] : Scope-Upper-0.21 test stuck on Windows perl 5.12.3
75 t/93-pod-spelling.t will not crash anymore on perl 5.12 and
77 Thanks Gabor Szabo for reporting and Slaven Rezic for debugging
79 + Tst : Rare test failures of t/07-context_info.t on perl 5.6,
80 t/55-yield-target.t on perl 5.[68], and t/63-uplevel-ctl.t on
81 perl 5.8.[345] have been addressed.
83 0.21 2012-09-21 15:10 UTC
84 + Fix : context_info() has been taught about perl 5.17.4.
85 + Fix : t/07-context_info.t will no longer fail with perls that have
86 sitecustomize enabled (like many perl builds for Windows).
87 Thanks Steve Hay and Nicholas Clark for debugging help.
88 + Fix : Broken linkage on Windows with gcc 3.4, which appears in
89 particular when using ActivePerl's default compiler suite.
90 For those setups, the Scope::Upper shared library will now be
91 linked against the perl dll directly (instead of the import
94 0.20 2012-09-17 11:00 UTC
95 + Add : The new yield(@values, $context) function can be used to return
96 values to any upper scope, including do or map blocks.
97 The new leave(@values) function is an alias for
99 + Add : The new context_info($context) function return information
100 about context $context, similarly to what caller() provides
101 but for any upper scope.
102 + Chg : Contexts are now normalized. In previous versions, it was
103 possible for different contexts to refer to the same scope :
104 for example, "for (my $i = 0; $i < 10; ++$i) { ... }" was
105 reachable through two contexts, while "for (@array) { ... }"
106 only by one. Starting from this version, contexts are
107 normalized so that they always represent an actual scope.
108 + Doc : C++ compilers are officially NOT supported.
109 + Fix : Building with a more recent version of perl 5.17.4.
110 + Fix : Debugger compatibility with perl 5.17.1 and above.
112 0.19 2012-09-01 13:25 UTC
113 + Doc : POD headings have been made linkable.
114 + Fix : Building with perl 5.17.4.
115 + Fix : BUILD_PREREQS are now set for ExtUtils::MakeMaker.
116 + Opt : uplevel() private data structure is 7% smaller on 64 bits
118 + Tst : Author tests overhaul.
120 0.18 2011-10-10 20:50 UTC
121 + Add : The uid() function returns an unique identifier for each dynamic
122 scope. The validate_uid() function can be used to check whether
123 one such identifier is valid (i.e. that the scope it refers to
125 + Chg : It is no longer possible on perl 5.6 to call goto() in an
126 uplevel callback to replace the uplevel call. This change was
127 needed in order to ensure consistency between platforms
128 regarding to the following fix just below.
129 + Fix : The uplevel() tests now pass on Windows.
130 Thanks C.H. Kang for bringing this to my attention.
132 0.17 2011-10-03 21:45 UTC
133 + Fix : uplevel() will now use the correct pad when executing its
134 callback. This fixes at least two issues :
135 - closures defined inside the uplevel callback can now correctly
136 access lexicals from inside and outside the callback.
137 - state variables in the uplevel callback now work properly.
138 + Fix : It is now generally possible to call goto() in the uplevel'd
139 code to replace the uplevel stack frame. There are two cases
140 for which it is still not possible :
141 - if -D flags were set when running perl (as in "perl -Dt ...").
142 - if the perl runloop has been replaced with a custom one by
144 If uplevel() detects that the replacement code contains a goto
145 statement, and is in one of those two cases, then it will refuse
146 to execute the callback and throw an exception.
147 Note that this fix implies a run-time overhead of uplevel()
148 proportional to the size of the the callback in every case
149 (with a small ratio), and proportional to the size of ALL the
150 code executed as the result of the uplevel call (including
151 subroutine calls inside the callback) when a goto statement is
152 found in the uplevel callback.
153 + Fix : uplevel() has been taught how to handle XS callbacks properly.
154 + Fix : The cause of "Attempt to free unreferenced scalar" warnings
155 when using uplevel() has been addressed.
156 + Fix : [RT #71212] : build failure on Windows.
157 The module does no longer rely on calling Perl_cv_clone, which
159 Thanks C.H. Kang for reporting.
161 0.16 2011-09-03 23:00 UTC
162 + Add : uplevel($code, @args, $cxt) executes $code with arguments @args
163 in the upper context pointed by $cxt.
164 This is an XS version of the well-known uplevel() routine from
165 Sub::Uplevel. There are a few differences between both
166 implmentations that are listed in the documentation.
167 The XS version is roughly 10 times faster than the pure-Perl
170 0.15 2011-08-24 14:20 UTC
171 + Fix : Localizing subroutines in an higher scope will now correctly
172 update the method cache.
174 0.14 2011-02-27 00:00 UTC
175 + Fix : [RT #64997] : Compatibility with perl 5.13.10.
176 Thanks Dave Mitchell for the notice.
177 + Tst : Lengthy tests have been ported to Test::Leaner, making the
178 whole test suite about 50% faster.
180 0.13 2010-12-20 01:00 UTC
181 + Fix : [RT #61904] : Stack corruption when using unwind() under
183 Thanks Sergey Aleynikov for contributing a fix.
184 + Fix : [RT #63378] : Compatibility with perl 5.13.8.
185 Thanks Andreas J. König for bisecting the issue.
186 + Tst : Threads tests are now only run on perl 5.13.4 and higher.
187 They could segfault randomly because of what seems to be an
188 internal bug of Perl, which has been addressed in 5.13.4.
189 There is also an environment variable that allows you to
190 forcefully run those tests, but it should be set only for
191 author testing and not for end users.
193 0.12 2010-05-19 00:45 UTC
194 + Fix : Compatibility with perl 5.13.
195 + Fix : Test failures with perl 5.8.0.
196 + Fix : A minor leak of SVs when a non array/hash was passed to
199 0.11 2010-04-16 23:20 UTC
200 + Chg : It's now forbiddent to pass a reference to a non-glob variable
201 as the localization target of localize(), localize_elem() and
203 + Chg : localize_elem() now only accepts localization of arrays or hashs
204 elements. For other types, it used to be a synonym of localize.
205 + Chg : localize_elem() no longer accepts a glob as the target. You now
206 have to specify the variable as a string. This is because it was
207 impossible in this case to handle meaningfully the array or the
208 hash reference passed as the assigned value.
209 + Doc : The synopsys was revamped, and the rest of the documentation was
211 + Fix : [RT #55593] : Segfault when localizing hash or array element to
212 different package in different file.
213 Thanks Dagfinn Ilmari Mannsåker for reporting.
214 + Fix : [RT #56301] : reap loses eval context when dying naturally.
215 Thanks Andrew Main for reporting.
216 + Fix : Scope inconsistencies and segfaults when saving several
217 localizations into the same target scope.
218 + Fix : Stop skipping frames as a pop optimization. This caused breakage
219 under the debugger (and most likely outside as well).
221 0.10 2010-01-18 23:50 UTC
222 + Fix : Properly handle given/when on 5.10.
223 + Fix : Some stack inconsistencies were fixed, though they were unlikely
224 to have an impact on your real-life code.
225 + Fix : Work around Kwalitee test misfailures.
227 0.09 2009-05-17 20:20 UTC
228 + Add : The new SU_THREADSAFE constant can be used to know whether the
229 module could have been built with thread safety enabled.
230 + Chg : Thread safety is disabled for perl 5.8 on Win32.
231 + Chg : A saner workaround for the "call_sv() during LEAVE clobbers the
232 still used last popped stack element" issue on 5.10.
234 0.08 2009-04-16 22:50 UTC
235 + Fix : [RT #44204] : Stack corruption with reap(). Thanks Torsten
236 Foertsch for reporting.
237 + Fix : Building with Solaris CC.
238 + Tst : unwind() in threads.
240 0.07 2009-02-20 00:20 UTC
241 + Chg : The CLONE method will no longer be defined for non-threaded
243 + Doc : Some examples on how to build the target context from the words.
244 + Fix : Some unlikely possible uninitialized reads, indirectly pointed
245 out in a Redhat review request.
246 + Fix : "localize *x, 'y' => $cxt" now matches Perl's behaviour for
248 + Fix : Miscellanous code cleanups, courtesy of Florian Ragwitz.
249 + Upd : Resources in META.yml.
251 0.06 2009-01-17 00:05 UTC
252 + Chg : INCOMPATIBLE CHANGE: The level is now absolute and no longer
253 relative to the current frame - we'll call it "context" from now
254 on. You should replace all your raw levels by combinations of
256 The old behaviour of "=> $n" can be easily reobtained by using
258 + Fix : As a result of this change, the module now plays nicely with
261 0.05 2009-01-12 18:15 UTC
262 + Fix : Stack mess when using unwind() in scalar context.
263 + Fix : Returning an automatic variable isn't wise, so let's use a
265 + Doc : Clarifications.
266 + Tst : Stress tests for unwind().
268 0.04 2009-01-11 18:40 UTC
269 + Add : unwind(@things, $level), that returns to an upper context.
270 + Add : want_at($level), that gives the wantarray for $level.
271 + Add : Control words, to reliably get the level of the n-th upper
272 subroutine or eval scope. TOPLEVEL was renamed to TOP.
273 + Fix : Tests with 5.6.
274 + Tst : Reordering and factoring some of the stress tests so that they
275 aren't needlessly ran several times.
277 0.03 2009-01-04 15:55 UTC
278 + Add : localize_delete(), that localize array/hash elements in upper
280 + Fix : Segfault when localizing array elements with an invalid negative
283 0.02 2008-12-28 18:40 UTC
284 + Doc : Clarifications and improvements.
285 + Fix : Missing compatibility macros.
286 + Fix : Localized nonexistant array elements should be deleted when
287 their time comes so that the array recovers its original length.
289 0.01 2008-12-26 16:05 UTC
290 First version, released on an unsuspecting world.