File: remove-Sub%3A%3ACurrent.patch

package info (click to toggle)
libcassandra-client-perl 0.21-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 716 kB
  • sloc: perl: 3,898; ansic: 1,767; makefile: 3
file content (32 lines) | stat: -rw-r--r-- 774 bytes parent folder | download | duplicates (2)
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
Description: replace Sub::Current by native __SUB__
Forwarded: not-needed

--- a/lib/Cassandra/Client/Util.pm
+++ b/lib/Cassandra/Client/Util.pm
@@ -8,7 +8,7 @@
 use Exporter 'import';
 our @EXPORT= ('series', 'parallel', 'whilst');
 
-use Sub::Current;
+use feature 'current_sub';
 
 sub series {
     my $list= shift;
@@ -17,7 +17,7 @@
     (shift @$list)->(sub {
         my $next= shift @$list;
         if ($next && !$_[0]) {
-            splice @_, 0, 1, ROUTINE();
+            splice @_, 0, 1, __SUB__;
             goto &$next;
         }
 
@@ -66,7 +66,7 @@
         if (defined $_[0] || !($condition->())) {
             goto &$callback;
         }
-        splice @_, 0, 1, ROUTINE();
+        splice @_, 0, 1, __SUB__;
         goto &$iteratee;
     })->();
 }