File: Load-B-Deparse-at-runtime.patch

package info (click to toggle)
libyaml-libyaml-perl 0.63-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,040 kB
  • ctags: 1,770
  • sloc: ansic: 8,311; perl: 1,587; sh: 29; makefile: 3
file content (37 lines) | stat: -rw-r--r-- 1,233 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
34
35
36
37
Description: Load B::Deparse at runtime
 only loaded when necessary
Origin: upstream, https://github.com/ingydotnet/yaml-libyaml-pm/commit/56ba597ec828e90a4d68659de24e083b39f32e9d
Bug: https://github.com/ingydotnet/yaml-libyaml-pm/issues/52
Bug-Debian: https://bugs.debian.org/849843
Forwarded: https://github.com/ingydotnet/yaml-libyaml-pm/issues/52
Author: =?UTF-8?q?Tina=20M=C3=BCller?= <cpan2@tinita.de>
Reviewed-by: Salvatore Bonaccorso <carnil@debian.org>
Last-Update: 2017-01-05
---
 lib/YAML/XS.pm | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/YAML/XS.pm b/lib/YAML/XS.pm
index 90253c8..0fd2df4 100644
--- a/lib/YAML/XS.pm
+++ b/lib/YAML/XS.pm
@@ -50,15 +50,11 @@ sub LoadFile {
     return YAML::XS::LibYAML::Load(do { local $/; local $_ = <$IN> });
 }
 
-# XXX Figure out how to lazily load this module.
-# So far I've tried using the C function:
-#      load_module(PERL_LOADMOD_NOIMPORT, newSVpv("B::Deparse", 0), NULL);
-# But it didn't seem to work.
-use B::Deparse;
 
 # XXX The following code should be moved from Perl to C.
 $YAML::XS::coderef2text = sub {
     my $coderef = shift;
+    require B::Deparse;
     my $deparse = B::Deparse->new();
     my $text;
     eval {
-- 
2.11.0