line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::Liberal::Remedy::UnquotedAttribute; |
2
|
2
|
|
|
2
|
|
2483
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
68
|
|
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
8
|
use List::Util qw( min ); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
463
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub apply { |
7
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
8
|
0
|
|
|
|
|
|
my($driver, $error, $xml_ref) = @_; |
9
|
|
|
|
|
|
|
|
10
|
0
|
0
|
|
|
|
|
return 0 if $error->message !~ /^parser error : AttValue: \" or \' expected/; |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
pos($$xml_ref) = $error->location; |
13
|
0
|
0
|
|
|
|
|
return 1 if $$xml_ref =~ s/\G([^\s>"]*)/"$1"/; |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
Carp::carp("Can't find unquoted attribute in line, error was: ", |
16
|
|
|
|
|
|
|
$error->summary); |
17
|
0
|
|
|
|
|
|
return 0; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |