foo.pl untested

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 23 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 use Mojo::DOM;
2 use Mojo::File qw/path/;
3 use Getopt::Long::Descriptive;
4 use Mojo::Util qw/dumper/;
5  
6 $\ = "\n"; $, = "\t";
7  
8 my $svg = Mojo::DOM->new->with_roles('+Style', '+File')->from_file($ARGV[0]);
9  
10 print $svg->at('#rect10')->style('stroke', 'black');
11  
12 print $svg->at('#rect10')->style('stroke', 'black')->attr('x');
13  
14 print $svg->at('#rect10')->style('stroke', 'black')->{stroke};
15  
16 print $svg->at('#rect10')->style('stroke', 'black')->{fill};