File: 01-replace-digest-sha1-with-digest-sha.patch

package info (click to toggle)
libmodule-compile-perl 0.35-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 348 kB
  • ctags: 215
  • sloc: perl: 1,826; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 908 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
Description: Replace usage of Digest::SHA1 with core Digest::SHA module
 In Debian we use the core Digest::SHA module that was released with Perl 5.9.3.
 Upstream keeps compatibility with Perl 5.8.1 so this patch is not forwarded.
Author: Nick Morrott <knowledgejunkie@gmail.com>
Forwarded: no
Last-Update: 2016-06-21
---
--- a/lib/Module/Compile.pm
+++ b/lib/Module/Compile.pm
@@ -7,7 +7,7 @@
 package Module::Compile;
 our $VERSION = '0.35';
 
-use Digest::SHA1();
+use Digest::SHA();
 
 # A lexical hash to keep track of which files have already been filtered
 my $filtered = {};
@@ -553,9 +553,9 @@
 
 # Fold a piece of code into a unique string.
 sub pmc_fold {
-    require Digest::SHA1;
+    require Digest::SHA;
     my ($class, $text) = @_;
-    my $digest = Digest::SHA1::sha1_hex($text);
+    my $digest = Digest::SHA::sha1_hex($text);
     $digest_map->{$digest} = $text;
     return $digest;
 }