[31070] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 2315 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 2 14:09:46 2009

Date: Thu, 2 Apr 2009 11:09:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 2 Apr 2009     Volume: 11 Number: 2315

Today's topics:
        2.6.29 broke the bridge! <ppi.nospam@nospam.searchy.net>
    Re: 2.6.29 broke the bridge! <smallpond@juno.com>
    Re: 2.6.29 broke the bridge! <ppi.nospam@nospam.searchy.net>
    Re: database advice <cartercc@gmail.com>
    Re: database advice <klaus03@gmail.com>
    Re: finding maximum <tzz@lifelogs.com>
    Re: finding maximum <tzz@lifelogs.com>
    Re: finding maximum <jameskuyper@verizon.net>
        How to find directory of package residence from within  <schaitan@gmail.com>
    Re: How to find directory of package residence from wit <schaitan@gmail.com>
    Re: How to find directory of package residence from wit <noreply@gunnar.cc>
    Re: search/replace <molsted@gmail.com>
    Re: search/replace <tadmc@seesig.invalid>
        XRC vs Perl (GUI) generated code <aboudouvas@panafonet.gr>
    Re: XRC vs Perl (GUI) generated code <smallpond@juno.com>
    Re: XRC vs Perl (GUI) generated code <aboudouvas@panafonet.gr>
    Re: XRC vs Perl (GUI) generated code <RedGrittyBrick@spamweary.invalid>
    Re: XRC vs Perl (GUI) generated code <cartercc@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 02 Apr 2009 15:12:05 +0200
From: Frank <ppi.nospam@nospam.searchy.net>
Subject: 2.6.29 broke the bridge!
Message-Id: <49d4b9a6$0$194$e4fe514c@news.xs4all.nl>

Hi,

Today I upgraded my 2.6.28(.2) kernel tot 2.6.29. I use KVM to run 
several guests. All of them are connected via a tap interface to a bridge.

To set everything up I've created some simple bash scripts, no change 
has been made in them during the update.

After booting 2.6.29 networking to the guests stopped partialy. Packets 
generated by the guests got lost somewhere. Tcpdumping on the bridge 
they were seen, but on the received external hosts the packets were 
nowhere to be seen.

Reverting back to the old kernel, everything worked fine as usual.

Because the only thing done was booting a new kernel, I suspect the 
cause must be in here somewhere. For compiling the 2.6.29 I used 'zcat 
/proc/config.gz' > .config in the source directory and ran 'make 
menuconfig' once, without making changes.

What has changed in 2.6.29 causing the bridges to fail?


Regards,


Frank


------------------------------

Date: Thu, 2 Apr 2009 06:24:27 -0700 (PDT)
From: smallpond <smallpond@juno.com>
Subject: Re: 2.6.29 broke the bridge!
Message-Id: <388fbdb6-b1fe-4080-9246-5bb331f713f1@r28g2000vbp.googlegroups.com>

On Apr 2, 9:12=A0am, Frank <ppi.nos...@nospam.searchy.net> wrote:
>
> What has changed in 2.6.29 causing the bridges to fail?
>

You don't want the perl group.  You want a Civil Engineer.


------------------------------

Date: Thu, 02 Apr 2009 15:45:19 +0200
From: Frank <ppi.nospam@nospam.searchy.net>
Subject: Re: 2.6.29 broke the bridge!
Message-Id: <49d4c170$0$188$e4fe514c@news.xs4all.nl>

smallpond wrote:
> On Apr 2, 9:12 am, Frank <ppi.nos...@nospam.searchy.net> wrote:
>> What has changed in 2.6.29 causing the bridges to fail?
>>
> 
> You don't want the perl group.  You want a Civil Engineer.

Oops, I wanted to post it in comp.os.linux.misc....


------------------------------

Date: Thu, 2 Apr 2009 09:07:57 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: database advice
Message-Id: <ce05bade-37c8-49f0-bf43-719f46eaa797@j8g2000yql.googlegroups.com>

On Apr 1, 11:52 pm, Xho Jingleheimerschmidt <xhos...@gmail.com> wrote:
> ccc31807 wrote:
>
> > Doesn't matter. The diagnosis is merely informational, and very rarely
> > accessed. I don't programatically manipulate this data, just display
> > it when requested.
>
> How did the data get there in the first place, if it never undergoes
> anything other than retrieval and display?
>
> Xho

