Prima::IniFile - support of Windows-like initialization files
use Prima::IniFile; my $ini = create Prima::IniFile; my $ini = create Prima::IniFile FILENAME; my $ini = create Prima::IniFile FILENAME, default => HASHREF_OR_ARRAYREF; my $ini = create Prima::IniFile file => FILENAME, default => HASHREF_OR_ARRAYREF; my @sections = $ini->sections; my @items = $ini->items(SECTION); my @items = $ini->items(SECTION, 1); my @items = $ini->items(SECTION, all => 1); my $value = $ini-> get_values(SECTION, ITEM); my @vals = $ini-> get_values(SECTION, ITEM); my $nvals = $ini-> nvalues(SECTION, ITEM); $ini-> set_values(SECTION, ITEM, LIST); $ini-> add_values(SECTION, ITEM, LIST); $ini-> replace_values(SECTION, ITEM, LIST); $ini-> write; $ini-> clean; $ini-> read( FILENAME); $ini-> read( FILENAME, default => HASHREF_OR_ARRAYREF); my $sec = $ini->section(SECTION); $sec->{ITEM} = VALUE; my $val = $sec->{ITEM}; delete $sec->{ITEM}; my %everything = %$sec; %$sec = (); for ( keys %$sec) { ... } while ( my ($k,$v) = each %$sec) { ... }
Wait, may be I'll write it...
Version 0.01
Anton Berezin E-Mail: tobez@plab.ku.dk WWW Home Page: http://www.plab.ku.dk/tobez/
Copyright (c) 1998 The Protein Laboratory, University of Copenhagen. 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 Prima, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Prima
CPAN shell
perl -MCPAN -e shell install Prima
For more information on module installation, please visit the detailed CPAN module installation guide.