#!/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__