Understand that this is client driven. The diagnoses come from the
client's client, and the client's client requires that the diagnoses
be retained as part of the data. To me as the builder of the app, the
diagnoses are irrelevant. To my client, the customer, they are only
marginally useful. To the client's client, they form an essential part
of a patient record.

Anyway, I've made the decision. I'm concating all the diagnosis data
into a database column of type text, and I'm not even going to worry
about a nice display. The only concession I'm going to make is to
provide a key word search function, which I can easily do with like:
$search = <>;
$sth->prepare("select * from account with diagnosis like %?%"); $sth-
>execute($search);

CC


------------------------------

Date: Thu, 2 Apr 2009 10:59:40 -0700 (PDT)
From: Klaus <klaus03@gmail.com>
Subject: Re: database advice
Message-Id: <4db31b17-3b61-42ef-bd77-2292067f98e5@r33g2000yqn.googlegroups.com>

On Apr 2, 6:07=A0pm, ccc31807 <carte...@gmail.com> wrote:
> Anyway, I've made the decision. I'm concating all the diagnosis data
> into a database column of type text, and I'm not even going to worry
> about a nice display. The only concession I'm going to make is to
> provide a key word search function, which I can easily do with like:
> $search =3D <>;
> $sth->prepare("select * from account with diagnosis like %?%"); $sth-
>
> >execute($search);

I don't think that the above SQL is syntactically correct.

Anyway, with Perl 5.10 you could, for example, do the following:

use strict;
use warnings;
use 5.010;
 ...
my $search =3D <>;

$sth =3D $dbh->prepare("SELECT diagnosis FROM account");
$sth->execute();

while (my ($diag) =3D $sth->fetchrow_array) {
    if ($search ~~ [split /\|/, $diag]) {
        say "Found $diag";
    }
}

--
Klaus


------------------------------

Date: Thu, 02 Apr 2009 08:59:46 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: finding maximum
Message-Id: <86myaz88bx.fsf@lifelogs.com>

On Wed, 1 Apr 2009 13:44:32 -0700 (PDT) jameskuyper <jameskuyper@verizon.net> wrote: 

j> Ted Zlatanov wrote:
>> On Tue, 31 Mar 2009 23:13:09 +0100 sandeep <nospam@nospam.com> wrote:
>> 
s> How would you find the maximum of
s> (a) two numbers
s> (b) a set of numbers
s> in idiomatic C? How would you do it in idiomatic Perl?
>> 
>> In any language, you put the numbers in an array, sort the array, and
>> return the element at the top.  Similarly, to get the average, you sort
>> the array and then return the middle number (AKA the "median average").

j> That's at best an O(N log N) solution. There's an O(N) solution which
j> is even simpler; sandeep presented the basic idea for that solution
j> (badly) in his second message on this thread.

What do you mean, O(N log N)?  Sorting is O(1), it's an OS function!

>> In Perl sorting is even built into the language; in C unfortunately you
>> have to embed the Perl interpreter to get that kind of simplicity.

j> In C, sorting is built into the standard library: qsort(). It may be
j> clumsier to use, perhaps, than Perl's sort, but it's still an easier
j> solution for a C program than embedding the perl interpreter.

You must be joking!

(I was, see the date :)

Ted


------------------------------

Date: Thu, 02 Apr 2009 09:04:35 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: finding maximum
Message-Id: <86iqln883w.fsf@lifelogs.com>

On Wed, 1 Apr 2009 15:46:35 -0500 Tad J McClellan <tadmc@seesig.invalid> wrote: 

TJM> Ted Zlatanov <tzz@lifelogs.com> wrote:
>> On Tue, 31 Mar 2009 23:13:09 +0100 sandeep <nospam@nospam.com> wrote: 
>> 
s> How would you find the maximum of
s> (a) two numbers
s> (b) a set of numbers
s> in idiomatic C? How would you do it in idiomatic Perl? 
>> 
>> In any language, you put the numbers in an array, sort the array, and
>> return the element at the top.

TJM> Unless the array might be "large".

TJM> Your algorithm is likely O(n log n) when finding the maximum can 
TJM> be done in only O(n).

Sorry, Tad, you got hooked.  Happy April Fools :)

>> We are programmers, sir.  Discussion does not become us.

