Builder

Build XML, HTML, CSS and other outputs in blocks
Download

Builder Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Barry Walsh
  • Publisher web site:
  • http://search.cpan.org/dist/

Builder Tags


Builder Description

Build XML, HTML, CSS and other outputs in blocks Builder will be exactly what you you've always been waiting for, if you need to build structured output.Just select and/or tailor the blocks you need then simply click them all together to construct the output of your dreams!SYNOPSISSimple example.... use Builder; my $builder = Builder->new; my $xm = $builder->block( 'Builder::XML' ); $xm->parent( $xm->child( 'Hi Mum!' ) ); say $builder->render; # => < parent >< child >Hi Mum!< /child >< /parent >Another example using same block object.... $xm->body( $xm->div( $xm->span( { id => 1 }, 'one' ), $xm->span( { id => 2 }, 'two' ), ), ); say $builder->render; # => < body >< div >< span id="1" >one< /span >< span id="2" >two< /span >< /div >< /body >And finally something a bit more whizzy.... my $rainbow = $builder->block( 'Builder::XML', { indent => 4, newline => 1 } ); $rainbow->colours( sub { for my $colour qw/red green blue/ { $rainbow->$colour( uc $colour ); } }); say $builder->render; # < colours > # < red >RED< /red > # < green >GREEN< /green > # < blue >BLUE< /blue > # < /colours > Requirements: · Perl


Builder Related Software