Commits

Palmer, 2E0EOL committed 04b4306

Start migrating over to Config::IniFiles

  • Participants
  • Parent commits 925f6e4

Comments (0)

Files changed (1)

 # HG changeset patch
 # Parent 6f13f90aaaee3b077e0e0689db9a5c56ee2d6107
 
+diff -r 6f13f90aaaee debian/control
+--- a/debian/control	Wed Feb 20 23:52:19 2013 +0000
++++ b/debian/control	Thu Feb 21 20:41:49 2013 +0000
+@@ -11,7 +11,7 @@
+ Depends: ${shlibs:Depends}, ${misc:Depends},
+  libwww-perl,
+  libxml-feed-perl,
+- dl-libconfreader-perl,
++ libconfig-inifiles-perl,
+  liburi-perl,
+  libio-interactive-perl
+ Description: Podcast downloader and management system
+diff -r 6f13f90aaaee dlpodget
+--- a/dlpodget	Wed Feb 20 23:52:19 2013 +0000
++++ b/dlpodget	Thu Feb 21 20:41:49 2013 +0000
+@@ -34,6 +34,7 @@
+ use LWP::UserAgent;
+ use XML::Feed;
+ use Data::Dumper;
++use Config::IniFiles;
+ use Daybo::ConfReader;
+ use Getopt::Std;
+ use URI::Escape;
+@@ -176,7 +177,6 @@
+ 	my %feeds = ( );
+ 	my %opts = ( );
+ 	my %pids;
+-	my $confSeen = 0;
+ 	my @confFiles = (
+ 		'dlpodget.rc',
+ 		"$ENV{HOME}/.dlpodget.rc"
+@@ -186,16 +186,11 @@
+ 	$Debug = 1 if ( $opts{'d'} );
+ 	print(STDERR "Explicit debug mode enabled by -d\n") if ( $Debug );
+ 
+-	$conf = Daybo::ConfReader->new();
+ 	foreach my $confFile ( @confFiles ) {
+ 		next unless ( -f $confFile );
+-		if ( $conf->SetFn($confFile) ) {
+-			$conf->Reload();
+-			$confSeen++;
+-			last;
+-		}
++		$conf = Config::IniFiles->new( -file => $confFile );
++		last;
+ 	}
+-	$conf = undef if ( !$confSeen );
+ 
+ 	if ( $conf && $conf->GetKeys(undef, \@defKeys) ) {
+ 		if ( 'enable' ~~ @defKeys ) {