CSS::Parser - Base class for CSS stylesheets parsing INSTALLATION the following should do the job: perl Makefile.PL make make test make install Of course, you may replace make with any other make utility that you have at hand (eg: dmake, nmake...) If you wish to install this library in a specified directory simply begin with perl Makefile.PL LIB=YOURDIR DESCRIPTION CSS::Parser will eat up CSS data and parsed chunks to callbacks. These callbacks have to be subclasses in order to get anything interesting out of the parser. The simplest subclass is one that would simply print out the CSS logical bits that have been found by the parser and info it has received about them. You should find an example of this called CSSPrinter in the example dir of this distribution. As of now, this parser isn't 100% CCS2 compliant, but it is very close to the CSS1 specification. That is to say that it should successfully parse about 99.9% of stylesheets that you are likely to find on the web, as no browser is yet fully CSS2 compliant either. The next release (already seriously in the works as of this writing) will come very much closer to CSS2. Also, other modules will be provided together with this one so as to already implement the most useful subclasses. I am currently working on CSS::Expand that given a stylesheet and an HTML page would return a page in which all tags will have their style attribute set (a mechanism for a default stylesheet will be present) and C that will reduce a stylesheet to its valid part as specified by the CSS2 specification. These modules may become useful for example for robot writers who want to skip parts of pages that have a display: none or a visibility: hide/hidden style attribute set, so as to circumvent cheaters. An example of this will be included in the next release. Also, as XML parsing will be done more and more in perl, and as CSS can be included in XML, it is likely that subclasses will be written to cooperate with modules in the XML:: hierarchy or with scripts using them. NOTE This is alpha software, it is not fit for much yet. Use it at your own risc and read the provided documentation carefully if you plan on using it. At any rate, do not trust the interface to stabilise before September. CONTACT Robin Berjon robin@idl-net.com Copyright (c) Robin Berjon. All Rights Reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.