sub _parse_attribute_args {
my $self = shift;
- die "Long form arg (name => 'class', value => 'x') is no longer supported"
- if(@_ == 1 && $_[0]->{'name'} && $_[0]->{'value'});
-
+ #die "Long form arg (name => 'class', value => 'x') is no longer supported"
+ #if(@_ == 1 && $_[0]->{'name'} && $_[0]->{'value'});
+
my $opts = ref($_[0]) eq 'HASH' ? $_[0] : {$_[0] => $_[1]};
for (values %{$opts}) { $self->_zconfig->parser->html_escape($_); }
return $opts;
'Got correct from set_attribute'
);
+like(
+ HTML::Zoom
+ ->from_html(q[<p class="first">Hi!</p>])
+ ->set_attribute('p.first' => { class => 'para' })
+ ->to_html,
+ qr/class="para"/,
+ 'Got correct from set_attribute (via hashref)'
+);
+
is(
HTML::Zoom
->from_html(q[<p class="first">Hi!</p>])