A Perl6 module to store data in ini files
Other
Switch branches/tags
Nothing to show
Latest commit 3dc0b49 Apr 30, 2017 @jaffa4 committed on GitHub Merge pull request #2 from zoffixznet/patch-1
Use modern META filename
Permalink
Failed to load latest commit information.
lib/Ini more files Jul 16, 2015
t more files Jul 16, 2015
META6.json Use modern META filename Apr 25, 2017
README.md Update README.md Jul 16, 2015

README.md

Ini::Storage

Read/write ini files and manipulate them in memory. Groups in function names refer to sections. Key refers to "group/key" format.

Usage

use Ini::Storage;

my $o = Ini::Storage.new("my.cfg",True); # True -> read from disk immediately if it exists.
$o.Write("g/id",7); # write section g with key id = 7


my $v = $o.Read("g/id",0); # read section g with key id... if it is not found return 0


$o.FLush; # write to disk

$o.SetDisk(False); # will not write anything to disk, even when object destructs

##functions method new($filename,$isdisk) method GetFilename method SetFilename($newfn) method Read($key,$default) method Exchange($key,$key2) method GetEntryName($group,$no is copy) method Write($key,$value) method Copy($obj) method CountEntries($group) method CopyGroup($obj,$group,$newgroupname?) method DeleteEntry($key) method RenameEntry($key,$keynew) method DeleteEntryFromArray($key) method GetLastArrayIndex($key) method DeleteGroup($group) method GroupExists($group) method Exists($key) method GetGroups method GetEntriesInGroup($group) method FindIndexInArrayByValue($group,$arrayname,$value) method FindAValueInRecordByKey($group,$arrayname,$value,$arrayname2) method GetArrayInGroupK($key) method GetArrayInGroupGE($group,$name) method SetArrayInGroup ($group,$name,@arr) method ReadFile() method WriteFile method PrintGroup($group) method SetDisk($disk) method Flush