in reply to Re^2: HTML::Display help needed
in thread HTML::Display help needed

I'm always trying to improve my documentation. Currently, it says:

If HTML::Display already provides a class for the browser you want to use, setting PERL_HTML_DISPLAY_CLASS to the name of the class will make HTML::Display use that class instead of what it detects.

Maybe you can help me improve the documentation so it becomes clearer what to put in there.

Replies are listed 'Best First'.
Re^4: HTML::Display help needed
by gw1500se (Beadle) on Aug 21, 2008 at 13:39 UTC
    I'd be happy to try. I am not a perl guru so I don't really know what it means by 'class' in that context. What I would expect logically, is a variable or some way to determine the path to the desired browser that should be launched. That is what seems missing to me in the documentation. I don't know how to tell it to use IE or Firefox or whatever the default browser is. I assumed (yes this is a classic case of what that makes of 'u' and 'me') it had a way to determine it from the OS settings but apparently not. If that is the case then that complicates things as I believe finding the default browser would be a platform dependent function and better left as a configuration issue when using HTML::Display.

      Have you seen the PERL_HTML_DISPLAY_COMMAND documentation? It allows you to specify the browser to be launched.

        I saw this:

        If there is no specialized class yet, but your browser can be controlled via the command line, then setting PERL_HTML_DISPLAY_COMMAND to the string to navigate to the URL will make HTML::Display use a system() call to the string. A %s in the value will be replaced with the name of the temporary file containing the HTML to display.

        I don't understand it. Is it trying to say I should launch the browser from command line, then use PERL_HTML_DISPLAY_COMMAND as a scalar to pass the string? What do I pass to '$browser->display'?
Re^4: HTML::Display help needed
by jethro (Monsignor) on Aug 21, 2008 at 14:15 UTC

    The built-in OS class list of the module seems to be pretty small, no Fedora, Suse or Solaris for example (expandability is great when the script writer using your module knows where it will run, but if he wants an os-independant script, he wants as much built in as possible). I guess it was your intention to only look for THE one browser on any OS, sadly that leaves out those OS where there is no concept of THE browser. Otherwise a class array instead of the class hash would have been better to prioritize the available browsers

    Is there a way to find the standard browser on Suse or newer Solaris? Checking for firefox,mozilla,netscape or lynx on the PATH might be the only way to realiably find something on every version of these OS

    Sorry if that sounds too critical or nitpicky, otherwise a great little module