| 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}; |