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
"provides" : {
"Return::Type::Lexical" : {
"file" : "lib/Return/Type/Lexical.pm",
- "version" : "0.001"
+ "version" : "0.002"
}
},
"release_status" : "stable",
"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",
provides:
Return::Type::Lexical:
file: lib/Return/Type/Lexical.pm
- version: '0.001'
+ version: '0.002'
requires:
Return::Type: '0'
parent: '0'
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'
"Test::More" => 0,
"Types::Standard" => 0
},
- "VERSION" => "0.001",
+ "VERSION" => "0.002",
"test" => {
"TESTS" => "t/*.t"
}
VERSION
- version 0.001
+ version 0.002
SYNOPSIS
use parent 'Return::Type';
-our $VERSION = '0.001'; # VERSION
+our $VERSION = '0.002'; # VERSION
sub import {
my ($class, %args) = @_;
}
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};
=head1 VERSION
-version 0.001
+version 0.002
=head1 SYNOPSIS