Rt --help barfs

In a post to the rt-user list in March 2004, Jesse responds to a user requesting
CLI docs with:

/opt/rt3/bin/rt --help

When I do the above in RT (3.0.11, I think), I get:

	mystation:~# /opt/rt3/bin/rt --help
	Variable "%help" is not imported at /opt/rt3/bin/rt line 139.
	(Did you mean &help instead?)
	Variable "%help" is not imported at /opt/rt3/bin/rt line 144.
	(Did you mean &help instead?)
	Variable "%help" is not imported at /opt/rt3/bin/rt line 155.
	(Did you mean &help instead?)
	Variable "%help" is not imported at /opt/rt3/bin/rt line 166.
	(Did you mean &help instead?)
	Global symbol "$type" requires explicit package name at /opt/rt3/bin/rt line 136.
	Global symbol "%help" requires explicit package name at /opt/rt3/bin/rt line 139.
	Global symbol "$key" requires explicit package name at /opt/rt3/bin/rt line 139.
	Global symbol "$key" requires explicit package name at /opt/rt3/bin/rt line 141.
	Global symbol "%help" requires explicit package name at /opt/rt3/bin/rt line 144.
	Global symbol "$key" requires explicit package name at /opt/rt3/bin/rt line 144.
	Global symbol "$type" requires explicit package name at /opt/rt3/bin/rt line 149.
	Global symbol "$key" requires explicit package name at /opt/rt3/bin/rt line 150.
	Global symbol "$type" requires explicit package name at /opt/rt3/bin/rt line 150.
	Global symbol "$key" requires explicit package name at /opt/rt3/bin/rt line 152.
	Global symbol "$type" requires explicit package name at /opt/rt3/bin/rt line 152.
	Global symbol "%help" requires explicit package name at /opt/rt3/bin/rt line 155.
	Global symbol "$key" requires explicit package name at /opt/rt3/bin/rt line 155.
	Global symbol "$type" requires explicit package name at /opt/rt3/bin/rt line 156.
	Global symbol "$key" requires explicit package name at /opt/rt3/bin/rt line 157.
	Global symbol "$type" requires explicit package name at /opt/rt3/bin/rt line 157.
	Global symbol "$key" requires explicit package name at /opt/rt3/bin/rt line 157.
	Global symbol "$key" requires explicit package name at /opt/rt3/bin/rt line 158.
	Global symbol "$key" requires explicit package name at /opt/rt3/bin/rt line 158.
	Global symbol "$type" requires explicit package name at /opt/rt3/bin/rt line 158.
	Global symbol "$key" requires explicit package name at /opt/rt3/bin/rt line 159.
	Global symbol "$key" requires explicit package name at /opt/rt3/bin/rt line 162.
	Global symbol "%help" requires explicit package name at /opt/rt3/bin/rt line 166.
	Global symbol "$key" requires explicit package name at /opt/rt3/bin/rt line 166.
	Unmatched right curly bracket at /opt/rt3/bin/rt line 167, at end of line
	/opt/rt3/bin/rt has too many errors.

What does it mean?

Jens

Hello Jens,

Jens Porup wrote:

In a post to the rt-user list in March 2004, Jesse responds to a user requesting
CLI docs with:

/opt/rt3/bin/rt --help

When I do the above in RT (3.0.11, I think), I get:

There is a known bug in rt-cli:

*** /opt/rt3/bin/rt.ORIG
— /opt/rt3/bin/rt
*** 129,133 ****
$help{$title} = $item->[2]{Text};
}

  • }
     }
    

— 129,132 ----

This should fix it.

Best regards,

Ruediger Riediger

Dr. Ruediger Riediger Sun Microsystems GmbH
NSG - SunCERT Komturstr. 18a
mailto:Ruediger.Riediger@Sun.com D-12099 Berlin
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
PGP 2048RSA/0x2C5020E9 964C E189 0FF0 8882 2BAB 65E2 6912 1FF2

Jens Porup wrote:

/opt/rt3/bin/rt --help

When I do the above in RT (3.0.11, I think), I get:

There is a known bug in rt-cli:

*** /opt/rt3/bin/rt.ORIG
— /opt/rt3/bin/rt


*** 129,133 ****
$help{$title} = $item->[2]{Text};
}

  • }
    }

— 129,132 ----

This should fix it.

Thanks!

…but when I run rt --help, I still get:

Modification of a read-only value attempted at /usr/bin/rt line 1128.

Ideas?

Jens

…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.

  • Jason

…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

[snip]
This should fix it.

Thanks!

…but when I run rt --help, I still get:

Modification of a read-only value attempted at /usr/bin/rt line 1128.

Ideas?

Do You have an .rtrc for the user calling rt? I had to create one (an
empty one) to actually get at the help texts that told me what to put
inside.

Regards,
Harald