develooper Front page | perl.perl5.porters | Postings from November 2004

[perl #32686] and extensions like "mark-symlinked-directories"

paul . fardy @ utoronto . ca
November 29, 2004 14:56
[perl #32686] and extensions like "mark-symlinked-directories"
Message ID:
# New Ticket Created by 
# Please include the string:  [perl #32686]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.34 running under perl v5.8.0.

[Please enter your report here]

It appears that Red Hat's distributed /etc/inputrc contains

	set mark-symlinked-directories on

which Term::ReadLine::readline does not currently recognize.
I presume that many other GNU systems may be use this (or other)
readline extensions.

As a result, use of Term::ReadLine generates complaints:

	Undefined value assigned to typeglob at (eval 11) line 15, <RC> line 11.
	Warning [/etc/inputrc line 11]:
	  Invalid variable `mark-symlinked-directories'

The warning is only presented in "if $^W", but that's always when you
believe that "-w is optional" is a bug as the man page once said. :-)
Moreover, the "Undefined value ..." message is redundant and unfriendly
to the typical user.

[ Even the latter message is a bit obscure, for that matter.  'What
  the heck is "/etc/inputrc"?'  But that's hardly something Perl can
  change. :-) ]

Still, there are two considerations:

The Lesser: can be updated to support the new variables?
    A few extra default values would fix things, ... for now.

The Greater: can be updated to handle such extensions more
   (1) an option to allow "no warnings" within readline alone.
   (2) a patch (provided) to removed the "Undefined value ..." message:
   	Test the value before using it:

       local(*V) = $ {'readline::'}{"var_$_"};   # generates warning
       if (!defined($V)) {
	  	warn "Warning: ...";

	  unless (defined ${'readline::'}{"var_$_"}) {
	  	warn "Warning: ...";
       local(*V) = $ {'readline::'}{"var_$_"};   # won't generate warning

   It would also be useful to have lint-like extended comments in the input
   file.  In /etc/inputrc

   	# :perl: Term::ReadLine allow mark-symlinked-directories 
	set mark-symlinked-directories on

   but that would be stuff of wishes or, at least, the wishlist category. :-)

Thanks for your time,

-- Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About