$r->ar->status($status);
$r->ar->headers_out->set('Location' => $redirect_url);
- $r->output('<html><head><title>redirecting...</title></head><body><h2>redirecting..</h2></body></html>') unless ($r->output)
+ $r->output('<html><head><title>redirecting...</title></head><body><h2>redirecting..</h2></body></html>') unless ($r->output);
return OK;
}
#!/usr/bin/perl -w
use Test::More;
+use Data::Dumper;
use lib 'examples'; # Where BeerDB should live
BEGIN {
$ENV{BEERDB_DEBUG} = 0;
"Got frontpage, trailing '/' on uri_base but not request");
like(BeerDB->call_url("http://localhost/beerdb/beer/list"), qr/Organic Best/, "Found a beer in the list");
-my (%classdata)=split /\n/, BeerDB->call_url("http://localhost/beerdb/beer/classdata");
+
+my $classdata_page = BeerDB->call_url("http://localhost/beerdb/beer/classdata");
+my (%classdata)=split /\n+/, $classdata_page;
+#warn $classdata_page;
+#warn Dumper(%classdata);
+
is ($classdata{plural},'beers','classdata.plural');
is ($classdata{moniker},'beer','classdata.moniker');
like ($classdata{cgi},qr/^HTML::Element/,'classdata.cgi');
name
+
[% classmetadata.name %]
+
table
+
[% classmetadata.table %]
+
columns
+
[% classmetadata.columns.join(' ')%]
+
list_columns
+
[% classmetadata.list_columns.join(' ') %]
+
colnames
+
[% classmetadata.colnames.abv %]
+
related_accessors
+
[% classmetadata.related_accessors.join(' ') %]
+
moniker
+
[% classmetadata.moniker %]
+
plural
+
[% classmetadata.plural %]
+
cgi
+
[% classmetadata.cgi.abv%]