File: anybrowser

package info (click to toggle)
libwwwbrowser-perl 2.23-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 124 kB
  • sloc: perl: 580; makefile: 7
file content (30 lines) | stat: -r-xr-xr-x 754 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/env perl
# -*- perl -*-

#
# $Id: anybrowser,v 1.2 2003/02/05 16:41:10 eserte Exp $
# Author: Slaven Rezic
#
# Copyright (C) 2002 Slaven Rezic. All rights reserved.
# This package is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# Mail: slaven@rezic.de
# WWW:  http://www.rezic.de/eserte/
#

use WWWBrowser;

require Getopt::Long;
my @extra_args;
if (!Getopt::Long::GetOptions
    ("-browser=s"  => sub { push @extra_args, -browser => $_[1] },
     "-fork!"      => \$WWWBrowser::fork,
     "-oldwindow!" => sub { push @extra_args, -oldwindow => 1 },
    )) {
    die "usage: $^X $0 [-browser browser] [-[no]fork] [-oldwindow]\n"
}

WWWBrowser::start_browser($ARGV[0], @extra_args);

__END__