Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of uninitialized value $1 in string eq at /usr/share/perl5/Text/Textile.pm line 89 #4

Open
nickleverton opened this issue Jul 29, 2011 · 3 comments

Comments

@nickleverton
Copy link

Similar problem to that noted by domm resulting in much noise printed to stderr.

--- /usr/share/perl5/Text/Textile.pm.orig 2009-08-08 19:20:45.000000000 +0100
+++ /usr/share/perl5/Text/Textile.pm 2011-07-29 14:21:57.000000000 +0100
@@ -86,7 +86,7 @@
my $flavor = shift;
$self->{flavor} = $flavor;
if ($flavor =~ m/^xhtml(\d)?(\D|$)/) {

  •        if ($1 eq '2') {
    
  •        if (defined $1 && $1 eq '2') {
             $self->{_line_open} = '<l>';
             $self->{_line_close} = '</l>';
             $self->{_blockcode_open} = '<blockcode>';
    
@nickleverton
Copy link
Author

360 days later the same issue bites me again on another new server :-( Pretty please could the fix be released ?

@bradchoate
Copy link
Owner

I'm not sure what the issue here is. Is the flavor method being called somewhere with an undefined value? A small bit of code that reproduces the warning would be helpful.

@nickleverton
Copy link
Author

Hi Brad,
Thanks for the reply, sorry didn't get back to you sooner as life intervened.
I have a CGI which uses the very excellent Text::Textile and sets flavour() to 'xhtml', which is a valid choice according to the docs. This causes the warning when a textile template is processed and flavour is matchedd by the above code, as $2 is null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants