diff _test/any.pl @ 18:818c74b038ae

DOM Schema + tests
author Sergey
date Thu, 10 Sep 2009 17:42:47 +0400
parents 75980091813b
children 1828103371d0
line wrap: on
line diff
--- a/_test/any.pl	Wed Sep 09 17:43:31 2009 +0400
+++ b/_test/any.pl	Thu Sep 10 17:42:47 2009 +0400
@@ -1,19 +1,10 @@
 #!/usr/bin/perl -w
-#use strict;
+use strict;
 
-use HTML::Element;
-$a = HTML::Element->new('a', href => 'http://www.perl.com/');
-$a->push_content("The Perl Homepage");
+my @data = (1,2,3,4);
 
-$tag = $a->tag;
-print "$tag starts out as:",  $a->starttag, "\n";
-print "$tag ends as:",  $a->endtag, "\n";
-print "$tag\'s href attribute is: ", $a->attr('href'), "\n";
+sub func {
+    return \@data;
+}
 
-$links_r = $a->extract_links();
-print "Hey, I found ", scalar(@$links_r), " links.\n";
-
-print "And that, as HTML, is: ", $a->as_HTML, "\n";
-$a = $a->delete;
-
-
+print "$_\n" and $data[3]=0 foreach @{func()};