##// END OF EJS Templates
Switch to Config::Tiny. It comes out of the box with ActivePerl at least.
Jani Honkonen -
r1149:b32dfc788188
parent child
Show More
@@ -1,13 +1,6
1 1 package Jobs;
2 2 use File::Basename;
3 use Config::IniFiles;
4
5 # NOTE:
6 # Config::IniFiles is from CPAN
7 # http://search.cpan.org/dist/Config-IniFiles-2.72/
8 #
9 # On windows (ActivePerl) install it from command line by calling:
10 # ppm install Config-IniFiles
3 use Config::Tiny;
11 4
12 5 sub get {
13 6 my $inifile = shift;
@@ -18,11 +11,10 sub get {
18 11 $jobname =~ s/$prefix//;
19 12
20 13 # read ini file
21 my %cfg;
22 tie %cfg, 'Config::IniFiles', ( -file => $inifile );
23
14 my $cfg = Config::Tiny->read( $inifile );
15
24 16 # get section from ini by jobname
25 my %job = %{$cfg{$jobname}};
17 my %job = %{$cfg->{$jobname}};
26 18 if (!%job) {
27 19 die ("Unknown jobname! Check $inifile and bamboo job name.");
28 20 }
General Comments 0
You need to be logged in to leave comments. Login now