Steven Haryanto

NAME

HTTP::Headers::Patch::DontUseStorable - Do not use Storable

VERSION

version 0.03

SYNOPSIS

 use HTTP::Headers::Patch::DontUseStorable;

DESCRIPTION

HTTP::Headers (6.05 as of this writing) tries to load Storable (2.39 as of this writing) and use its dclone() method. Since Storable still does not support serializing Regexp objects, HTTP::Headers/HTTP::Message croaks when fed data with Regexp objects.

This patch avoids using Storable and clone using the alternative method.

FAQ

Is this a bug with HTTP::Headers? Why don't you submit a bug to HTTP-Message?

I tend not to think this is a bug with HTTP::Headers; after all, Storable's dclone() is a pretty standard way to clone data in Perl. This patch is more of a workaround for current Storable's deficiencies.

Shouldn't you add STORABLE_{freeze,thaw} methods to Regexp instead?

Yes, that's also one possible solution, albeit with slightly more work. There's an old distribution, Regexp::Copy (last release is 0.06 in 2003, at the time of this writing) which does this, but last time I tried it no longer works.

SEE ALSO

AUTHOR

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Steven Haryanto.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.