Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: Packaging Perl Programs (is) Painful

by thunders (Priest)
on Sep 04, 2010 at 23:08 UTC ( [id://858895]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Packaging Perl Programs (is) Painful
in thread Packaging Perl Programs (is) Painful

I have a C++/Java background from my university days, so that may have colored my advice a bit. Generally I have a pretty easy time of learning new languages, but I will gladly concede that I can solve most tasks more quickly in Perl than Java or C#, and certainly faster than with C++.

Indeed I have tried half a dozen different perl web frameworks from Mason to CGI::Application to my own custom mod_perl dispatcher before settling on Catalyst.

I also accept your assertion that perl GUI programming has advanced since the last time I threw up my hands in frustration :-)

I have tried several of those GUI solutions. I don't want to minimize any of the hard work people have done on those projects, but I will say that several of the toolkits mentioned are incomplete in terms of documentation or functionality, others have a wildly non-native or primitive look and feel(Tk, Prima, Fltk), and others simply will not build via CPAN on windows, at least not without serious tweaking(PerlQt, and GTK2::GladeXML both fell into the category of unbuildable last time I tried on Win32.)

I think Wx looks great and has the functionality I'd need, but all of the existing documentation is for the C++ version. You need to translate it to perl, and not all concepts map cleanly from one language to the other. And as the original poster pointed out, it's not trivial to deploy a WxPerl application.

More power to the programmers who will try out an incomplete solution and help the dev team make it better by filling out documentation, and fixing bugs or submitting bug reports. That may not be the right approach for every problem, and sometimes considering a solution other than perl is not a bad idea.

  • Comment on Re^4: Packaging Perl Programs (is) Painful

Replies are listed 'Best First'.
Re^5: Packaging Perl Programs (is) Painful
by mr_mischief (Monsignor) on Sep 05, 2010 at 04:11 UTC
    I don't think anyone here is saying it's a bad idea to consider other languages. The problem was that someone told the OP basically to stop considering Perl. There's a big difference between pointing out that there are benefits to other tools and completely discounting the tool someone is already using.
Re^5: Packaging Perl Programs (is) Painful
by Anonymous Monk on Sep 05, 2010 at 07:24 UTC
    and GTK2::GladeXML both fell into the category of unbuildable last time I tried on Win32

    Yes, its a huge negative that there aren't ppms for the various Gtk2..., but there is hope, See Re: install Gtk2::GladeXML

    I think Wx looks great and has the functionality I'd need, but all of the existing documentation is for the C++ version. You need to translate it to perl, and not all concepts map cleanly from one language to the other. And as the original poster pointed out, it's not trivial to deploy a WxPerl application.

    They map well enough , honest. Start with http://wxperl.sourceforge.net/tutorial/tutorial1.html

    Then download chm file here, Wx-Demo, and dont forget about the samples

    Short version, wxFrame in perl is Wx::Frame, methods are called using arrow not dot.

    For all other differences the documentaion contains notes like this

    wxWindow::ClientToScreen

    virtual void ClientToScreen(int* x, int* y) const

    wxPerl note: In wxPerl this method returns a 2-element list instead of modifying its parameters.

    virtual wxPoint ClientToScreen(const wxPoint& pt) const

    Converts to screen coordinates from coordinates relative to this window.

    x

        A pointer to a integer value for the x coordinate. Pass the client coordinate in, and a screen coordinate will be passed out.

    y

        A pointer to a integer value for the y coordinate. Pass the client coordinate in, and a screen coordinate will be passed out.

    pt

        The client position for the second form of the function.

    wxPython note: In place of a single overloaded method name, wxPython implements the following methods:

        ClientToScreen(point) Accepts and returns a wxPoint
        ClientToScreenXY(x, y) Returns a 2-tuple, (x, y)

    so in wxperl this maps pretty much the same. So you can use any of these
    $ perl -MWx -le"print for Wx::Window->new->ClientToScreen( 0,0 )" 0 0 $ perl -MWx -le"print for Wx::Window->new->ClientToScreen( [0,0] )" Wx::Point=SCALAR(0x98a3c4) $ perl -MWx -le"print for Wx::Window->new->ClientToScreen( Wx::Point-> +new( 0,0 ) )" Wx::Point=SCALAR(0xda76e4)
    In perl [ -1, -1 ] is a shortcut for wxPoint or wxSize depending on context.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://858895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-23 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found