use CSS::SAC qw();
use CSS::SAC::Writer ();
### create a doc handler using the writer
# options can also be ioref and string (given a stringref) in which
# case it'll write to the filehandle or to the string.
# Yes, it also works as an ErrorHandler (though not a good one)
my $doc_h = CSS::SAC::Writer->new({ filename => 'out.css' });
my $sac = CSS::SAC->new({
DocumentHandler => $doc_h,
ErrorHandler => $doc_h,
});
# generate a stream of events
$sac->parse({ filename => 'foo.css' });
This is a simplistic SAC handler that demonstrates how one may use CSS::SAC.
More useful ones will follow. Obviously, it isn't documented much, given that
its value resides mostly in the source code :)
You can of course still use it as a way to write CSS from a SAC
stream.
Robin Berjon <robin@knowscape.com>
This module is licensed under the same terms as Perl itself.