[svk-devel] YAML::Syck and B::Deparse
Michael Hendricks
michael at ndrix.org
Sat Jul 29 00:49:07 EDT 2006
Since version 0.46_01, YAML::Syck can serialize code references. To do
so, it loads B::Deparse. However, it loads B::Deparse even if there are
no coderefs to serialize. B::Deparse is a large module and SVK pays a
small penalty for compiling it (.2s on my slow hardware) for every
command.
If anyone here knows how to modify the YAML::Syck XS so that it loads
B::Deparse only when needed, that would be the best solution. Without
a solution from upstream, inserting the following into bin/svk
accomplishes the same goal.
BEGIN {
unshift @INC, sub {
my ($code, $file) = @_;
return if $file ne 'B/Deparse.pm';
my $foo = '0';
open my $fh, '<', \$foo or die $!;
return $fh;
};
}
Is blacklisting B::Deparse too evil for production?
--
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bestpractical.com/pipermail/svk-devel/attachments/20060728/a0658c53/attachment.pgp
More information about the svk-devel
mailing list