I've run into some problems with the latest version of HTML::AsSubs
that I hope people here can help me out with. First, I believe that
the "header" tag in the @TAGS array should be "head". Second, if I
create a string of AsSubs calls and invoke eval() on the string,
instead of generating the page, I now get a hash reference (b7
produced "correct" output, at least from my point of view). Here's
some sample code, and its output:
#!/usr/local/bin/perl -w
require 5.002;
use strict;
use HTML::AsSubs;
my ($title) = "Page Title";
my ($page) = "html(head(title(\"$title\"),"
. "link({rev=>'made', href=>'mailto:Eric.J.Bivona\@Dartmouth.EDU'})"
. "),body(h2(\"$title\"),"
. "p('This page contains links to various information resources that are listed in the DCIS Navigator. Links to DCIS/InfoSpeak resources go through a DCIS/WWW gateway. The gateway is Copyright 1994-1996 by the Trustees of Dartmouth College. It was written by Eric J. Bivona and Paul Merchant, Jr.'),"
. "p(em('These resources require a forms-capable browser to use.')),";
# Other stuff gets appended to $page
$page .= "))";
my ($result);
die "eval($page): $@"
unless (defined(($result = eval($page))));
print $result;
0;
And here is the output, using LWP 5b7:
This page contains links to various information resources that are listed in the DCIS Navigator. Links to DCIS/InfoSpeak resources go through a DCIS/WWW gateway. The gateway is Copyright 1994-1996 by the Trustees of Dartmouth College. It was written by Eric J. Bivona and Paul Merchant, Jr.
These resources require a forms-capable browser to use.
This is the output with LWP 5b10: HTML::Element=HASH(0x1400d4098) Any suggestions as to what I might need to change would be greatly appreciated! -Eric Bivona Dartmouth College