bugs in lines 2541-2543 related to .man command.

Bug #304555 reported by Robb Munson
0
Affects Status Importance Assigned to Milestone
VoteBot
Fix Released
Low
Unassigned

Bug Description

[Tues Dec 2 21:14:33] <robb_m> .man apache2
Use of uninitialized value $description in scalar chomp at ./voteBot.pl line 2541.
Use of uninitialized value $description in substitution (s///) at ./voteBot.pl line 2542.
Use of uninitialized value $description in concatenation (.) or string at ./voteBot.pl line 2543.

Revision history for this message
Robb Munson (r.munson) wrote :

code in lines 2541-2543 are as followed:
 chomp $description;
 $description =~ s/\n.*//g;
 return "$name - $shortDesc // Synopsis: $synopsis // Description: $description";

Revision history for this message
Robb Munson (r.munson) wrote :

Here is a comment from one of the guys in #perl as to what happened

<ology> robb_m: Obviously, my ($description) = $content =~ m/<h3>DESCRIPTION<\/h3><pre>\s*(.*?)\s*<\/pre>/is; is not working. Also, don't parse HTML with regular expressions..

<ology> perl -wle'$_="<h3>DESCRIPTION<\/h3><pre> abc 123 <\/pre>"; print /<h3>DESCRIPTION<\/h3><pre>\s*(.*?)\s*<\/pre>/is ? "Y: $1" : "N"' # works just fine. $content is not what you think it is.

Revision history for this message
Nathan Handler (nhandler) wrote :
Changed in votebot:
importance: Undecided → Low
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.