3 #=======================================================================
8 # ©opyleft 2006– Øyvind A. Holm <sunny@sunbase.org>
9 # License: GNU General Public License, see end of file for legal stuff.
10 #=======================================================================
28 $progname =~ s
#^.*/(.*?)$#$1#;
31 my $id_date = $rcs_id;
32 $id_date =~ s/^.*?\d+ (\d\d\d\d-.*?\d\d:\d\d:\d\d\S+).*/$1/;
34 Getopt
::Long
::Configure
("bundling");
36 "debug" => \
$Opt{'debug'},
37 "help|h" => \
$Opt{'help'},
38 "simple|s" => \
$Opt{'simple'},
39 "version" => \
$Opt{'version'},
40 ) || die("$progname: Option error. Use -h for help.\n");
42 $Opt{'debug'} && ($Debug = 1);
43 $Opt{'help'} && usage
(0);
44 $Opt{'version'} && print_version
();
47 print(postgresql_copy_safe
($_));
50 sub postgresql_copy_safe
{
54 if (!$Opt{'simple'}) {
61 } # postgresql_copy_safe()
64 # Print program version {{{
71 # Send the help message to stdout {{{
78 Usage: $progname [options] [file [files [...]]]
85 Don’t convert \\n, \\r or \\t, only backslashes.
87 Print version information.
89 Print debugging messages.
97 # Print a debugging message {{{
99 my @call_info = caller;
100 chomp(my $Txt = shift);
101 my $File = $call_info[1];
103 $File =~ s
#^.*/(.*?)$#$1#;
104 print(STDERR
"$File:$call_info[2] $$ $Txt\n");
111 # Plain Old Documentation (POD) {{{
125 [options] [file [files [...]]]
135 =item B<-h>, B<--help>
137 Print a brief help summary.
141 Print version information.
145 Print debugging messages.
155 Made by Øyvind A. Holm S<E<lt>sunny@sunbase.orgE<gt>>.
159 Copyleft © Øyvind A. Holm <sunny@sunbase.org>
160 This is free software; see the file F<COPYING> for legalese stuff.
164 This program is free software; you can redistribute it and/or modify it
165 under the terms of the GNU General Public License as published by the
166 Free Software Foundation; either version 2 of the License, or (at your
167 option) any later version.
169 This program is distributed in the hope that it will be useful, but
170 WITHOUT ANY WARRANTY; without even the implied warranty of
171 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
172 See the GNU General Public License for more details.
174 You should have received a copy of the GNU General Public License along
175 with this program; if not, write to the Free Software Foundation, Inc.,
176 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
184 # vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :