in reply to Re^2: how to open browser window with given URL on MacOSX?
in thread how to open browser window with given URL on MacOSX?

Sure
$$ perldoc HTML::Display::TempFile

NAME
    HTML::Display::TempFile - base class to display HTML via a temporary
    file

SYNOPSIS
      package HTML::Display::External;
      use base 'HTML::Display::TempFile';

      sub browsercmd {
        # Return the string to pass to system()
        # %s will be replaced by the temp file name
      };
Replace file with url and you're in business. All the modules such as
HTML::Display::Galeon
HTML::Display::Mozilla
HTML::Display::Opera
HTML::Display::OSX
HTML::Display::Debian
HTML::Display::Phoenix
HTML::Display::Win32
provide this which is what the author is after.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

  • Comment on Re: Re^2: how to open browser window with given URL on MacOSX?

Replies are listed 'Best First'.
Re^4: how to open browser window with given URL on MacOSX?
by adrianh (Chancellor) on Apr 26, 2004 at 13:54 UTC
    Replace file with url and you're in business

    It'll do what the OP wants in the Mac OS X case, but isn't that just a side effect of the implementation of a specific HTML::Display subclass? Opening URLs doesn't appear to be part of the official API.

    All the modules such as ... provide this which is what the author is after.

    It won't work in all cases. For example HTML::Display::Win32::IE appears to push HTML straight to the browser from Perl. No filenames, let alone URLs involved.