Skip Menu |

This queue is for tickets about the HTML-Rainbow CPAN distribution.

Report information
The Basics
Id: 39906
Status: open
Priority: 0/
Queue: HTML-Rainbow

People
Owner: dland [...] cpan.org
Requestors: david [...] davidfavor.com
Cc:
AdminCc:

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



Subject: HTML::Rainbow example broken
Date: Wed, 08 Oct 2008 20:24:00 -0500
To: bug-HTML-Rainbow [...] rt.cpan.org
From: David Favor <david [...] davidfavor.com>
The example: use HTML::Rainbow 'rainbow'; print rainbow('hello, world'); produces no output. Please let me know what other code should be included... like 'use CGI' maybe? -- Love feeling your best ever, all day, every day? Click http://RadicalHealth.com/join for the easy way.
On Wed Oct 08 21:24:27 2008, david@davidfavor.com wrote: Show quoted text
> The example: > > use HTML::Rainbow 'rainbow'; > print rainbow('hello, world'); > > produces no output.
oops! how embarrasing! use HTML::Rainbow, my $r=HTML::Rainbow->new; print $r->rainbow('hello, world'); That will at least produce something. I shall have to fix the module so that it adheres to the documentation.
Subject: Re: [rt.cpan.org #39906] HTML::Rainbow example broken
Date: Fri, 10 Oct 2008 09:02:13 -0500
To: bug-HTML-Rainbow [...] rt.cpan.org
From: David Favor <david [...] davidfavor.com>
David Landgren via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=39906 > > > On Wed Oct 08 21:24:27 2008, david@davidfavor.com wrote:
>> The example: >> >> use HTML::Rainbow 'rainbow'; >> print rainbow('hello, world'); >> >> produces no output.
> > oops! how embarrasing! > > use HTML::Rainbow, > my $r=HTML::Rainbow->new; > print $r->rainbow('hello, world'); > > That will at least produce something. I shall have to fix the module so > that it adheres to the documentation.
This does produce an HTML fragment now I recommend you expand your example to include 'use CGI;' and to set the DTD so the output is a fully formed web page which validates. Or add this as an additional example. Also, let me know if there's an easy way to have the colors returned as an array, rather than embedded in font tags. Thanks! -- Love feeling your best ever, all day, every day? Click http://RadicalHealth.com/join for the easy way.
Subject: Re: [rt.cpan.org #39906] HTML::Rainbow example suggestion
Date: Fri, 10 Oct 2008 09:58:25 -0500
To: bug-HTML-Rainbow [...] rt.cpan.org
From: David Favor <david [...] davidfavor.com>
Maybe something like the following, only using the (-dtd=>...) header parameter, so the page validates. Since I only use XHTML and the CGI docs are less than clear, I'm unsure how to specify a DOCTYPE which will validate the type of code output by HTML::Rainbow. Show quoted text
_______ #!/usr/local/bin/perl use strict; use warnings; use CGI qw/-compile :standard/; use CGI::Carp qw/fatalsToBrowser warningsToBrowser/; use HTML::Rainbow qw/rainbow/; my $r = HTML::Rainbow->new; my @html = $r->rainbow('Hello world!'); print header(-Status => '200'), start_html('File Dump'), @html, end_html(); -- Love feeling your best ever, all day, every day? Click http://RadicalHealth.com/join for the easy way.
Subject: Re: [rt.cpan.org #39906] HTML::Rainbow - one more question
Date: Fri, 10 Oct 2008 10:00:46 -0500
To: bug-HTML-Rainbow [...] rt.cpan.org
From: David Favor <david [...] davidfavor.com>
Send me the code fragment you used to create the color text in the CPAN entry for the string: Perl is a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for many system management tasks. The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal). as shown on at the URL: http://search.cpan.org/~dland/HTML-Rainbow-0.05/Rainbow.pm Thanks! -- Love feeling your best ever, all day, every day? Click http://RadicalHealth.com/join for the easy way.