Heidegger has asked for the wisdom of the Perl Monks concerning the following question:
Hello, monks,
We have a lot of mess in our CSS files. I want to write a perl script that lists all styles defined in a given *.css file.
I have tried the CSS::Tiny, CSS::SAC and CSS modules. In none of the examples I could understand how to print all the styles found in a *.css file.
Here's an example code that doesn't fetch styles for me:
use CSS; my $stylesheet = CSS->new(-source => "myfile.css"); my @styles = $stylesheet->styles; # Here the $styles[0] is undefined.
So has anyone needed this? How to do it? Thank you very much for your help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Listing CSS style entities
by Heidegger (Hermit) on Apr 01, 2003 at 10:30 UTC | |
|
Re: Listing CSS style entities
by benn (Vicar) on Apr 01, 2003 at 09:25 UTC |