Subject: | image plugin suffers from hash randomization in perl 5.18 |
besides the vmethod/text failure due to behavior changes in split() 2.24 also suffers from hash randomization in Plugin::Image.
Here is a simple patch. I think it is important to have a well-defined order in the tag method's output to make caching possible.
--- lib/Template/Plugin/Image.pm~ 2011-12-20 08:41:35.000000000 +0100
+++ lib/Template/Plugin/Image.pm 2013-05-25 13:43:30.658308009 +0200
@@ -165,8 +165,8 @@
unless defined $options->{ alt };
if (%$options) {
- while (my ($key, $val) = each %$options) {
- my $escaped = escape( $val );
+ for my $key (sort keys %$options) {
+ my $escaped = escape( $options->{$key} );
$tag .= qq[ $key="$escaped"];
}
}