Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Help with proper construction of callable scalars from a Module, please.

by taint (Chaplain)
on Nov 13, 2013 at 15:59 UTC ( [id://1062407]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Help with proper construction of callable scalars from a Module, please.
in thread Help with proper construction of callable scalars from a Module, please.

Revized edition:

Seems in my initial frustration with accomplishing such a simple task. I ultimately overcomplicated matters. :(
I think the following get's it right:
pageblocks.pm

use strict; package pageblocks; sub xmlheader { qq(<?xml version="1.0" encoding="UTF-8"?>\n); } sub xmldtd { qq(<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http: +//www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="application/xhtml+xml; ch +arset=utf-8" />\n); } 1; # polygraph
and index.cgi
#!/usr/bin/perl -wT # index.cgi print "content-type:text/html; charset=utf-8\n\n"; use strict; use lib ('./'); use pageblocks; print pageblocks::xmlheader(); print pageblocks::xmldtd(); print "<body> ... </body></html>";

A big thanks to GrandFather, Jenda, and Anonymous Monk, for their thoughtful feedback.

--Chris

#!/usr/bin/perl -Tw
use Perl::Always or die;
my $perl_version = (5.12.5);
print $perl_version;

Replies are listed 'Best First'.
Re^4: Help with proper construction of callable scalars from a Module, please.
by taint (Chaplain) on Nov 13, 2013 at 19:03 UTC
    Crap! Next time I'll use PREVIEW first.

    ...and a big thanks also to ig!

    --Chris

    #!/usr/bin/perl -Tw
    use Perl::Always or die;
    my $perl_version = (5.12.5);
    print $perl_version;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1062407]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-23 12:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found