TJM> Sure we do. We discuss stuff all the time.
TJM> But we discuss what interests us.
TJM> That is, we do not take direction from random usenauts.

I was kidding on that one too, I promise ;)

Ted


------------------------------

Date: Thu, 02 Apr 2009 14:50:37 GMT
From: James Kuyper <jameskuyper@verizon.net>
Subject: Re: finding maximum
Message-Id: <1h4Bl.1164$6n.704@nwrddc01.gnilink.net>

Ted Zlatanov wrote:
> On Wed, 1 Apr 2009 13:44:32 -0700 (PDT) jameskuyper <jameskuyper@verizon.net> wrote: 
> 
> j> Ted Zlatanov wrote:
 ...
> j> That's at best an O(N log N) solution. There's an O(N) solution which
> j> is even simpler; sandeep presented the basic idea for that solution
> j> (badly) in his second message on this thread.
> 
> What do you mean, O(N log N)?  Sorting is O(1), it's an OS function!

I hope that statement was a continuation of your joke.

>>> In Perl sorting is even built into the language; in C unfortunately you
>>> have to embed the Perl interpreter to get that kind of simplicity.
> 
> j> In C, sorting is built into the standard library: qsort(). It may be
> j> clumsier to use, perhaps, than Perl's sort, but it's still an easier
> j> solution for a C program than embedding the perl interpreter.
> 
> You must be joking!

No. I do joke sometimes, but this wasn't an example.

> (I was, see the date :)

My apologies; not every message posted on that date is a joke, it's 
sometimes hard to tell which are which.


------------------------------

Date: Thu, 2 Apr 2009 07:51:54 -0700 (PDT)
From: Krishna Chaitanya <schaitan@gmail.com>
Subject: How to find directory of package residence from within package?
Message-Id: <c6eb0a48-79ba-4362-bfe7-735713e3d5eb@x31g2000prc.googlegroups.com>

Hi, in case of a package, I need to populate the 'pwd' key of $self
with the directory of the same package's residence. I used Cwd but it
doesn't work in all cases. For example:

/home/kris/1.pl (WIP is an immediate subdirectory of this script's
directory)
==========================================================
use warnings;
use strict;
use WIP::Test;
my $obj = WIP::Test->new();
print $obj->pwd,"\n";

Package WIP/Test.pm
========

package WIP::Test;
use warnings;
use Cwd qw(getcwd);

sub new
{
  my $pkg = shift;
  my $classname = ref $pkg || $pkg;
  my $self = {};
  $self->{pwd} = getcwd();
  bless $self, $classname;
  return $self;
}

sub pwd
{
  my $self = shift;
  return $self->{pwd};
}

1;

In this case, if I run the 1.pl script from /home/kris, it gives /home/
kris rather than /home/kris/WIP (which is what I want). I want the
module to "remember" where it is located (without hard-coding it since
the module could be moved around in a flexible install)

Do you know how it can done easily using any special variable or
technique? I've thought about one way (which doesn't sound very
efficient to myself):

package WIP::Test;
use warnings;
use Cwd qw(getcwd);

my $pwd = undef;

use File::Find;
find(
  {
    wanted => sub {
      my $pkg = __PACKAGE__;
      $pkg =~ s|::|/|g;
      $pkg = $pkg . ".pm";
      if (/$pkg$/) {
        $pwd = abs_path($File::Find::dir);
      }
      },
    no_chdir => 1,
  },
  @INC
);

sub new
{
 ...
 ...
 ...

Regards...


------------------------------

Date: Thu, 2 Apr 2009 07:54:17 -0700 (PDT)
From: Krishna Chaitanya <schaitan@gmail.com>
Subject: Re: How to find directory of package residence from within package?
Message-Id: <08cbd3f3-3d63-492c-9ca1-8650119a616f@u39g2000pru.googlegroups.com>

>
> package WIP::Test;
> use warnings;
> use Cwd qw(getcwd);
>

Er, read last line above as:

use Cwd qw(getcwd abs_path);


------------------------------

Date: Thu, 02 Apr 2009 19:38:32 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: How to find directory of package residence from within package?
Message-Id: <73kbh3Fuq77lU1@mid.individual.net>

Krishna Chaitanya wrote:
> Hi, in case of a package,

     s/package/module/

(a module may include multiple packages)

> I need to populate the 'pwd' key of $self
> with the directory of the same package's residence. I used Cwd but it
> doesn't work in all cases.

One way may be to make use of the %INC hash.

     ( my $pwd = $INC{'WIP/Test.pm'} ) =~ s/Test\.pm//;

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


------------------------------

Date: Thu, 2 Apr 2009 02:17:04 -0700 (PDT)
From: molsted <molsted@gmail.com>
Subject: Re: search/replace
Message-Id: <55955330-11f2-4861-8128-f0689fb3de32@r37g2000yqn.googlegroups.com>

On 1 Apr., 14:32, Tad J McClellan <ta...@seesig.invalid> wrote:
> To analyse the behavior of a pattern match, we need two things:
>
>    1) the pattern that is to be matched

