Perl executable showing html in default browser

Discussion in 'Perl Misc' started by Merijn Boom, Apr 9, 2005.

  1. Merijn Boom

    Merijn Boom Guest

    Hi,



    I would like to know is somebody has experience in showing HTML from a perl
    executable in the default browser and let that html interact with the perl
    executable via the browser. This is because we would like to convert some of
    our perl scripts (ActiveState) via the Activestate compiler in order to have
    some stand alone executables.



    Any help would be appreciated,



    Merijn
    Merijn Boom, Apr 9, 2005
    #1
    1. Advertising

  2. "Merijn Boom" <> wrote in
    news:4257f5e2$0$145$4all.nl:

    > I would like to know is somebody has experience in showing HTML from a
    > perl executable in the default browser and let that html interact with
    > the perl executable via the browser.


    What do you mean by "html interact with the perl executable"?

    Do you need

    http://search.cpan.org/~gaas/libwww-perl-5.803/lib/HTTP/Daemon.pm

    Sinan

    --
    A. Sinan Unur <>
    (reverse each component and remove .invalid for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
    A. Sinan Unur, Apr 9, 2005
    #2
    1. Advertising

  3. Merijn Boom

    John Bokma Guest

    Merijn Boom wrote:

    > Hi,
    >
    > I would like to know is somebody has experience in showing HTML from a
    > perl executable in the default browser and let that html interact with
    > the perl executable via the browser.


    I guess the only way to do it with a default browser is CGI.

    > This is because we would like to
    > convert some of our perl scripts (ActiveState) via the Activestate
    > compiler in order to have some stand alone executables.


    Check out PAR to get a Perl "executable". (It's a file with perl.exe and
    all you need in a single file which bootstraps Perl and your script).

    --
    John Small Perl scripts: http://johnbokma.com/perl/
    Perl programmer available: http://castleamber.com/
    Happy Customers: http://castleamber.com/testimonials.html
    John Bokma, Apr 9, 2005
    #3
  4. [Also multi-posted to clp. Don't do that, please]
    Merijn Boom wrote:
    > I would like to know is somebody has experience in showing HTML from
    > a perl executable in the default browser and let that html interact
    > with the perl executable via the browser.


    Typically people use the Common Gateway Interface for such kind of
    applications. You may want to ask in a NG that actually deals with CGI.

    If the HTML code is rendered by the browser or shown as text is (among other
    things) a matter of the HTTP header. You may want to ask in NG that actually
    deals with HTML and HTTP.

    > This is because we would
    > like to convert some of our perl scripts (ActiveState) via the
    > Activestate compiler in order to have some stand alone executables.


    The Common Gateway Interface doesn't care if the server side executable is a
    script or a compiled program. You may want to ask in a NG that actually
    deals with CGI.

    Having said that there is one caveat that is actually related to Perl.
    Typically Perl compilers didn't have a very good track record in the past,
    i.e. people used to have a lot of problems getting their compiled scripts to
    run. Now, this may have changed, so please take it with a grain of salt.

    Another question is _why_ you want to compile you scripts. If your intention
    is to hide you source code then I strongly recommend to read "perldoc -q
    hide"

    jue
    Jürgen Exner, Apr 9, 2005
    #4
  5. Merijn Boom

    Joe Smith Guest

    Merijn Boom wrote:

    > I would like to know is somebody has experience in showing HTML from

    a perl


    HTML is just text. A perl program can simply use print() statements
    to send HTML out whenever it is invoked.

    > perl executable in the default browser



    The server does not cause a brower to run.
    The browser is started first, then it contacts the server.

    > and let that html interact with the perl executable via the browser.



    You can't do that with plain HTML.
    You could do something like that by sending JavaScript or VBScript,
    but not quite. For the most part, the HTTP transaction from
    browser to server is already over by the time the server starts
    sending a response. Further interaction usually requires initiating
    a new connection to the server, which, even if using the same CGI
    as before, would be a different process on the server.

    > This is because we would like to convert some of our perl scripts

    (ActiveState) via the Active state compiler in order to have some stand
    alone executables.


    Non-sequiter. A fully functional perl script can be compiled,
    but compiling it does not make it more interactive than before.

    -Joe
    Joe Smith, Apr 11, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Merijn Boom
    Replies:
    1
    Views:
    2,686
    Jürgen Exner
    Apr 9, 2005
  2. Replies:
    15
    Views:
    474
    Dave Thompson
    Aug 21, 2006
  3. pratap
    Replies:
    20
    Views:
    745
    Flash Gordon
    Mar 7, 2007
  4. Jason Cavett
    Replies:
    8
    Views:
    605
    Sanjay
    May 16, 2007
  5. Replies:
    0
    Views:
    425
Loading...

Share This Page