[rt-users] rt --help barfs

Jens Porup jens at cyber.com.au
Thu Sep 9 01:04:39 EDT 2004


On Thu, Sep 09, 2004 at 12:34:53AM -0400, Jason Parsons wrote:
> 
> >...but when I run rt --help, I still get:
> >
> >	Modification of a read-only value attempted at /usr/bin/rt line 1128.
> 
> 
> Go to line 1126, and add:
>  local $_;
> 
> Sorry, don't have a patch (or, for that matter, the source) in front of 
> me, but I'm pretty sure the above will resolve your issue.

Thanks for the suggestion, but I'm afraid it didn't work. 

I tried adding 'local $_;' where you suggested, and also at lines 1127
and 1128 (inside the do loop and inside the while loop).

This is the sub in questions:

# Makes a hash of the specified configuration file.
sub parse_config_file {
	my %cfg;
	my ($file) = @_;

	open(CFG, $file) && do {
		while (<CFG>) {
			chomp;
			next if (/^#/ || /^\s*$/);

			if (/^(user|passwd|server|query|orderby)\s+(.*)\s?$/) {
				$cfg{$1} = $2; 
			}
			else {
				die "rt: $file:$.: unknown configuration directive.\n";
			}
		}
	};

	return %cfg;
}

Jens



More information about the rt-users mailing list