Irssi::Script::InfoParserExtract information from the $VERSION and %IRSSI headers of an Irssi script | |
Download |
Irssi::Script::InfoParser Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Publisher Name:
- Tom Feist
- Publisher web site:
- http://search.cpan.org/~shabble/
Irssi::Script::InfoParser Tags
Irssi::Script::InfoParser Description
Extract information from the $VERSION and %IRSSI headers of an Irssi script Irssi::Script::InfoParser is a Perl module to extract information from the $VERSION and %IRSSI headers of an Irssi script.SYNOPSIS use Irssi::Script::InfoParser; my $parser = Irssi::Script::InfoParser->new(file => $script); my $version = $parser->version; my @fields = $parser->metadata_fields; my $metadata = $parser->metadata; foreach my $name (@fields) { say "Value is $metadata->{$name}!"; }or # assuming the authors field is actually defined. my $parser = Irssi::Script::InfoParser->new(file => $script, split_authors => 0); return unless $parser->has_field('authors'); my $authors_string = $parser->metadata->{authors}; my $parser = Irssi::Script::InfoParser->new(file => $script, split_authors => 1); my $authors_arrayref = $parser->metadata->{authors}; Requirements: · Perl
Irssi::Script::InfoParser Related Software