summaryrefslogtreecommitdiffstats
path: root/emacs.d/nxhtml/tests/in/bug495770-heredoc_demo.pl
blob: 562e6956a0dc0eada2ffd760fbc4a3c666a66cc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/perl
# heredoc_demo.pl                   doom@kzsu.stanford.edu
#                                   December 10, 2009

use warnings;
use strict;
$|=1;
use Data::Dumper;

use File::Path     qw( mkpath );
use File::Basename qw( fileparse basename dirname );
use File::Copy     qw( copy move );
use Fatal          qw( open close mkpath copy move );
use Cwd            qw( cwd abs_path );

use Env qw(HOME);

our $VERSION = 0.01;
my  $prog    = basename($0);

use Getopt::Std;
my %opt = ();
getopts('d', \%opt);
my $DEBUG   = $opt{d} || 1;   # TODO set default to 0 when in production

my ($title, $incantation, $god);

my $skull=<<"END_SQL";
  SELECT id, god, incantation
  FROM spell, pantheon
  WHERE pantheon.id = spell.pantheon AND
        pantheon.name = 'lovecraft'
END_SQL

my $phfftp=<<"END_HTML";
<HTML><HEAD><TITLE>$title</TITLE></HEAD>
<BODY>
<H2>$title</H2>
<P>Speak not the dread words of $incantation
lest ye invoke the $god.</P>
</BODY></HTML>
END_HTML

print $skull, "\n";
print $phfftp, "\n";

__END__

=head1 NAME

heredoc_demo.pl - (( TODO insert brief description ))

=head1 SYNOPSIS

  heredoc_demo.pl -[options] [arguments]

  Options:
     -d          debug

=head1 OPTIONS

=over 8

=item B<-d>

Turn on debug messages.

=back

=head1 DESCRIPTION

B<heredoc_demo.pl> is a script which

(( TODO  insert explaination
   This is stub documentation created by template.el.  ))

=head1 AUTHOR

Joseph Brenner, E<lt>doom@kzsu.stanford.eduE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2009 by Joseph Brenner

This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

=head1 BUGS

None reported... yet.

=cut