[25489] in Perl-Users-Digest
Perl-Users Digest, Issue: 7733 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 3 21:10:22 2005
Date: Thu, 3 Feb 2005 18:10:17 -0800 (PST)
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, 3 Feb 2005 Volume: 10 Number: 7733
Today's topics:
Re: PAR/PP on Windows XP with ActiveState <wyzelli@yahoo.com>
Re: PAR/PP on Windows XP with ActiveState <kalinaubears@iinet.net.au>
Re: perlgtk embed window <JiggaHertz@nospam.com>
Re: Sending/ Receiving SQL arguments to a subroutine <tadmc@augustmail.com>
Re: Sending/ Receiving SQL arguments to a subroutine xhoster@gmail.com
Re: sharing perl scripts over domains <jurgenex@hotmail.com>
Using MySQL with Perl <srfulmer@hotmail.com>
Re: Using MySQL with Perl <jkeen_via_google@yahoo.com>
Re: Using MySQL with Perl <srfulmer@hotmail.com>
Re: Using MySQL with Perl ioneabu@yahoo.com
Re: Using MySQL with Perl <1usa@llenroc.ude.invalid>
Re: Using MySQL with Perl <srfulmer@hotmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 03 Feb 2005 22:49:18 GMT
From: "Peter Wyzl" <wyzelli@yahoo.com>
Subject: Re: PAR/PP on Windows XP with ActiveState
Message-Id: <OTxMd.146719$K7.53322@news-server.bigpond.net.au>
<sigzero@gmail.com> wrote in message
news:1107437433.506992.91050@l41g2000cwc.googlegroups.com...
:I am trying to build an EXE without the Perl DLL included. I run my
: make.bat which contains:
:
: pp --icon app.ico -d -o popups.exe popups.pl
:
: And it errors out with this:
I have never tried PAR but have had a lot of success with PerlApp from
Activestate. The compiled .exe in free standing form is usually around
4-600k in size.
P
--
print "Just another Perl Hacker";
------------------------------
Date: Fri, 04 Feb 2005 00:41:47 +0000
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: PAR/PP on Windows XP with ActiveState
Message-Id: <4202d454$0$21425$5a62ac22@per-qv1-newsreader-01.iinet.net.au>
sigzero@gmail.com wrote:
> I am trying to build an EXE without the Perl DLL included. I run my
> make.bat which contains:
>
> pp --icon app.ico -d -o popups.exe popups.pl
>
> And it errors out with this:
[snip]
There's a mailing list for PAR (see http://lists.perl.org). Try there if
you can't get a satisfactory answer here.
And, yes, avoid perlcc.
>
> Reduce the executable size by not including a copy of perl interpreter.
> Executables built this way will need a separate perl5x.dll or
> libperl.so to function correctly. This option is only available if perl
> is built as a shared library.
>
> The last sentence is what got me. Is the ActiveState distro built as a
> shared library? Or is a lean EXE out of my reach because AS was not
> built that way?
>
Yep, ActiveState perl is built as a shared library - otherwise there
would be on perl58.dll (or perl56.dll if you're running perl 5.6).
Cheers,
Rob
--
To reply by email u have to take out the u in kalinaubears.
------------------------------
Date: Thu, 03 Feb 2005 14:30:13 -0500
From: JiggaHertz <JiggaHertz@nospam.com>
Subject: Re: perlgtk embed window
Message-Id: <aZuMd.78$cr2.69@llnews.ll.mit.edu>
zentara wrote:
> On Wed, 02 Feb 2005 19:09:04 -0500, JiggaHertz <none@nospam.com> wrote:
>
>
>>I'm trying to reparent an external window into a perlgtk script. I
>>create an xterm and the result I get from xwininfo is.
>>
>>xwininfo: Window id: 0x1c0000e
>>
>>Running the following script does nothing to the external window, the
>>same if I create a gtk window. I've tried this using fluxbox and kde,
>>same results. Any help as to what I'm doing wrong would be greatly
>>appreciated.
>
>
> Here is a working example from Perl/Tk. You should be able to adapt
> it to gtk.
> I've toyed around with this,
> and found that you need some octal conversions
>
I've tried running this script and it doesn't take the xterm. It
creates a window with "A xterm:" which resizes after a few seconds to
only include that text. The xterm stays as a separate window (titled
WindowToSteal). I've tried this with a few different scripts and get
the same results.
> Look for the oct()
>
> #!/usr/bin/perl
> # $Id: ptk_steal.pl,v 1.1 1999/07/01 19:56:31 eserte Exp $
> # Author: Slaven Rezic
> # Copyright (C) 1999 Slaven Rezic. All rights reserved.
> # This program is free software; you can redistribute it and/or
> # modify it under the same terms as Perl itself.
> # Mail: eserte@cs.tu-berlin.de
> # WWW: http://user.cs.tu-berlin.de/~eserte/
> #
> use Tk;
> use X11::Protocol;
>
> $x = X11::Protocol->new();
> $top = MainWindow->new;
>
> system("xterm -name WindowToSteal &");
>
> $check = $top->repeat(
> 50,
> sub {
> $wid = get_window_by_name("WindowToSteal");
> }
> );
>
> while ( !defined $wid ) {
> $top->waitVariable( \$wid );
> }
> $check->cancel;
>
> #warn sprintf("%x\n", $wid);
> $top->geometry("+10+10");
> $top->Label( -text => "A xterm:" )->pack;
> if ( $Tk::VERSION >= 800 ) {
> $f = $top->Frame( '-container' => 1 )->pack;
> }
> else {
> $f = $top->Frame( -width => 500, -height => 400 )->pack;
> }
>
> $f->update;
> $x->ReparentWindow( $wid, oct( $f->id ), 0, 0 );
>
> sub get_window_by_name {
> _get_window_by_name( $x->{'root'}, $_[0] );
> }
>
> sub _get_window_by_name {
> my ( $root, $searchname ) = @_;
> my ( $dummy, $dummy2, @new_kids ) = $x->QueryTree($root);
> foreach my $k (@new_kids) {
> my $atomnr;
>
> #warn sprintf("%x\n", $k);
> foreach my $atom ( $x->ListProperties($k) ) {
> if ( $x->GetAtomName($atom) eq "WM_CLASS" ) {
> $atomnr = $atom;
> last;
> }
> }
> if ( defined $atomnr ) {
> my ($classprop) =
> $x->GetProperty( $k, $atomnr, "AnyPropertyType", 0, 256, 0
> );
> my ( $class, $name ) = split( /\0/, $classprop );
> if ( $class eq $searchname ) {
> return $k;
> }
> }
> my $ret = _get_window_by_name( $k, $searchname );
> if ( defined $ret ) {
> return $ret;
> }
> }
> undef;
> }
>
> MainLoop;
> __END__
>
>
>
>
------------------------------
Date: Thu, 3 Feb 2005 14:16:19 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Sending/ Receiving SQL arguments to a subroutine
Message-Id: <slrnd051kj.3fi.tadmc@magna.augustmail.com>
PatrickG <pat@patmail.com> wrote:
> I've got a few things to RTFM on now!
The very first one should be to find out the proper way to
compose a followup. Do this before your next post, else
you may pay the price.
Have you seen the Posting Guidelines that are posted here frequently?
They contain pointers about how to use Usenet.
[ snip over 100 lines of TOFU ]
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 03 Feb 2005 22:43:17 GMT
From: xhoster@gmail.com
Subject: Re: Sending/ Receiving SQL arguments to a subroutine
Message-Id: <20050203174317.702$Ng@newsreader.com>
"PatrickG" <pat@patmail.com> wrote:
> Just Another Perl Newbie here - any help much appreciated...
>
> I'm trying to write a subroutines that will call the $dbh, prepare, and
> execute SQL statements so that I don't have to keep rewriting the same
> code.
So you are going to write your own half-assed version of the already
existing selectall_arrayref so that you don't have to write so much code?
I don't see the appeal. You still have to write the code that will call
your subroutine, plus you have to write the subroutine itself. That is
more code overall than if you just use the pre-existing subroutine.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Thu, 03 Feb 2005 19:11:02 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: sharing perl scripts over domains
Message-Id: <aHuMd.4720$uc.3802@trnddc09>
asdfq213rr23we@yahoo.com wrote:
[...]
> ln -s /home/httpd/vhosts/domain1
[...]
> Didnt succeed..
Well, no big surprise there:
C:\tmp>perldoc -f ln
No documentation for perl function `ln' found
Obviously perl has no idea about some "ln" function.
jue
------------------------------
Date: 3 Feb 2005 17:31:24 -0800
From: "philsfan17" <srfulmer@hotmail.com>
Subject: Using MySQL with Perl
Message-Id: <1107480684.609737.230050@o13g2000cwo.googlegroups.com>
I'm having a problem running a perl script that uses mySQL. I have
installed both DBI and DBD-mysql using ppm, but when I run a script
that has use mysql in it, I get this error:
Had to create DBI::_dbistate unexpectedly at C:/Perl/lib/DynaLoader.pm
line 253.
Does anyone have any idea what I'm doing wrong?
Thanks!
-Shane
------------------------------
Date: Fri, 04 Feb 2005 01:35:38 GMT
From: Jim Keenan <jkeen_via_google@yahoo.com>
Subject: Re: Using MySQL with Perl
Message-Id: <KjAMd.3656$sR5.2532@trndny05>
philsfan17 wrote:
> I'm having a problem running a perl script that uses mySQL. I have
> installed both DBI and DBD-mysql using ppm, but when I run a script
> that has use mysql in it, I get this error:
>
Please show us your code. Better still, try to present the smallest
possible amount of code that reproduces the error.
jimk
------------------------------
Date: 3 Feb 2005 17:38:22 -0800
From: "philsfan17" <srfulmer@hotmail.com>
Subject: Re: Using MySQL with Perl
Message-Id: <1107481102.384828.119220@g14g2000cwa.googlegroups.com>
This is all I'm doing:
#!/bin/perl -w
use mysql;
------------------------------
Date: 3 Feb 2005 17:53:13 -0800
From: ioneabu@yahoo.com
Subject: Re: Using MySQL with Perl
Message-Id: <1107481992.973349.225550@l41g2000cwc.googlegroups.com>
philsfan17 wrote:
> This is all I'm doing:
>
> #!/bin/perl -w
>
> use mysql;
I use DBI all the time, but I do:
use DBI;
I don't know what mysql.pm is. Is it your own module?
wana
------------------------------
Date: Fri, 04 Feb 2005 01:53:50 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Using MySQL with Perl
Message-Id: <Xns95F2D49F16A49asu1cornelledu@127.0.0.1>
"philsfan17" <srfulmer@hotmail.com> wrote in news:1107481102.384828.119220
@g14g2000cwa.googlegroups.com:
> This is all I'm doing:
>
> #!/bin/perl -w
>
> use mysql;
First, read <URL: http://tinyurl.com/6z7k2> (thanks Paul!). Then, read
perldoc DBI
Sinan
------------------------------
Date: 3 Feb 2005 17:58:57 -0800
From: "philsfan17" <srfulmer@hotmail.com>
Subject: Re: Using MySQL with Perl
Message-Id: <1107482337.824503.146690@c13g2000cwb.googlegroups.com>
Ah, actually I was looking at the code on this page:
http://search.cpan.org/dist/DBD-mysql/lib/Mysql.pm#OBSOLETE_SOFTWARE
But as the bookmark on the end tells you - I missed a few lines about
the separate mysql module being obsolute at this point.
So I guess I can use DBI to interact with mysql then.
------------------------------
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 V10 Issue 7733
***************************************