Subject: | [PATCH] YAML/Types.pm: fixed dependency on B::Deparse |
Date: | Wed, 20 Dec 2006 17:11:01 +0300 |
To: | bug-yaml [...] rt.cpan.org |
From: | Alexey Tourbin <at [...] altlinux.ru> |
"Use" loads the module unconditionally right after the statement is parsed.
For "eval" to be in effect, one should use "require" instead.
---
lib/YAML/Types.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/YAML/Types.pm b/lib/YAML/Types.pm
index 4d737ba..0735d2e 100644
--- a/lib/YAML/Types.pm
+++ b/lib/YAML/Types.pm
@@ -123,7 +123,7 @@ sub yaml_dump {
}
else {
bless $value, "CODE" if $class;
- eval { use B::Deparse };
+ eval { require B::Deparse };
return if $@;
my $deparse = B::Deparse->new();
eval {
--
1.4.4.1.GIT