SWISH::Prog::Utils - utility variables and methods
use SWISH::Prog::Utils; # use the utils
This class provides commonly used variables and methods shared by many classes in the SWISH::Prog project.
Regular expression of common file type extensions.
Instance of Search::Tools::XML.
Hash of MIME types to their equivalent parser.
Returns MIME type for url. If ext is used, that is checked against MIME::Types. Otherwise the url is parsed for an extension using path_parts() and then fed to MIME::Types.
Returns array of path, file and extension using the File::Basename module. If regex is missing or false, uses $ExtRE.
Similar to the XML::Simple XMLout() feature, perl_to_xml() will take a Perl data structure ref and convert it to XML, using root_element as the top-level element.
Peter Karman, <perl@peknet.com>
Copyright 2008 by Peter Karman
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install SWISH::Prog, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SWISH::Prog
CPAN shell
perl -MCPAN -e shell install SWISH::Prog
For more information on module installation, please visit the detailed CPAN module installation guide.