From: Vincent Pit Date: Sat, 4 Oct 2014 23:34:10 +0000 (+0200) Subject: This is 0.13 X-Git-Tag: v0.13^0 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLexical-Types.git;a=commitdiff_plain;h=967fca89c944c8d7560c0d94d1982455bc62854d This is 0.13 --- diff --git a/Changes b/Changes index a67822d..fda117b 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,28 @@ Revision history for Lexical-Types +0.13 2014-10-04 23:25 UTC + + Add : Support for the PERL_OP_PARENT optional feature introduced in + perl 5.21.2. + + Doc : The CAVEATS section now warns about the global slowdown during + compilation caused by this pragma. + + Fix : [RT #86112] : Doesn't hook new PADRANGE op in Perl 5.18. + The PADRANGE optimization is not fully supported. + Thanks Dagfinn Ilmari Mannsåker for reporting. + + Fix : Segfaults in eval in an END block of a Win32 pseudo-fork. + + Fix : Segfaults during global destruction of a thread or a + pseudo-fork. + + Fix : Check functions are now replaced and restored in a thread-safe + manner, either by using the wrap_op_checker() function from perl + when it is available (starting from perl 5.16) or by taking the + OP_REFCNT mutex on older perls. + + Tst : Author tests are no longer bundled with this distribution. + They are only made available to authors in the git repository. + + Tst : Test failures of t/81-threads-teardown.t on Cygwin and Android + should have been addressed. + + Tst : Threads tests will not fail anymore if resources constraints + prevent the system from creating all the required threads. + + Upd : Metadata overhaul. + 0.12 2011-08-24 16:30 UTC + Fix : The pragma no longer vivifies the "Lexical::Types" entry in the hints hash %^H on perl 5.8. diff --git a/META.json b/META.json index 7e7e675..b2b6cce 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Vincent Pit " ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150", + "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.142690", "license" : [ "perl_5" ], @@ -22,22 +22,24 @@ "prereqs" : { "build" : { "requires" : { - "Carp" : 0, - "ExtUtils::MakeMaker" : 0, - "Test::More" : 0, - "XSLoader" : 0, - "constant" : 0 + "Carp" : "0", + "Config" : "0", + "ExtUtils::MakeMaker" : "0", + "Test::More" : "0", + "XSLoader" : "0", + "constant" : "0" } }, "configure" : { "requires" : { - "ExtUtils::MakeMaker" : 0 + "Config" : "0", + "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { - "Carp" : 0, - "XSLoader" : 0, + "Carp" : "0", + "XSLoader" : "0", "perl" : "5.008003" } } @@ -45,7 +47,7 @@ "release_status" : "stable", "resources" : { "bugtracker" : { - "web" : "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lexical-Types" + "web" : "http://rt.cpan.org/Dist/Display.html?Name=Lexical-Types" }, "homepage" : "http://search.cpan.org/dist/Lexical-Types/", "license" : [ @@ -55,5 +57,5 @@ "url" : "http://git.profvince.com/?p=perl%2Fmodules%2FLexical-Types.git" } }, - "version" : "0.12" + "version" : "0.13" } diff --git a/META.yml b/META.yml index 439a611..e78e7ee 100644 --- a/META.yml +++ b/META.yml @@ -3,31 +3,33 @@ abstract: 'Extend the semantics of typed lexicals.' author: - 'Vincent Pit ' build_requires: - Carp: 0 - ExtUtils::MakeMaker: 0 - Test::More: 0 - XSLoader: 0 - constant: 0 + Carp: '0' + Config: '0' + ExtUtils::MakeMaker: '0' + Test::More: '0' + XSLoader: '0' + constant: '0' configure_requires: - ExtUtils::MakeMaker: 0 + Config: '0' + ExtUtils::MakeMaker: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150' +generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.142690' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + version: '1.4' name: Lexical-Types no_index: directory: - t - inc requires: - Carp: 0 - XSLoader: 0 - perl: 5.008003 + Carp: '0' + XSLoader: '0' + perl: '5.008003' resources: - bugtracker: http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lexical-Types + bugtracker: http://rt.cpan.org/Dist/Display.html?Name=Lexical-Types homepage: http://search.cpan.org/dist/Lexical-Types/ license: http://dev.perl.org/licenses/ repository: http://git.profvince.com/?p=perl%2Fmodules%2FLexical-Types.git -version: 0.12 +version: '0.13' diff --git a/README b/README index 919e0af..ce2b7f7 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME Lexical::Types - Extend the semantics of typed lexicals. VERSION - Version 0.12 + Version 0.13 SYNOPSIS { package Str; } @@ -46,12 +46,16 @@ DESCRIPTION This pragma is not implemented with a source filter. -FUNCTIONS - "import [ as => [ $prefix | $mangler ] ]" - Magically called when writing "use Lexical::Types". All the occurences - of "my Str $x" in the current lexical scope will be changed to call at - each run a given method in a given package. The method and package are - determined by the parameter 'as' : +METHODS + "import" + use Lexical::Types; + use Lexical::Types as => $prefix; + use Lexical::Types as => sub { ... }; # = $mangler + + Magically called when "use Lexical::Types" is encountered. All the + occurences of "my Str $x" in the current lexical scope will be changed + to call at each run a given method in a given package. The method and + package are determined by the parameter 'as' : * If it's left unspecified, the "TYPEDSCALAR" method in the "Str" package will be called. @@ -73,7 +77,9 @@ FUNCTIONS definition will be skipped (thus it won't be altered to trigger a run-time hook) ; - use Lexical::Types as => sub { return $_[0] =~ /Str/ ? @_ : () }; + use Lexical::Types as => sub { + return $_[0] =~ /Str/ ? @_ : () + }; my Str $y; # calls Str->TYPEDSCALAR my Int $x; # nothing special @@ -96,7 +102,10 @@ FUNCTIONS $_[0]. "unimport" - Magically called when writing "no Lexical::Types". Turns the pragma off. + no Lexical::Types; + + Magically called when "no Lexical::Types" is encountered. Turns the + pragma off. RUN-TIME INITIALIZER METHOD The initializer method receives an alias to the pad slot of the @@ -182,6 +191,11 @@ CONSTANTS perl 5.10.0 and below . CAVEATS + Using this pragma will cause a slight global slowdown of any subsequent + compilation phase that happens anywere in your code - even outside of + the scope of use of "use Lexical::Types" - which may become noticeable + if you rely heavily on numerous calls to "eval STRING". + The restrictions on the type (being either a defined package name or a constant) apply even if you use the 'as' option to redirect to another package, and are unlikely to find a workaround as this happens deep @@ -190,6 +204,11 @@ CAVEATS Only one mangler or prefix can be in use at the same time in a given scope. + Typed lexicals declarations that appear in code "eval"'d during the + global destruction phase of a spawned thread or pseudo-fork (the + processes used internally for the "fork" emulation on Windows) are + ignored. + The implementation was tweaked to work around several limitations of vanilla "perl" pragmas : it's thread safe, and doesn't suffer from a "perl 5.8.x-5.10.0" bug that causes all pragmas to propagate into @@ -205,7 +224,7 @@ DEPENDENCIES A C compiler. This module may happen to build with a C++ compiler as well, but don't rely on it, as no guarantee is made in this regard. - XSLoader (standard since perl 5.006). + XSLoader (standard since perl 5.6.0). SEE ALSO fields. @@ -238,7 +257,8 @@ ACKNOWLEDGEMENTS Thanks Florian Ragwitz for suggesting the use of constants for types. COPYRIGHT & LICENSE - Copyright 2009,2010,2011 Vincent Pit, all rights reserved. + Copyright 2009,2010,2011,2012,2013,2014 Vincent Pit, all rights + reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/lib/Lexical/Types.pm b/lib/Lexical/Types.pm index 6f9f44d..0bf4b56 100644 --- a/lib/Lexical/Types.pm +++ b/lib/Lexical/Types.pm @@ -11,13 +11,13 @@ Lexical::Types - Extend the semantics of typed lexicals. =head1 VERSION -Version 0.12 +Version 0.13 =cut our $VERSION; BEGIN { - $VERSION = '0.12'; + $VERSION = '0.13'; } =head1 SYNOPSIS