Skip Menu |

This queue is for tickets about the Config-INI-Simple CPAN distribution.

Report information
The Basics
Id: 21073
Status: new
Priority: 0/
Queue: Config-INI-Simple

People
Owner: Nobody in particular
Requestors: jeffrey_connelly [...] agilent.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Remove extra print statements (for using Config::INI::Simple in CGI scripts)
Date: Fri, 18 Aug 2006 16:11:03 -0600
To: <bug-Config-INI-Simple [...] rt.cpan.org>
From: <jeffrey_connelly [...] agilent.com>
Greetings, The patch at the end of this file simply removes the superfluous print statements in Config::INI::Simple, a change that is useful because it allows the module to be used in CGI scripts. If the extra print statements are left in, "Checking key..." etc. is sent to the web server--which can be disastrous if CGI::header() has not yet been called. Thanks for the nifty module. Jeff Connelly Agilent Technologies, Inc. ==Config::INI::Simple-print.patch== --- Simple.pm.orig 2006-08-18 14:46:03.000000000 -0500 +++ Simple.pm 2006-08-17 10:50:33.000000000 -0500 @@ -136,17 +136,14 @@ if ($self->{__append__} == 1) { foreach my $key (keys %{$self}) { next if $key =~ /^__.*?__$/i; - print "Checking key $key (ref = " . ref($key) . ")\n"; if (!exists $used->{$key}) { - print "Block doesn't exist!\n"; push (@new, ""); push (@new, "[$key]"); } foreach my $lab (keys %{$self->{$key}}) { if (!exists $used->{$key}->{$lab}) { - print "Adding $lab=$self->{$key}->{$lab} to INI\n"; push (@new, "$lab=$self->{$key}->{$lab}"); } }