#!/usr/local/bin/perl use strict; use lib '../lib'; use Data::Dumper; use Continuity::Widget::DomNode; my $n = Continuity::Widget::DomNode->create("hello"); print "n: " . Dumper($n); my @n = Continuity::Widget::DomNode->create("hello", "world"); print "n: " . Dumper(\@n); @n = Continuity::Widget::DomNode->create("hello" => { a => 'b' }); print "n: " . Dumper(\@n); @n = Continuity::Widget::DomNode->create(p => [ 'This is a test' ]); print "n: " . Dumper(\@n); print "Render: " . $n[0]->to_string . "\n"; $n = Continuity::Widget::DomNode->create( p => { id => 'fish', class => 'main' } => [ 'This is a test' ] ); print "n: " . Dumper($n); print "Render: " . $n->to_string . "\n"; $n = Continuity::Widget::DomNode->create( html => [ head => [ style => { src => '/css/style.css' }, script => { language => 'javascript', src => '/js/jquery.js' }, script => { language => 'javascript', src => '/js/app.js' }, ], body => [ p => { id => 'fish', class => 'main' } => [ 'This is a test' ] ] ] ); print "n: " . Dumper($n); print "Render: " . $n->to_string . "\n";