29 May 2019 16:58:04 UTC
- Distribution: Browser-Start
- Module version: 0.01
- Source (raw)
- Browse (raw)
- How to Contribute
- Repository (git clone)
- Issues (1)
- Testers (170 / 381 / 0)
- KwaliteeBus factor: 1
- % Coverage
- License: perl_5
- Perl: v5.8.1
- Activity24 month
- Download (14.53KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
Browser::Start - Open a URL in a web browser
use Browser::Start; open_url 'http://metacpan.org';
Simple interface for opening a URL in a browser appropriate for the system and user configuration.
Opens the given URL in a browser. If this module doesn't know how to open a URL in your configuration or if this module can determine that the URL didn't open correctly then an exception will be thrown.
This function is fire-and-forget, that is it won't interrupt your script. The browser should open the URL in a separate windows, or tab of an existing window.
There is a lot of variability in environments, so doing this correctly everywhere is a huge challenge. The distribution for this module will do what it can to fail loudly when it knows it won't work, rather than silently fail, so you may at least to some extent rely on this module if it installed correctly.
Some environments may be configured to use non-browsers for some URL times. An FTP or sftp URL might open in some sort of file transfer client.
This module provides a similar functionality.
It doesn't support some platforms like OpenBSD and NetBSD which honestly should be treated similar to Linux and FreeBSD.
It is more aggressive than I think it should be about choosing specific browsers that may or may not have been configured by users or normal system defaults.
It may open URLs using console browsers like
lynxwhich can muck up your Perl script.
Graham Ollis <email@example.com>
This software is copyright (c) 2019 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Browser::Start, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Browser::Start
For more information on module installation, please visit the detailed CPAN module installation guide.