Example-2 - A Longer example
This more complex example is designed to show a normal command line or CGI application. After loading the normal modules, and unbuffering STDOUT, the URI of the site, and the style sheet are grabbed from the command line (if present), and the rss and cgi objects are created. Checking the request method to determine if the application is running in CGI or command line mode, a HTML header is sent if appropriate and then the application checks for required inputs.
Assuming the pre-requisites have all been met, then the rss object is loaded with the source rss, xsl Template, and the transformation is performed. If at any stage an error is detected, all calls return rss method calls return true on success, an error message is generated, and sent to the user.
To install XML::RSS::Tools, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::RSS::Tools
CPAN shell
perl -MCPAN -e shell install XML::RSS::Tools
For more information on module installation, please visit the detailed CPAN module installation guide.