merge
[catagits/HTML-Zoom.git] / lib / HTML / Zoom / FilterBuilder.pm
index 5135e32..8374e91 100644 (file)
@@ -42,7 +42,7 @@ 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 $opts = ref($_[0]) eq 'HASH' ? $_[0] : {$_[0] => $_[1]};
@@ -83,15 +83,14 @@ sub remove_from_attribute {
   my $self = shift;
   my $attr = $self->_parse_attribute_args(@_);
   sub {
-
     my $a = (my $evt = $_[0])->{attrs};
-    my @kupd = grep {exists $a->{$_}} keys %$attr;
     +{ %$evt, raw => undef, raw_attrs => undef,
        attrs => {
          %$a,
          #TODO needs to support multiple removes
          map { my $tar = $_; $_ => join ' ', 
-          map {$attr->{$tar} ne $_} split ' ', $a->{$_} } @kupd
+          map {$attr->{$tar} ne $_} split ' ', $a->{$_} }
+            grep {exists $a->{$_}} keys %$attr
       },
     }
   };