1Revision history for Variable-Magic 2 30.43 2010-06-25 23:35 UTC 4 + Add : The new constant VMG_COMPAT_GLOB_GET tells you whether get magic 5 is called for globs. It's true starting perl 5.13.2. 6 + Chg : All callbacks are now called within an eval-like context. 7 Only free callbacks used to be called that way. 8 + Fix : Some exceptions thrown from a free callback could be lost. 9 + Fix : Croak messages could sometimes be repeated several times. 10 + Fix : t/41-clone.t segfaulting with perl 5.13.2. 11 120.42 2010-05-19 00:15 UTC 13 This is a maintenance release. The code contains no functional change. 14 Users of 0.41 can skip this update. 15 + Fix : Test failures with perl 5.13. 16 + Tst : Improve coverage. 17 180.41 2010-03-15 17:35 UTC 19 + Doc : Tweaks and fixups. 20 Thanks Shlomi Fish. 21 + Fix : Compatibility with the soon-to-be-released perl 5.12.0. 22 + Fix : Correctly propagate the errors thrown when variable destruction 23 happens at compile-time and not from inside eval STRING. 24 Thanks Florian Ragwitz and Ash Berlin for reporting. 25 260.40 2010-01-06 23:20 UTC 27 + Fix : Possible memory miswrites when passing data arguments to cast(). 28 + Fix : Minor C portability tweaks. 29 300.39 2009-12-01 00:05 UTC 31 + Add : You can use a function name as a callback by passing a string 32 reference to wizard() instead of a code reference. 33 + Fix : Compatiblity with perl 5.11.1 and 5.11.2. 34 + Fix : Scalars stored into the data slot no longer leak. 35 + Fix : Thread destruction should not segfault anymore. 36 + Opt : As a result of removing the deprecated features, less memory is 37 used for both threaded (a pointer table is used instead of a 38 hash) and non-threaded (no global structure is needed anymore) 39 perls. 40 + Rem : As advertised in the precendent version, all the signature 41 related features were removed. This includes the 'sig' option 42 to wizard(), the getsig() and gensig() functions, and the SIG_* 43 constants. 44 450.38 2009-10-04 16:10 UTC 46 + Dep : All the signature-related features are DEPRECATED and will be 47 removed in december 2009. This includes the 'sig' option to 48 wizard(), the getsig() and gensig() functions, and the SIG_* 49 constants. 50 Afaik those features were never used in real life, and they make 51 the XS code slow and brittle. If you want your wizards to be 52 globally available, you'll have to handle that yourself by 53 storing them in a hash. 54 + Doc : More examples in a new COOKBOOK section. 55 + Fix : Compatiblity with the 5.11.0 release. The new compatibility 56 constant VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID was added to cover 57 this. 58 + Fix : Work around Kwalitee test misfailures. 59 600.37 2009-08-25 15:25 UTC 61 + Add : The new constant VMG_FORKSAFE can be tested to know whether the 62 module will behave nicely when fork()ing. It's currently always 63 true except on Windows where you need perl 5.10.1 for it to be 64 true. 65 + Doc : Nits and clarifications. 66 670.36 2009-07-05 16:30 UTC 68 + Chg : getdata() now returns an empty list when no magic is present. 69 It used to return undef but did not croak as stated in the doc. 70 Thanks Matt S. Trout for pointing this out. 71 + Fix : Building and tests with ActiveState Perl 5.8 build >= 822. 72 730.35 2009-05-15 20:50 UTC 74 This is a maintenance release. Users of 0.34 can skip this update. 75 + Chg : uvar magic used to be enabled for 5.9.5. It now requires 5.10 or 76 later. 77 + Fix : Silence compilation warnings for cxinc(). 78 + Rem : The workaround introduced in 0.31 for the "Unknown errors" issue 79 was removed, as regression tests show that 0.34 provides a 80 better fix. 81 + Tst : Skip t/40-threads.t on 5.8.x with old versions of threads and 82 threads::shared. 83 840.34 2009-04-19 16:55 UTC 85 + Fix : Destruction of wizards in require. 86 + Fix : "panic: restartop" in 5.10 when dieing at compile time triggers 87 a destructor. 88 890.33 2009-03-26 00:00 UTC 90 + Chg : cast() and getsig() now croak too when an invalid signature is 91 passed. 92 + Fix : It was possible to generate with gensig() the same signature 93 twice before actually defining the wizards. 94 + Tst : More stash tests. 95 + Tst : Test when the magic takes place in some cases. 96 + Tst : Improved coverage for the op object feature. 97 980.32 2009-03-01 13:45 UTC 99 + Chg : dispell() and getdata() now croak when an invalid signature is 100 passed. 101 + Doc : More examples and a brand new synopsis. 102 + Fix : The signature is no longer stored in the mg_private member of 103 the MAGIC struct. This fixes possible clashes with magics from 104 other extensions. 105 + Fix : op info objects weren't blessed into the right class. 106 + Fix : Races when initializing the op names cache under threads. 107 1080.31 2009-02-19 23:50 UTC 109 + Doc : A somewhat better introduction. The FUNCTION section was moved 110 before CONSTANTS and HISTORY since it's more important. And 111 'assignation' is really 'assignment', says Ricardo. :) 112 + Fix : The op_info features are now thread safe. 113 + Fix : Segfaults that occured when trying to get the op name during 114 global destruction. 115 + Fix : Segfaults and wrong "Unknown error" exceptions that happened 116 when dieing in require caused a free callback to fire. 117 Thanks Florian Ragwitz for reporting. 118 1190.30 2009-02-12 17:05 UTC 120 + Add : You can now get in all the callbacks either the name or a B::OP 121 object representing the current op if you pass the new 'op_info' 122 option to wizard() with respective values VMG_OP_INFO_NAME and 123 VMG_OP_INFO_OBJECT. 124 + Doc : Document magic on array/hashes values. 125 + Fix : Completely skip free callbacks during global destruction. 126 + Tst : Tests now pass again on 5.8.3 and lower (they were broken since 127 0.27). 128 + Tst : Test magic on symbol table and on array/hash values. 129 1300.29 2009-02-08 11:10 UTC 131 + Add : Set $_[2] to the default length for len magic on scalars. 132 + Chg : Perl 5.8 is required. 133 + Chg : The CLONE method will no longer be defined for non-threaded 134 perls. 135 + Doc : Nits. 136 + Fix : The logic for turning off the GMAGICAL flag on hashes when no 137 uvar magic is involved could do nasty things on tied hashes. 138 + Upd : More resources in META.yml. 139 1400.28 2009-01-24 17:05 UTC 141 + Add : The 'copy_key' option to wizard(), that enables the safe edition 142 of $_[2] in uvar callbacks to redirect actions to another key. 143 + Fix : Exception objects thrown from callbacks at compile time were not 144 available in $@. 145 + Fix : free callbacks triggered during global destruction could lead to 146 segfaults because the wizard was already freed. 147 + Fix : Refcount of scalars with free callback. 148 + Fix : Segfaults when using get or uvar magic simultaneously with clear 149 magic. 150 + Doc : The documentation about what the callbacks take and should 151 return is now somewhat clearer. 152 1530.27 2009-01-18 23:40 UTC 154 + Fix : Offset of 1 with len magic on scalars. 155 + Fix : Segfaults that seem to happen when one croak in a callback at 156 compile time (thanks Ash Berlin for the testcase). 157 + Upd : Resources in META.yml (Florian Ragwitz) 158 + Tst : Large cleanup resulting in a wider set of tested behaviours. 159 1600.26 2008-11-29 22:05 UTC 161 + Fix : Leaks of cloned coderefs that access lexicals. 162 + Fix : Building with maint-5.8 and blead (thanks Andreas Koenig). 163 1640.25 2008-11-12 19:40 UTC 165 + Fix : Compatibility with 5.8.9. 166 + Fix : Old Pod::Coverage don't ignore CLONE. 167 + Upd : META.yml spec updated to 1.4. 168 1690.24 2008-10-12 14:55 UTC 170 + Fix : Really fix it. 171 1720.23 2008-10-11 17:25 UTC 173 + Fix : Building on perls with multiplicity but not ithreads. 174 1750.22 2008-09-29 19:40 UTC 176 + Doc : Explain how magic differs from overloading. 177 + Fix : Disable thread safety for perl 5.8 on Windows. If you want it 178 enabled, reliable feedback is welcome. 179 1800.21_02 2008-09-28 23:10 UTC 181 + Fix : Hide previously deleted magic tokens in vmg_svt_free (Yuval 182 Kogman). 183 1840.21_01 2008-09-22 13:25 UTC 185 + Chg : Shrink the context data. 186 + Fix : Enable thread safety features for perls that just lack 187 MY_CXT_CLONE. 188 + Tst : Output threads and threads::shared versions in threads tests. 189 1900.20 2008-09-20 23:35 UTC 191 + Fix : The module is now thread safe. You can test if it had been 192 built with thread safety features enabled through the 193 VMG_THREADSAFE constant. 194 + Fix : Correct backtrace when wizard() croaks. 195 + Fix : 'cast $a, undef' should throw an 'invalid wizard' error instead 196 of an 'invalid signature'. 197 1980.19 2008-07-05 15:05 UTC 199 + Add : The patchlevel with which the module has been built is now 200 exported with the VMG_PERL_PATCHLEVEL constant. 201 + Chg : Version checking macros overhaul. 202 + Fix : 'uvar' magic should only be enabled in maint-5.10 and higher 203 since it's never going to be backported to 5.8. 204 + Fix : Likewise, the copy callback API change should only be enabled in 205 5.11 and higher. 206 + Fix : Instead of those ackward fake refcount increments in the wizard 207 destructor, flag the wizard with SVf_BREAK and force temps 208 cleanup. This should fix the wizard destruction for all perls, 209 and solves the leak introduced by the previous solution. 210 2110.18 2008-07-04 12:20 UTC 212 + Fix : Enable uvar magic when patchlevel >= 28419. 213 + Fix : Set VMG_COMPAT_ARRAY_PUSH_NOLEN for Windows ActiveState Perl 214 5.8.x. 215 2160.17 2008-05-11 09:05 UTC 217 + Fix : 5.8.4 and lower don't have mPUSHi. Gah. Yeah, I know, I should 218 use Devel::PPPort. 219 2200.16 2008-05-10 22:05 UTC 221 + Add : The samples/copy.pl script. 222 + Chg : The sv_magical() + vmg_mg_magical() combo was simplified into 223 vmg_sv_magicuvar(). 224 + Tst : t/33-code.t was testing scalars, not code. 225 + Tst : is() and like() are better than ok(). 226 + Tst : 100% coverage reached. 227 2280.15 2008-04-11 18:25 UTC 229 + Chg : Factor vmg_cb_call{1,2,3}() into one function. 230 + Fix : len magic is no longer called when taking the length() of a 231 magical scalar since p32969. The VMG_COMPAT_SCALAR_LENGTH_NOLEN 232 constant was added to cover this. 233 + Tst : More tests for t/22-len.t. 234 2350.14 2008-03-24 12:35 UTC 236 + Fix : t/16-huf.t failures on Solaris and FreeBSD caused by not 237 updating mg->mg_ptr after Renew-ing it on dispell. 238 + Fix : Undefining MGf_DUP caused the wizard's magic to be wrongly 239 initialized. MGf_DUP now appears as true from the user point of 240 view, but the dup callback isn't actually set. 241 + Fix : Warnings with blead due to copy callbacks now taking an I32 (API 242 change #33256). 243 + Fix : vmg_svt_val() and vmg_uvar_del() aren't required if no uvar 244 magic is available. 245 + Tst : Tests now output the version of optional modules loaded. 246 2470.13 2008-03-19 14:35 UTC 248 + Doc : Link to coverage report. 249 + Fix : Correct dependencies listing in META.yml. 250 + Tst : Improved test coverage. 251 + Tst : Print the patchlevel as a comment. 252 + Tst : Use is() where it's relevant. 253 + Tst : t/16-huf.t now really tests interaction with H::U::FH. 254 2550.12 2008-02-07 18:15 UTC 256 + Fix : POD error. Thanks to Chris Williams (BinGOs) for the quick 257 feedback. 258 2590.11 2008-02-07 17:55 UTC 260 + Add : Copy callbacks now receive the current key/index in $_[2]. 261 The current value/element is now in $_[3]. 262 + Chg : The trigger of copy magic on list assignment with perls greater 263 than 5.10.0 was caused by uvar magic. Hence, 264 VMG_COMPAT_HASH_LISTASSIGN_COPY was removed. Use VMG_UVAR 265 instead. 266 + Fix : Build failures on patched perls. 267 + Tst : Added missing exported symbols to 01-import.t. 268 2690.10 2008-02-04 11:30 UTC 270 + Add : New script : samples/vm_vs_tie.pl, that benchmarks our uvar 271 magic versus tied hashes. 272 + Add : The VMG_COMPAT_* constants can be used from userspace to check 273 perl magic abilities. 274 + Fix : Callbacks that returned undef made us croak, breaking the 275 variable behaviour (regression test in 14-callbacks.t). 276 + Fix : uvar callbacks weren't tested for non-NULL-ity before being 277 called (regression test in 28-uvar.t). 278 + Tst : Fix typo in 25-copy.t that prevented Tie::Hash tests to be ran. 279 2800.09 2008-02-02 11:30 UTC 281 + Doc : Explicitely say that uvar callbacks are safely ignored for 282 non-hashes. 283 + Doc : Document caveats and fix the usual set of typos. 284 + Fix : vmg_dispell() didn't check if the ext magic were ours when 285 counting wizards that have uvar callbacks, resulting in a 286 possible memory misread. 287 + Fix : getdata() now returns directly the data object, and no longer a 288 copy. This caused a leak. 289 + Tst : Prefix author tests by 9*-. 290 + Tst : New optional author test : 95-portability-files.t, that uses 291 Test::Portability::Files when it's present. 292 + Tst : New test : 14-self.t, that tests application of magic on the 293 wizard itself. 294 + Tst : Move Hash::Util::FieldHash tests out of 11-multiple.t to 295 15-huf.t. 296 2970.08 2008-02-01 16:55 UTC 298 + Add : copy magic for tied arrays/hashes. 299 + Add : local magic. 300 + Add : uvar magics : fetch, store, exists, delete for hashes. 301 3020.07_* 2008-01 303 Internal development versions. 304 3050.06 2007-11-20 10:10 UTC 306 + Chg : 5.7.3 is now officially required. 307 + Fix : "data" test failures on 5.8.{0,2}. 308 + Fix : Drand01() vs rand(). 309 3100.05 2007-11-19 09:10 UTC 311 + Fix : 5.10.0_RC1 compatibility fix. 312 3130.04 2007-08-28 12:25 UTC 314 + Chg : s/require (XSLoader)/use $1/. 315 + Fix : Tests are now strict. 316 + Fix : Complete dependencies. 317 3180.03 2007-08-01 17:20 UTC 319 + Add : Passing the signature of an already defined magic to wizard() 320 now returns the corresponding magic object. 321 + Add : You can pass the numeric signature as the wizard argument of 322 cast(), dispell() and getdata(). 323 + Add : Any argument specified after the wizard (or the signature) in a 324 call to cast() is now passed to the private data constructor in 325 $_[1] and after. 326 + Chg : $_[0] is now always a reference to the magic variable in all 327 callbacks. The reason for changing from the previous behaviour 328 is that one may want to apply the same magic to a plain scalar 329 and to a scalar reference, and needs a way to distinguish 330 between them in the callback (say, ref()). 331 + Fix : Wizard object destruction used not to free the signature. 332 3330.02 2007-07-27 13:50 UTC 334 + Fix : In response to test report 548152 : 335 Newx() and SvMAGIC_set() not present on older perls. 336 + Fix : In response to test report 548275 : 337 Since perl 5.9.5, 'clear' magic is invoked when an array is 338 undefined (bug #43357). Moreover, 'len' magic is no longer 339 called by pushing an element since perl 5.9.3. 340 + Fix : Missing glob test in MANIFEST. 341 3420.01 2007-07-25 16:15 UTC 343 First version, released on an unsuspecting world. 344 345