initial commit
[emacs-init.git] / nxhtml / tests / in / bug495770-heredoc_demo.pl
1 #!/usr/bin/perl
2 # heredoc_demo.pl                   doom@kzsu.stanford.edu
3 #                                   December 10, 2009
4
5 use warnings;
6 use strict;
7 $|=1;
8 use Data::Dumper;
9
10 use File::Path     qw( mkpath );
11 use File::Basename qw( fileparse basename dirname );
12 use File::Copy     qw( copy move );
13 use Fatal          qw( open close mkpath copy move );
14 use Cwd            qw( cwd abs_path );
15
16 use Env qw(HOME);
17
18 our $VERSION = 0.01;
19 my  $prog    = basename($0);
20
21 use Getopt::Std;
22 my %opt = ();
23 getopts('d', \%opt);
24 my $DEBUG   = $opt{d} || 1;   # TODO set default to 0 when in production
25
26 my ($title, $incantation, $god);
27
28 my $skull=<<"END_SQL";
29   SELECT id, god, incantation
30   FROM spell, pantheon
31   WHERE pantheon.id = spell.pantheon AND
32         pantheon.name = 'lovecraft'
33 END_SQL
34
35 my $phfftp=<<"END_HTML";
36 <HTML><HEAD><TITLE>$title</TITLE></HEAD>
37 <BODY>
38 <H2>$title</H2>
39 <P>Speak not the dread words of $incantation
40 lest ye invoke the $god.</P>
41 </BODY></HTML>
42 END_HTML
43
44 print $skull, "\n";
45 print $phfftp, "\n";
46
47 __END__
48
49 =head1 NAME
50
51 heredoc_demo.pl - (( TODO insert brief description ))
52
53 =head1 SYNOPSIS
54
55   heredoc_demo.pl -[options] [arguments]
56
57   Options:
58      -d          debug
59
60 =head1 OPTIONS
61
62 =over 8
63
64 =item B<-d>
65
66 Turn on debug messages.
67
68 =back
69
70 =head1 DESCRIPTION
71
72 B<heredoc_demo.pl> is a script which
73
74 (( TODO  insert explaination
75    This is stub documentation created by template.el.  ))
76
77 =head1 AUTHOR
78
79 Joseph Brenner, E<lt>doom@kzsu.stanford.eduE<gt>
80
81 =head1 COPYRIGHT AND LICENSE
82
83 Copyright (C) 2009 by Joseph Brenner
84
85 This program is free software; you can redistribute it and/or modify it
86 under the terms of either: the GNU General Public License as published
87 by the Free Software Foundation; or the Artistic License.
88
89 See http://dev.perl.org/licenses/ for more information.
90
91 =head1 BUGS
92
93 None reported... yet.
94
95 =cut