diff --git a/pollo.pl b/pollo.pl new file mode 100644 index 0000000..4b5d6fa --- /dev/null +++ b/pollo.pl @@ -0,0 +1 @@ +say("hola"); diff --git a/script.pl b/script.pl new file mode 100644 index 0000000..d2523da --- /dev/null +++ b/script.pl @@ -0,0 +1,51 @@ +#!/usr/bin/perl +# standard modules +use strict; +use warnings; + +# load wxPerl main module +use Wx; + +# every application must create an application object + +package MyApp; +use base 'Wx::App'; + +# The OnInit method is called automatically when an +# application object is first constructed. +# Application level initialization can be done here. + +sub OnInit { + my( $self ) = @_; + # create a new frame (a frame is a top level window) + my $frame = Wx::Frame->new( + undef, # parent window + -1, # ID -1 means any + 'Hello World of pollones', # title + [-1, -1], # default position + [450, 250], # size + ); + + # show the frame + $frame->Show( 1 ); + + # The OnInit sub must return a true value or the wxApp + # will not start. Although an explicit return is not + # necessary as the $frame->Show line will return + # a true value, we'll include an explicit line + # in this example. + + return 1; +} + +package main; + +# create the application object, this will call OnInit +# before the constructor returns. + +my $app = MyApp->new; + +# process GUI events from the application this function +# will not return until the last frame is closed + +$app->MainLoop; \ No newline at end of file