Icon::Theme::Index::Parse - Parse the index file for Freedesktop compatible icon themes.
Version 0.0.1
Information for index file specification can be found at the URL below.
http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
use Icon::Theme::Index::Parse; my $themeindex = Icon::Theme::Index::Parse->new_from_file('/usr/local/share/icons/hicolor/index.theme'); if($themeindex->{error}){ print "Error!\n"; }
This forms a new object from the raw data.
One arguement is accepted and it is the raw data from a index file.
my $themeindex=Icon::Theme::Index::Parse->new_from_data($data); if($themeindex->{error}){ print "Error!\n"; }
This creates a new object from the specified index file.
One arguement is accepted and it is the path to the file.
my $themeindex=Icon::Theme::Index::Parse->new_from_file('/usr/local/share/icons/hicolor/index.theme'); if($themeindex->{error}){ print "Error!\n"; }
This fetches a description for the theme.
If the comment setting is not defined 'false' is returned.
my $hidden=$themeindex->hidden;
This gets a list of directories for the theme.
my @directories=$themeindex->directories;
This gets the context for icons in the directory.
my $context=$themeindex->dirContext('48x48/mimetypes');
This checks if the specified directory exists in the index.
my $returned=$themeindex->dirExists('48x48/mimetypes'); if($returned){ print "It exists.\n"; }
This gets the maximum size for icons in the directory.
my $maxsize=$themeindex->dirMaxSize('48x48/mimetypes');
This gets the minimum size for icons in the directory.
my $minsize=$themeindex->dirMinSize('48x48/mimetypes');
This gets the nominal size for icons in the directory.
my $size=$themeindex->dirSize('48x48/mimetypes');
The icons in this directory can be used if the size differ at most this much from the desired size.
Returns 2 if not present.
my $threshold=$themeindex->dirThreshold('48x48/mimetypes');
This gets the type of icon size for icons in the directory.
my $type=$themeindex->dirType('48x48/mimetypes');
This fetches a icon to use for a example for the theme.
my $example=$themeindex->example;
This gets if a it should be displayed or note.
The value returned should most likely match /[Ff][Aa][Ll][Ss][Ee]/ or /[Tt][Rr][Uu][Ee]/.
If the hidden setting is not defined 'false' is returned.
This gets a list of themes the theme inherits from.
my @dinherits=$themeindex->inherits;
This fetches a name for the theme.
my $name=$themeindex->name;
This is a internal function that blanks any previous errors.
No file name specified.
The file does not exist.
Failed to open the index file.
No data specified.
No directory specified.
The dir queries does not exist.
Zane C. Bowers, <vvelox at vvelox.net>
<vvelox at vvelox.net>
Please report any bugs or feature requests to bug-icon-theme-index-parse at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Icon-Theme-Index-Parse. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-icon-theme-index-parse at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Icon::Theme::Index::Parse
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Icon-Theme-Index-Parse
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Icon-Theme-Index-Parse
CPAN Ratings
http://cpanratings.perl.org/d/Icon-Theme-Index-Parse
Search CPAN
http://search.cpan.org/dist/Icon-Theme-Index-Parse/
Copyright 2009 Zane C. Bowers, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Icon::Theme::Index::Parse, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Icon::Theme::Index::Parse
CPAN shell
perl -MCPAN -e shell install Icon::Theme::Index::Parse
For more information on module installation, please visit the detailed CPAN module installation guide.