From 53926ff064fb7fe2c0b7426363e8a794fa9020ba Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Tue, 10 Mar 2020 10:53:33 -0600 Subject: [PATCH] Version 0.002 --- Changes | 3 +++ META.json | 4 ++-- META.yml | 4 ++-- Makefile.PL | 2 +- README | 2 +- lib/Return/Type/Lexical.pm | 11 ++++++++--- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Changes b/Changes index 7277276..b7fc221 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Return-Type-Lexical. +0.002 2020-03-10 10:53:17-06:00 MST7MDT + * Compatibility fix for perls <5.10.1 (thanks CPAN testers) + 0.001 2020-03-09 22:51:04-06:00 MST7MDT * Initial release diff --git a/META.json b/META.json index 1cf8b8c..8732a70 100644 --- a/META.json +++ b/META.json @@ -75,7 +75,7 @@ "provides" : { "Return::Type::Lexical" : { "file" : "lib/Return/Type/Lexical.pm", - "version" : "0.001" + "version" : "0.002" } }, "release_status" : "stable", @@ -90,7 +90,7 @@ "web" : "https://github.com/chazmcgarvey/Return-Type-Lexical" } }, - "version" : "0.001", + "version" : "0.002", "x_authority" : "cpan:CCM", "x_generated_by_perl" : "v5.28.0", "x_serialization_backend" : "Cpanel::JSON::XS version 4.15", diff --git a/META.yml b/META.yml index 9581b69..f29e537 100644 --- a/META.yml +++ b/META.yml @@ -29,7 +29,7 @@ no_index: provides: Return::Type::Lexical: file: lib/Return/Type/Lexical.pm - version: '0.001' + version: '0.002' requires: Return::Type: '0' parent: '0' @@ -40,7 +40,7 @@ resources: bugtracker: https://github.com/chazmcgarvey/Return-Type-Lexical/issues homepage: https://github.com/chazmcgarvey/Return-Type-Lexical repository: https://github.com/chazmcgarvey/Return-Type-Lexical.git -version: '0.001' +version: '0.002' x_authority: cpan:CCM x_generated_by_perl: v5.28.0 x_serialization_backend: 'YAML::Tiny version 1.73' diff --git a/Makefile.PL b/Makefile.PL index 8dfee47..f4beeff 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -31,7 +31,7 @@ my %WriteMakefileArgs = ( "Test::More" => 0, "Types::Standard" => 0 }, - "VERSION" => "0.001", + "VERSION" => "0.002", "test" => { "TESTS" => "t/*.t" } diff --git a/README b/README index 3537524..0506a22 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ NAME VERSION - version 0.001 + version 0.002 SYNOPSIS diff --git a/lib/Return/Type/Lexical.pm b/lib/Return/Type/Lexical.pm index 83d4ec1..b0d8707 100644 --- a/lib/Return/Type/Lexical.pm +++ b/lib/Return/Type/Lexical.pm @@ -7,7 +7,7 @@ use strict; use parent 'Return::Type'; -our $VERSION = '0.001'; # VERSION +our $VERSION = '0.002'; # VERSION sub import { my ($class, %args) = @_; @@ -19,12 +19,17 @@ sub unimport { } sub _in_effect { - my $level = shift // 0; + my ($level) = @_; + $level = 0 if !defined $level; my $hinthash = (caller($level))[10]; my $in_effect = $hinthash->{'Return::Type::Lexical/in_effect'}; return !defined $in_effect || $in_effect; } +# XXX This is kind of janky. It relies upon Return::Type using Attribute::Handlers, and it assumes +# some internal Attribute::Handlers behavior. If it proves to be too fragile, we may need to copy +# the Return::Type code to here. Or make Return::Type lexical if that can be done without breaking +# backward-compatibility. my $handler; BEGIN { $handler = $UNIVERSAL::{ReturnType}; @@ -52,7 +57,7 @@ Return::Type::Lexical - Same thing as Return::Type, but lexical =head1 VERSION -version 0.001 +version 0.002 =head1 SYNOPSIS -- 2.44.0