From: Simon Elliott Date: Thu, 28 Feb 2013 12:26:25 +0000 (+0000) Subject: merge X-Git-Tag: 0.009009~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=437bcb252e9dca858c927fa2b3ac8ffca4aa83e7;p=catagits%2FHTML-Zoom.git merge --- 437bcb252e9dca858c927fa2b3ac8ffca4aa83e7 diff --cc lib/HTML/Zoom/FilterBuilder.pm index e2a2693,d658adc..8374e91 --- a/lib/HTML/Zoom/FilterBuilder.pm +++ b/lib/HTML/Zoom/FilterBuilder.pm @@@ -42,12 -44,10 +42,12 @@@ sub set_attribute sub _parse_attribute_args { my $self = shift; - warn "WARNING: Long form arg (name => 'class', value => 'x') is deprecated. This may not do what you originally intended..." + die "Long form arg (name => 'class', value => 'x') is no longer supported" if(@_ == 1 && $_[0]->{'name'} && $_[0]->{'value'}); - my ($name, $value) = @_ > 1 ? @_ : @{$_[0]}{qw(name value)}; - return ($name, $self->_zconfig->parser->html_escape($value)); + + my $opts = ref($_[0]) eq 'HASH' ? $_[0] : {$_[0] => $_[1]}; + for (values %{$opts}) { $self->_zconfig->parser->html_escape($_); } + return $opts; } sub add_attribute {