File: universal.patch

package info (click to toggle)
libmemoize-memcached-perl 0.03-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 120 kB
  • ctags: 38
  • sloc: perl: 282; makefile: 2
file content (33 lines) | stat: -rw-r--r-- 1,046 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Author: Nicholas Bamber <nicholas@periapt.co.uk>
Subject: UNIVERSAL::import deprecated in perl 5.12
Last-Update: 2011-05-13
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614868
Bug: http://rt.cpan.org/Ticket/Display.html?id=68170
--- a/lib/Memoize/Memcached.pm
+++ b/lib/Memoize/Memcached.pm
@@ -3,7 +3,6 @@
 use strict;
 use warnings;
 
-use UNIVERSAL qw( isa );
 use Carp qw( carp croak );
 use Memoize qw( unmemoize );
 use Cache::Memcached;
@@ -49,7 +48,7 @@
 
   my $memcached_args = delete $args{memcached} || {};
   croak "Invalid memcached argument (expected a hash)"
-    unless isa($memcached_args, 'HASH');
+    unless ref $memcached_args eq 'HASH';
 
   _memcached_setup(
     %{$memcached_args},
@@ -138,7 +137,7 @@
     next unless $arg eq 'memcached';
     (undef, my $memcached_config) = splice @_, $idx, 2;
     croak "Invalid memcached config (expected a hash ref)"
-      unless isa($memcached_config, 'HASH');
+      unless ref $memcached_config eq 'HASH';
     %memcached_config = %{$memcached_config};
   }