Sample pattern:
&00Antiques^M
&00Antiquit<0x00E4>ten^M
&00Antiquit<0x00E9>s^M
&00Antig<0x00FC>edades^M
&00Antikviteter^M

Sample output:
<Style:GB>Antiques
<Style:DE>Antiquit<0x00E4>ten
<Style:FR>Antiquit<0x00E9>s
<Style:ES>Antig<0x00FC>edades
<Style:DK>Antikviteter

All on seperate lines. The file is generated on a Windows PC (\r\n),
my file needs to end up as a UNIX-file on Mac OS X

The first file had accidently been opened on a Mac, hence the \r end
of line.

I hope this clears things a bit up.

The file is being converted from 1252 to Macroman prior being run
through script (/usr/bin/iconv -f WINDOWS-1252 -t MACROMAN). However I
am considdering using 'Text::Iconv' instead.

--
Rene


------------------------------

Date: Thu, 2 Apr 2009 06:21:52 -0500
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: search/replace
Message-Id: <slrngt97ug.6o1.tadmc@tadmc30.sbcglobal.net>

molsted <molsted@gmail.com> wrote:
> On 1 Apr., 14:32, Tad J McClellan <ta...@seesig.invalid> wrote:
>> To analyse the behavior of a pattern match, we need two things:
>>
>>    1) the pattern that is to be matched
>
> Sample pattern:
> &00Antiques^M
> &00Antiquit<0x00E4>ten^M
> &00Antiquit<0x00E9>s^M
> &00Antig<0x00FC>edades^M
> &00Antikviteter^M


That is NOT the pattern to be matched!

The pattern to be matched is:

    &00([^\r]+)\r\n

Those are (meant to be) the strings that the pattern is to be matched against.

The reason that none of those strings match the pattern is because
none of those strings contain a carriage return, and the pattern requires
a carriage return.

A hex dump, such as from xxd, shows that there are no carriage returns
in that data. Each lines ends with a caret (ASCII 0x5e), an upper
case "M" (ASCII 0x4d) and a linefeed (ASCII 0x0a):

0000000: 2630 3041 6e74 6971 7565 735e 4d0a 2630  &00Antiques^M.&0
                                    ^^ ^^^^
0000010: 3041 6e74 6971 7569 743c 3078 3030 4534  0Antiquit<0x00E4
0000020: 3e74 656e 5e4d 0a26 3030 416e 7469 7175  >ten^M.&00Antiqu
                   ^^^^ ^^
0000030: 6974 3c30 7830 3045 393e 735e 4d0a 2630  it<0x00E9>s^M.&0
                                    ^^ ^^^^

If you cannot figure out how to post data with the line endings that
are actually in your data, then write the data in Real Perl Code.

(that sounds familiar...)

