]> Dogcows Code - chaz/p5-Return-Type-Lexical/commitdiff
Version 0.002 dist
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Tue, 10 Mar 2020 16:53:33 +0000 (10:53 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Tue, 10 Mar 2020 16:53:33 +0000 (10:53 -0600)
Changes
META.json
META.yml
Makefile.PL
README
lib/Return/Type/Lexical.pm

diff --git a/Changes b/Changes
index 7277276ccf30cc72e74e82917f56503d9df04068..b7fc221d1eceb53aa1589bbcb037e3ba0547d601 100644 (file)
--- 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
 
index 1cf8b8c7a8f262ddadd69f52e14403bd74fbc86d..8732a70c33bc99e6cdc28ba7846851dfa542a666 100644 (file)
--- 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",
index 9581b695e30399517f51baf415a5b91b4a948d48..f29e5373aa63e31f3606d31c5907aea8074ac428 100644 (file)
--- 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'
index 8dfee478ba2431612dac4494a5a2fc2bc7495fe5..f4beeffb2943cb64f753347455e824d70b0a9b1b 100644 (file)
@@ -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 3537524f269ef54bd517044bc372e5c519345015..0506a2246bb42beeef0b94b42597f6d4af0f2724 100644 (file)
--- a/README
+++ b/README
@@ -4,7 +4,7 @@ NAME
 
 VERSION
 
-    version 0.001
+    version 0.002
 
 SYNOPSIS
 
index 83d4ec1d3bc9eb7c4c27d31635249121123e5b24..b0d870708dbf267f63c6c801b507bb9f8c54cf36 100644 (file)
@@ -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
 
This page took 0.031317 seconds and 4 git commands to generate.