[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl5-changes
Subject:    [perl.git]  branch rjbs/corelist-max-deprecated, updated. v5.17.9-175-g6785463
From:       "Ricardo Signes" <rjbs () manxome ! org>
Date:       2013-03-17 14:55:54
Message-ID: E1UHF06-0001Bo-CF () camel ! ams6 ! corp ! booking ! com
[Download RAW message or body]

In perl.git, the branch rjbs/corelist-max-deprecated has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/6785463e32ae63e8e00b628b08a9e99070c10c8b?hp=cdac396140ede59138b67af076981d0438e36b8b>


- Log -----------------------------------------------------------------
commit 6785463e32ae63e8e00b628b08a9e99070c10c8b
Author: Ricardo Signes <rjbs@cpan.org>
Date:   Sun Mar 17 10:55:47 2013 -0400

    assume current deprecations persist forever
    
    This might not be ideal.  We might want, instead, to say that
    they are good only within the same version (not subversion)
    as the known data, and to give up if we know about 5.17.x and
    someone asks about 5.19.x
-----------------------------------------------------------------------

Summary of changes:
 dist/Module-CoreList/lib/Module/CoreList.pm |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dist/Module-CoreList/lib/Module/CoreList.pm \
b/dist/Module-CoreList/lib/Module/CoreList.pm index 5797608..aa3651c 100644
--- a/dist/Module-CoreList/lib/Module/CoreList.pm
+++ b/dist/Module-CoreList/lib/Module/CoreList.pm
@@ -68,12 +68,20 @@ sub find_version {
     return undef;
 }
 
+my $max_deprecated;
+
 sub is_deprecated {
     my $module = shift;
     $module = shift if eval { $module->isa(__PACKAGE__) }
       and scalar @_ and $_[0] =~ \
m#\A[a-zA-Z_][0-9a-zA-Z_]*(?:(::|')[0-9a-zA-Z_]+)*\z#; +
+    ($max_deprecated) = sort { $b cmp $a } keys %deprecated
+      if ! defined $max_deprecated;
+
     my $perl_version = shift;
     $perl_version ||= $];
+    $perl_version = $max_deprecated if $perl_version gt $max_deprecated;
+
     return unless $module && exists $deprecated{$perl_version}{$module};
     return $deprecated{$perl_version}{$module};
 }

--
Perl5 Master Repository


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic