X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLexical%2FTypes.pm;h=ab54c250121ed2beb7570ade4b5580de5a4f3af7;hb=40ef72f0c01074b9767916dee4cb8eb478929e6f;hp=14f269957ad364a3ee8537df2da517e213e57fda;hpb=28f52395e07f990ec77ca6b87352811f2a9c5f79;p=perl%2Fmodules%2FLexical-Types.git diff --git a/lib/Lexical/Types.pm b/lib/Lexical/Types.pm index 14f2699..ab54c25 100644 --- a/lib/Lexical/Types.pm +++ b/lib/Lexical/Types.pm @@ -1,25 +1,23 @@ package Lexical::Types; -use 5.008; +use 5.008001; use strict; use warnings; -use Carp qw/croak/; - =head1 NAME Lexical::Types - Extend the semantics of typed lexicals. =head1 VERSION -Version 0.06 +Version 0.09 =cut our $VERSION; BEGIN { - $VERSION = '0.06'; + $VERSION = '0.09'; } =head1 SYNOPSIS @@ -152,7 +150,8 @@ sub import { $as .= '::' if $as !~ /::$/; $hint = _tag(sub { $as . $_[0] }); } else { - croak "Invalid $r reference for 'as'"; + require Carp; + Carp::croak("Invalid $r reference for 'as'"); } } else { $hint = _tag(sub { @_ }); @@ -249,7 +248,12 @@ If you prefer to use constants rather than creating empty packages, you can repl =head2 C -True iff the module could have been built when thread-safety features. +True iff the module could have been built with thread-safety features enabled. + +=head2 C + +True iff this module could have been built with fork-safety features enabled. +This will always be true except on Windows where it's false for perl 5.10.0 and below . =head1 CAVEATS @@ -257,9 +261,19 @@ The restrictions on the type (being either a defined package name or a constant) Only one mangler or prefix can be in use at the same time in a given scope. +The implementation was tweaked to work around several limitations of vanilla C pragmas : it's thread safe, and doesn't suffer from a C bug that causes all pragmas to propagate into Cd scopes. + +With 5.8 perls, the pragma does not propagate into C. +This is due to a shortcoming in the way perl handles the hints hash, which is addressed in perl 5.10. + =head1 DEPENDENCIES -L 5.8, L. +L 5.8.1. + +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. + +L (standard since perl 5.006). =head1 SEE ALSO @@ -293,7 +307,7 @@ Thanks Florian Ragwitz for suggesting the use of constants for types. =head1 COPYRIGHT & LICENSE -Copyright 2009 Vincent Pit, all rights reserved. +Copyright 2009,2010,2011 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.