http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13941
--- Comment #23 from Frédéric Demians <[email protected]> --- (In reply to Jonathan Druart from comment #22) > Comment on attachment 37781 [details] [review] > [Signed-off] Bug 13941 [1/2] Test <body> tag with id/class attributes > > Review of attachment 37781 [details] [review]: > ----------------------------------------------------------------- > > ::: xt/tt_valid.t > @@ +55,5 @@ > > + description => '<body> tag with id and class attributes', > > + check => sub { > > + my ($self, $name, $token) = @_; > > + return if $name =~ /bodytag\.inc/; > > + $_ = $token->{_string}; > > Sorry but I still don't understand why this is useful. The sub complete code is: my ($self, $name, $token) = @_; return if $name =~ /bodytag\.inc/; $_ = $token->{_string}; push @{$self->{errors}->{$name}}, $token->{_lc} if /^<body/ && ! /id=".+"/ && ! /class=".+"/; The $_ is used in the last line which should have been coded like that without $_ assignation: if $token->{_string} =~ $/^<body/ && ! $token->{_string} =~ /id=".+"/ && ! $token->{_string} =~ /class=".+"/; Hope this explanation doesn't obfuscate more something which isn't already that clear. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
