Subject: | Storable is used in HTTP::Headers for cloning |
Storable is used in HTTP::Headers and another internal fallback method is provided for the method 'clone'
Two minor issues there:
1 - there are not a single unit test which guarantee that the second clone method (without Storable) is working in the same way
2 - the method setting and check should probably happen at BEGIN time rather than run time.
3 - maybe we only need one method there, the faster, and we can probably assume that Storable is available on all System and if not
simply list it as a dependencies for old perl versions
````
if (eval { require Storable; 1 }) {
*clone = \&Storable::dclone;
} else {
*clone = sub {
my $self = shift;
my $clone = HTTP::Headers->new;
$self->scan(sub { $clone->push_header(@_);} );
$clone;
};
}
````