WWWBrowser(3pm)

πŸ“¦
version 2.23 Β· 2 versions
  • 2.23 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 2.23 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– WWWBrowser β€” the manual, but make it make sense πŸ’–

okay so bestie, welcome to WWWBrowser β€” it's a Perl module (that's the 3pm part, periodt) that gives you a platform independent way to start a WWW browser. that's literally the whole job. it's giving "universal remote but for browsers" ✨


🌸 SYNOPSIS 🌸

use WWWBrowser;
WWWBrowser::start_browser($url, -oldwindow => 1);

like… that's it. that's the whole vibe. load it, call it, browser go brrr πŸ¦‹


✨ DESCRIPTION ✨

πŸŽ€ start_browser($url [, %args])

Start a web browser with the specified URL. and the important part β€” the process is started in background, so it does NOT sit there blocking you like an ex in your DMs. πŸ’…

The following optional parameters are recognized:

  • -oldwindow => $bool β€” Normally, the URL is loaded into a new window, if possible. But with -oldwindow set to a false value, WWWBrowser will try to re-use a browser window instead. no new window, we're recycling, we're being sustainable 🌱
  • -browser => $browser β€” Use (preferably) the named browser $browser. Peep the CONFIGURATION section below for some browser specialities, because some browsers have ✨quirks✨. Heads up though: this option will only work for unix. not unix? no dice. πŸ™ˆ

🌈 CONFIGURATION 🌈

For unix, the global variable @WWWBrowser::unix_browsers can be set to a list of preferred web browsers. rank them. give them a tier list. go off. πŸ‘‘

The following browsers are handled specially:

  • lynx, w3m β€” Text oriented browsers, which are opened in an xterm, kvt or gnome-terminal (if running under X11). And if you're not running under X11? then no background process is started. full stop. 🫢
  • kfmclient β€” Use openURL method of kfm.
  • netscape β€” Use -remote option to re-use a running netscape process, if possible. iconic behavior honestly.
  • _default_gnome β€” Look into the ~/.gnome/Gnome configuration file for the right browser. it's giving detective work πŸ”
  • _default_kde β€” NYI. that's "not yet implemented" bestie, don't come for me πŸ’€

The following variables can be defined globally in the main package:

  • $os β€” Short name of operating system (win, mac or unix).
  • &status_messages β€” Error handling function (instead of default warn). so you can handle your errors your way, main character energy 😌

⭐ REQUIREMENTS ⭐

For Windows, the Win32Util module should be installed in the path. windows girlies, do not forget this one, fr fr. πŸ“


πŸ’œ AUTHOR πŸ’œ

Slaven Rezic <slaven@rezic.de>


Copyright (c) 1999,2000,2001,2003 Slaven Rezic. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


πŸ¦‹ SEE ALSO πŸ¦‹

Win32Util.


no cap, that's genuinely the whole page. every flag, every variable, every quirk, all present and accounted for. πŸ’–

and a lil sign-off for the road: this beauty is from perl v5.34.0, dated 2022-06-28, and it answers to the name WWWBrowser(3pm). mwah πŸ’…βœ¨

πŸ“¦ where this page comes from