MDK-Common
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/MDK/Common/System.pm view on Meta::CPAN
my ($file, $category) = @_;
my %h;
foreach (MDK::Common::File::cat_($file), "[NOCATEGORY]\n") {
if (/^\s*\[\Q$category\E\]/i ... /^\[/) {
$h{$1} = $2 if /^\s*([^=]*?)=(.*)/;
}
}
%h;
}
sub update_gnomekderc {
my ($file, $category, %subst_) = @_;
my %subst = map { lc($_) => [ $_, $subst_{$_} ] } keys %subst_;
my $s;
defined($category) or $category = "DEFAULTCATEGORY";
foreach ("[DEFAULTCATEGORY]\n", MDK::Common::File::cat_($file), "[NOCATEGORY]\n") {
if (my $i = /^\s*\[\Q$category\E\]/i ... /^\[/) {
if ($i =~ /E/) { #- for last line of category
chomp $s; $s .= "\n";
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.014 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )