Skip Menu |

This queue is for tickets about the Acme-Curses-Marquee CPAN distribution.

Report information
The Basics
Id: 31672
Status: new
Priority: 0/
Queue: Acme-Curses-Marquee

People
Owner: Nobody in particular
Requestors: jpierce [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.0
Fixed in: (no value)



Subject: Fatal typo
The call to generate the figlet rendered fails to generate anything because of a typo where text() is called with srctext. The module also does not work because figlet is not called with -A Attached is a patch which fixes this problem and a design flaw. P.S. What is the hardcoded factor of 12 in the width?
Subject: Marquee.patch
--- /tmp/Marquee.pm Sun Jul 3 02:46:51 2005 +++ ~/belg4mit/lib/perl5/site_perl/5.8.4/Acme/Curses/Marquee.pm Tue Dec 18 20:41:51 2007 @@ -87,7 +87,7 @@ active => 0, }, $class; - $self->text($self->{srctext}) if (defined $self->{srctxt}); + $self->text() if (defined $self->{srctxt}); return $self; } @@ -139,13 +139,13 @@ =cut sub text { - my ($self,$text) = @_; + my $self = shift; my $font = $self->{font}; - my $width = length($text) * 12; + my $width = length($self->{srctxt}) * 12; my $line = 0; # render text via figlet - my @fig = split(/\n/,`figlet -f $font -w $width '$text'`); + my @fig = split(/\n/,`figlet -f $font -w $width -A '$self->{srctxt}'`); # find longest line length foreach my $i (0..(@fig - 1)) { @@ -165,7 +165,6 @@ $self->{active} = 1; $self->{offset} = 0; - $self->{srctxt} = $text; $self->{txtlen} = length($fig[0]); $self->{figtxt} = \@fig; }