John Sequeira

Amped::Technology
John Sequeira's weblog: enterprise application development, typed weakly.

Thursday, May 05, 2005
You can Fiddle

with firefox, too.
9:29:56 AM      comment []  trackback []
Amped::On::IO::All

Here's a code snippet that uses CPAN module IO::All to return a pdf of a dynamic HTML page to the browser. IO::All demonstrates the potential for API simplication w/operator overloading when applied to something mundane like file access:

    my $fname = ('?'); # create temp file handle
    my $htmldoc = io("| $htmldoc  -t pdf14 -f $fname --datadir $htmldoc_dir --footer t/D  -")   
      or $logger->fatal( "Couldn't open htmldoc: $! $?" );
    $html > $htmldoc;  # pass string to pipe
    $htmldoc->close();
        
    my $pdf = io($fname);    
    my $binary = $pdf->binary->scalar; # slurp up output pdf file
    $pdf->unlink();  #delete temp file
    $pdf->close();
    
    return $binary;

IO::All author Ingy has done some really good work smoothing over the rough corners of perl. If that's something that interests you, I suggest looking over two of his other modules: Spiffy and YAML. The ajax-enthusiasts are discovering the YAML-subset JSON ... so maybe it will get some of the popularity it deserves.
9:24:51 AM      comment []  trackback []

Why Tables for Layout is Stupid

This presentation may be a couple of years old, but some of the smartest programmers I know (myself included!) never quite got around to taking a look at CSS for layout.

I'm not much of a 'front-end' guy, but sometimes it has to be done. Justification + some helpful hints on doing it right (i.e. w/css).

(via Tucows Developer Hangout)
9:21:40 AM      comment []  trackback []


© Copyright 2005 John Sequeira.
 
May 2005
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Apr   Jun

Click to see the XML version of this web page.
Click here to send an email to the editor of this weblog.
Yahoo: johnseq2
MSN: john_seq@hotmail.com
AIM: amped02139
Skype: johnjulian