instead of

    while ( <FILE> ) {

put the data into an array and loop over the array:

    my @lines = ( "&00Antiques\r\n", "&00Antiquit<0x00E4>ten\r\n", ...
    foreach ( @lines ) {


> The file is generated on a Windows PC (\r\n),
> my file needs to end up as a UNIX-file on Mac OS X


Then all you need to do is delete all of the carriage returns before
matching:

    tr/\r//d;

and change the pattern to not require carriage returns.


> The first file had accidently been opened on a Mac, hence the \r end
> of line.


That explains it then.

On Linux/OS X the input operator, <>, reads until it finds a newline.

Since there were no newlines, a single read gets the entire file in one go.


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


------------------------------

Date: Thu, 2 Apr 2009 01:26:46 -0700 (PDT)
From: king kikapu <aboudouvas@panafonet.gr>
Subject: XRC vs Perl (GUI) generated code
Message-Id: <a8e2df11-4214-414a-86af-58d04f6ff368@j8g2000yql.googlegroups.com>

Hi,

i posted this to the perl.beginners group yesterday morning but it
seems it got lost...
Anyway.

I have started using Perl and i quite like it!

As i come from the Windows world, i started looking about my GUI
options and decided to use wxWidgets.
So, i know that there is wxGlade that produce Perl code but i found
some other very nice tools (wxFormDesigner, DialogBlocks and some
other) too that they seem to be better than wxGlade (more controls,
more stable) only that they generate XRC code.

My question is:
Can i use this XRC generated code from (wx)Perl easily so to display
the GUI ?
And in general, is it better to use tools (like wxGlade) that generate
directly Perl code or using some more advanced ones but produce XRC ?
What is the advantages of each option ?

Thanks a lot for any help on this,

K.K.


------------------------------

Date: Thu, 2 Apr 2009 06:45:59 -0700 (PDT)
From: smallpond <smallpond@juno.com>
Subject: Re: XRC vs Perl (GUI) generated code
Message-Id: <bfa3cdb2-10ca-4b6a-8b0e-71a92ff1835c@v28g2000vbb.googlegroups.com>

On Apr 2, 4:26=A0am, king kikapu <aboudou...@panafonet.gr> wrote:
> Hi,
>
> i posted this to the perl.beginners group yesterday morning but it
> seems it got lost...
> Anyway.
>
> I have started using Perl and i quite like it!
>
> As i come from the Windows world, i started looking about my GUI
> options and decided to use wxWidgets.
> So, i know that there is wxGlade that produce Perl code but i found
> some other very nice tools (wxFormDesigner, DialogBlocks and some
> other) too that they seem to be better than wxGlade (more controls,
> more stable) only that they generate XRC code.
>
> My question is:
> Can i use this XRC generated code from (wx)Perl easily so to display
> the GUI ?
> And in general, is it better to use tools (like wxGlade) that generate
> directly Perl code or using some more advanced ones but produce XRC ?
> What is the advantages of each option ?
>
> Thanks a lot for any help on this,
>
> K.K.


First off, wxWidgets is an excellent toolkit.

Using wxGlade is the obvious choice for someone
with a Windows background.
It protects you from things not commonly done on
Windows like checking return values of calls, looking at
error messages, and reading documentation.

Some folks on this group might suggest that you just
use the Wx perl module and code your UI from the
ground up.  Nonsense!  You would actually have to
learn how the various subsystems work and interact.
Then when you have a problem, you would be the one stuck
fixing it instead of just being able to throw your
hands up and walk away.

HTH


------------------------------

Date: Thu, 2 Apr 2009 07:02:34 -0700 (PDT)
From: king kikapu <aboudouvas@panafonet.gr>
Subject: Re: XRC vs Perl (GUI) generated code
Message-Id: <eeb2226a-0425-4fc3-a76e-f45ae5f0a9d0@q16g2000yqg.googlegroups.com>

On Apr 2, 4:45=A0pm, smallpond <smallp...@juno.com> wrote:
> On Apr 2, 4:26=A0am, king kikapu <aboudou...@panafonet.gr> wrote:
>
>
>
> > Hi,
>
> > i posted this to the perl.beginners group yesterday morning but it
> > seems it got lost...
> > Anyway.
>
> > I have started using Perl and i quite like it!
>
> > As i come from the Windows world, i started looking about my GUI
> > options and decided to use wxWidgets.
> > So, i know that there is wxGlade that produce Perl code but i found
> > some other very nice tools (wxFormDesigner, DialogBlocks and some
> > other) too that they seem to be better than wxGlade (more controls,
> > more stable) only that they generate XRC code.
>
> > My question is:
> > Can i use this XRC generated code from (wx)Perl easily so to display
> > the GUI ?
> > And in general, is it better to use tools (like wxGlade) that generate
> > directly Perl code or using some more advanced ones but produce XRC ?
> > What is the advantages of each option ?
>
> > Thanks a lot for any help on this,
>
> > K.K.
>
> First off, wxWidgets is an excellent toolkit.
>
> Using wxGlade is the obvious choice for someone
> with a Windows background.
> It protects you from things not commonly done on
> Windows like checking return values of calls, looking at
> error messages, and reading documentation.
>
> Some folks on this group might suggest that you just
> use the Wx perl module and code your UI from the
> ground up. =A0Nonsense! =A0You would actually have to
> learn how the various subsystems work and interact.
> Then when you have a problem, you would be the one stuck
> fixing it instead of just being able to throw your
> hands up and walk away.
>
> HTH

Hey, thanks for the reply!

I plan to use wxGlade (or some sort of form designer, i would never
code the UI by hand) but what are the differences by using Perl
generated code and XRC one ?


------------------------------

Date: Thu, 02 Apr 2009 16:30:41 +0100
From: RedGrittyBrick <RedGrittyBrick@spamweary.invalid>
Subject: Re: XRC vs Perl (GUI) generated code
Message-Id: <49d4da20$0$19219$db0fefd9@news.zen.co.uk>


king kikapu wrote:
> On Apr 2, 4:45 pm, smallpond <smallp...@juno.com> wrote:
>> On Apr 2, 4:26 am, king kikapu <aboudou...@panafonet.gr> wrote:
>>
>>
>>
>>> Hi,
>>> i posted this to the perl.beginners group yesterday morning but it
>>> seems it got lost...
>>> Anyway.
>>> I have started using Perl and i quite like it!
>>> As i come from the Windows world, i started looking about my GUI
>>> options and decided to use wxWidgets.
>>> So, i know that there is wxGlade that produce Perl code but i found
>>> some other very nice tools (wxFormDesigner, DialogBlocks and some
>>> other) too that they seem to be better than wxGlade (more controls,
>>> more stable) only that they generate XRC code.
>>> My question is:
>>> Can i use this XRC generated code from (wx)Perl easily so to display
>>> the GUI ?
>>> And in general, is it better to use tools (like wxGlade) that generate
>>> directly Perl code or using some more advanced ones but produce XRC ?
>>> What is the advantages of each option ?
>>> Thanks a lot for any help on this,
>>> K.K.
>> First off, wxWidgets is an excellent toolkit.
>>
>> Using wxGlade is the obvious choice for someone
>> with a Windows background.
>> It protects you from things not commonly done on
>> Windows like checking return values of calls, looking at
>> error messages, and reading documentation.
>>
>> Some folks on this group might suggest that you just
>> use the Wx perl module and code your UI from the
>> ground up.  Nonsense!  You would actually have to
>> learn how the various subsystems work and interact.
>> Then when you have a problem, you would be the one stuck
>> fixing it instead of just being able to throw your
>> hands up and walk away.
>>
>> HTH
> 
> Hey, thanks for the reply!
> 
> I plan to use wxGlade (or some sort of form designer, i would never
> code the UI by hand) 

Sarcasm detector failure detected!

-- 
RGB


------------------------------

Date: Thu, 2 Apr 2009 10:56:05 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: XRC vs Perl (GUI) generated code
Message-Id: <6c06bff3-8e46-4524-91ea-c6519b71d523@y13g2000yqn.googlegroups.com>

On Apr 2, 4:26=A0am, king kikapu <aboudou...@panafonet.gr> wrote:
> I have started using Perl and i quite like it!

Perl is a great tool to use for a few things, like database stuff,
data manipulation, and user interfaces using a browser including web
sites. However, it's not the best tool for everything in the world,
and you will do well to match the tool to the task at hand.

> As i come from the Windows world, i started looking about my GUI
> options and decided to use wxWidgets.

Most of the stuff I do is Windows based, as I work in a 100% Microsoft
shop (except for me.) Once or twice I have tried to build a GUI app
with Perl, but Java is much better for this, or .NET. All of the GUI
apps I write are webified, and the users interact with the app using a
browser. This really is the way of the future (IMO) and (IMO) you
would do well to learn how to webify your own applications.

> And in general, is it better to use tools (like wxGlade) that generate
> directly Perl code or using some more advanced ones but produce XRC ?
> What is the advantages of each option ?

HTML, CSS, and Javascript is easy enough to write by hand, using
Notepad, or vi (gVim for Windows). I don't know what you are doing,
and I certainly wouldn't suggest that these kinds of tools don't have
their place, but for the simple things I do, I can use vi or a similar
tool faster and more accurately than a point and click tool, like VS
(for example). Mostly, you can build your own HTMLized components, put
them in a module, and call them when you need them.

CC


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 2315
***************************************


home help back first fref pref prev next nref lref last post