Yes, no, not really, however, it's very easy to do with wxPerl (even easier if you use wxGlade to build the GUI bits, like I just did)

In the example, just click the button, which will run the app again, then close it (all the while keepin' an eye on the console).

#!/usr/bin/perl -w -- # generated by wxGlade 0.3.1 on Mon Nov 17 17:52:26 2003 # To get wxPerl visit http://wxPerl.sourceforge.net/ use Wx 0.15 qw[:allclasses]; use strict; package MyFrame; use Wx qw[:everything]; use base qw(Wx::Frame); use strict; sub new { my( $self, $parent, $id, $title, $pos, $size, $style, $name ) = @_ +; $parent = undef unless defined $parent; $id = -1 unless defined $id; $title = "" unless defined $title; $pos = wxDefaultPosition unless defined $pos; $size = wxDefaultSize unless defined $size; $name = "" unless defined $name; # begin wxGlade: MyFrame::new $style = wxDEFAULT_FRAME_STYLE unless defined $style; $self = $self->SUPER::new( $parent, $id, $title, $pos, $size, $sty +le, $name ); $self->{button_1} = Wx::Button->new($self, -1, "button_1"); use Wx::Event qw[ EVT_END_PROCESS EVT_BUTTON ]; EVT_END_PROCESS( Wx::wxTheApp(),-1, sub{warn("it ended @_")}); EVT_BUTTON( $self->{button_1}, $self->{button_1}, sub { my $fpid = Wx::ExecuteArgs( # start this program again [ $^X, __FILE__ ], Wx::wxEXEC_ASYNC(), Wx::Process->new() ); warn("it started $fpid"); }, ); $self->__set_properties(); $self->__do_layout(); return $self; # end wxGlade } sub __set_properties { my $self = shift; # begin wxGlade: MyFrame::__set_properties $self->SetTitle("frame_1"); # end wxGlade } sub __do_layout { my $self = shift; # begin wxGlade: MyFrame::__do_layout $self->{sizer_1} = Wx::BoxSizer->new(wxVERTICAL); $self->{sizer_1}->Add($self->{button_1}, 0, 0, 0); $self->SetAutoLayout(1); $self->SetSizer($self->{sizer_1}); $self->{sizer_1}->Fit($self); $self->{sizer_1}->SetSizeHints($self); $self->Layout(); # end wxGlade } # end of class MyFrame 1; package MyApp; use base qw(Wx::App); use strict; sub OnInit { my( $self ) = shift; Wx::InitAllImageHandlers(); my $frame_1 = MyFrame->new(); $self->SetTopWindow($frame_1); $frame_1->Show(1); return 1; } # end of class MyApp package main; unless(caller){ my $app = MyApp->new(); $app->MainLoop(); } __END__ it started 884 at C:\dev\loose\wx.proc.pl line 40. it started 1376 at C:\dev\loose\wx.proc.pl line 40. it started 1208 at C:\dev\loose\wx.proc.pl line 40. it ended MyApp=HASH(0x1ab5224) Wx::ProcessEvent=SCALAR(0x2a37114) at C +:\dev\loose\wx.proc.pl line 32. it ended MyApp=HASH(0x1ab5224) Wx::ProcessEvent=SCALAR(0x2a37114) at C +:\dev\loose\wx.proc.pl line 32. it ended MyApp=HASH(0x1ab5224) Wx::ProcessEvent=SCALAR(0x2a37114) at C +:\dev\loose\wx.proc.pl line 32.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.


In reply to Re: Give me my gui back! by PodMaster
in thread Give me my gui back! by Bagarre

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.