I've installed CSS::SAC on our linux box and am trying to read in a list of selectors from a specific css doc. I've read the pod and frankly don't get it. Here's what I have:
#!/usr/bin/perl -w
use CSS::SAC qw();
use CGI qw(:all);
use CGI::Carp qw(fatalsToBrowser);
my $sac = CSS::SAC->new();
my $cgi = new CGI;
# generate a stream of events
$sac->parse({ filename => 'foo.css' });
my @items = $sac->parseSelectors();
print $cgi->header();
print $sac;
foreach my $item (@items) {
print "$item<br>\n";
}
This caused a runaway process on our server and jacked up the error log. So obviously, this isn't correct.
I get the $sac->parse statement, but what I don't get is what is meant in the pod by "sends events to the defined handlers. " What handlers are being referred to? Also, the parseSelectors($stringref) method accepts a string, but what would that be?
Any help would be greatly appreciated.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.