Debian Codegraph @

anybrowser

raw
1 #!/usr/bin/env perl
2 # -*- perl -*-
3
4 #
5 # $Id: anybrowser,v 1.2 2003/02/05 16:41:10 eserte Exp $
6 # Author: Slaven Rezic
7 #
8 # Copyright (C) 2002 Slaven Rezic. All rights reserved.
9 # This package is free software; you can redistribute it and/or
10 # modify it under the same terms as Perl itself.
11 #
12 # Mail: [email protected]
13 # WWW: http://www.rezic.de/eserte/
14 #
15
16 use WWWBrowser;
17
18 require Getopt::Long;
19 my @extra_args;
20 if (!Getopt::Long::GetOptions
21 ("-browser=s" => sub { push @extra_args, -browser => $_[1] },
22 "-fork!" => \$WWWBrowser::fork,
23 "-oldwindow!" => sub { push @extra_args, -oldwindow => 1 },
24 )) {
25 die "usage: $^X $0 [-browser browser] [-[no]fork] [-oldwindow]\n"
26 }
27
28 WWWBrowser::start_browser($ARGV[0], @extra_args);
29
30 __END__