[26039] in Perl-Users-Digest
Perl-Users Digest, Issue: 8247 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 13 18:23:38 2005
Date: Wed, 13 Jul 2005 11:05:06 -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 Wed, 13 Jul 2005 Volume: 10 Number: 8247
Today's topics:
[ANNOUNCE] Thread-Queue-Duplex 0.10 <dean.arnold@sbcglobal.net>
ANNOUNCE: ExtUtils-ModuleMaker-0.33 <jkeen_via_google@yahoo.com>
Re: Are there any other GUI toolkits for perl than perl (Anno Siegel)
Re: Are there any other GUI toolkits for perl than perl <sherm@dot-app.org>
Re: Are there any other GUI toolkits for perl than perl <zentara@highstream.net>
Re: Are there any other GUI toolkits for perl than perl <ngoc@yahoo.com>
Re: Checking If A Function Exists <nobull@mail.com>
Help-> "Your vendor has not defined Win32::Process mac <sheam@hb-studios.com>
Re: Help-> "Your vendor has not defined Win32::Process <sheam@hb-studios.com>
NET::LDAP filter problem. (als)
Re: Replace exactly match of a number <noaddress@nodomain.com>
using passwd in a perl script <>
Re: using passwd in a perl script <1usa@llenroc.ude.invalid>
Re: using passwd in a perl script <>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 9 Jul 2005 20:49:37 GMT
From: Dean Arnold <dean.arnold@sbcglobal.net>
Subject: [ANNOUNCE] Thread-Queue-Duplex 0.10
Message-Id: <IJKLoy.35M@zorch.sf-bay.org>
The uploaded file
Thread-Queue-Duplex-0.10.tar.gz
has entered CPAN as
file: $CPAN/authors/id/D/DA/DARNOLD/Thread-Queue-Duplex-0.10.tar.gz
size: 5539 bytes
md5: 828ef7136607dada3c9653c91e267eb1
No action is required on your part
Request entered by: DARNOLD (Dean Arnold)
Request entered on: Sat, 09 Jul 2005 20:41:55 GMT
Request completed: Sat, 09 Jul 2005 20:42:30 GMT
Thread::Queue::Duplex implements a thread-safe request/response queue
for Perl 5.8, permitting multiple client threads to safely multiplex
concurrent requests to a server and receive only the response(s)
in which they're interested. See http://www.presicient.com/tqd
for details.
Thread::Queue::Duplex (aka TQD) should be available on CPAN shortly,
or at http://www.presicient.com/tqd/Thread-Queue-Duplex.tar.gz.
At present, I've tested on AS 5.8.3 on WinXP, and Perl 5.8.6
on Fedora Core 2. Test reports on other platforms welcome.
Regards,
Dean Arnold
Presicient Corp.
------------------------------
Date: Sun, 10 Jul 2005 14:28:43 GMT
From: James E Keenan <jkeen_via_google@yahoo.com>
Subject: ANNOUNCE: ExtUtils-ModuleMaker-0.33
Message-Id: <IJKLoF.343@zorch.sf-bay.org>
Version 0.33 of Perl extension ExtUtils::ModuleMaker has been uploaded
to the CPAN (http://search.cpan.org/dist/ExtUtils-ModuleMaker/) and
should soon be available on mirrors. It is a replacement for *h2xs* in
creating modules which do not rely on C-code.
With version 0.33 I have taken over primary maintenance of EU::MM from
author R Geoffrey Avery. I take responsibility for any bugs
introduced since Geoff's last version. You may report them through
the regular rt.cpan.org process or by e-mail to my cpan.org address
listed in the documentation.
I've also opened a cpanforum page:
http://www.cpanforum.com/dist/ExtUtils-ModuleMaker.
Thanks again to Geoff Avery for this handy module!
Jim Keenan
------------------------------
Date: 13 Jul 2005 10:12:20 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Are there any other GUI toolkits for perl than perl/Tk?
Message-Id: <db2pe4$bd7$1@mamenchi.zrz.TU-Berlin.DE>
ngoc <ngoc@yahoo.com> wrote in comp.lang.perl.misc:
> Hi
> There are some limitations of perl/Tk. I am Looking for other toolkits
> better than Tk.
"Better" meaning "lacking the undisclosed limitations of TK"? That's
a tricky question.
Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
------------------------------
Date: Wed, 13 Jul 2005 06:50:49 -0400
From: Sherm Pendley <sherm@dot-app.org>
Subject: Re: Are there any other GUI toolkits for perl than perl/Tk?
Message-Id: <m2u0iznfna.fsf@Sherm-Pendleys-Computer.local>
ngoc <ngoc@yahoo.com> writes:
> Hi
> There are some limitations of perl/Tk. I am Looking for other toolkits
> better than Tk.
Better in what way? For what OS(es)?
See my .sig for one that I'm pretty happy with for Mac OS X, and soon GNUStep.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Wed, 13 Jul 2005 09:43:42 -0400
From: zentara <zentara@highstream.net>
Subject: Re: Are there any other GUI toolkits for perl than perl/Tk?
Message-Id: <d36ad15ct1okc9tcuf548iesi68aeoq98e@4ax.com>
On Wed, 13 Jul 2005 08:17:32 +0200, ngoc <ngoc@yahoo.com> wrote:
>Hi
>There are some limitations of perl/Tk. I am Looking for other toolkits
>better than Tk.
>Thanks
>ngoc
Better? In what way? Are you really looking for a "point-and-click GUI
designer"? LIke Glade?
There is Gtk2 and Wx( Gtk2 is behind the scenes on linux ).
But they are much harder to use than Tk, and if you run into problems,
you will find very few people who will answer your questions.
For instance, just to have your gtk2-gui exit, when you hit the X in
your window-manager controls, you have to program that in. Tk does
it automatically. That is just the beginning of the details which
gtk2-perl demands of you. So do you want to spend all day, looking
through poor documentation, to get your gtk2-perl gui working? Or
do you want to use Tk and be running in a few minutes?
I am currently trying to learn Gtk2-perl , after learning Tk. And I will
tell you flat out, that Tk is easier, and has less limitations than
Gtk2. I'm not saying the underlying code foundation of Tk is better,
but do you care as long as it works?
Try using the Gnome2::Canvas and then try the Tk::Canvas. Tk is
so much easier to use. Tk also has Zinc, which is a Canvas-on-steroids.
Go ahead, take your Gnome2::Canvas and try to make a pie-shape,
then try it on Tk. I don't even think it can be done on Gnome2::Canvas.
On the other hand, the Gnome2::Canvas does have some great features
built into it, but it's currently available widget set is pretty poor,
let alone any documentation on how to use them. Can you make a Bezier
curve on Gnome2::Canvas? It's simple on Tk::Canvas.
So which GUI is limited?
I just don't understand how Tk got the bad reputation. I'm getting the
feeling that it's like the people who use Python saying Perl is "too
obtuse or obsolete" for them. I think it really is that they just never
took the time to learn it. Once they learn it, they never want to use
anything else.
The same with Tk. They try to learn, and get discouraged, and say
"this sucks, others say it sucks, there must be something better".
But once you learn it, it's like Perl, it's the first thing you reach
for when making an app.
People complain that Tk is "ugly". Well it all depends on how much
effort you want to put into the appearance. Gtk2-perl does have the
powerful "themes" to make apps look very nice, but just try to figure
them out!! And what about when someone who dosn't have your "theme"
installed, tries to run your app.....it will look ugly.
So what exactly are your perceived limitations of Tk, in regards to what
sort of program?
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
------------------------------
Date: Wed, 13 Jul 2005 16:13:05 +0200
From: ngoc <ngoc@yahoo.com>
Subject: Re: Are there any other GUI toolkits for perl than perl/Tk?
Message-Id: <42d5216b@news.broadpark.no>
The reason I say perl/Tk have limitations are.
I now maintain a package of software of nearly 100 apps that use Listbox
to display tabular data. It is ugly. I want to make better. Looking
around www.perltk.org, I see Columns, but it is not good in resizing of
column. Asking perlTk forum and web search, I learn about MListbox,
TableMatrix and TixGrid. Only MListbox is considered as good one for me.
It has 2 things I dislike. It does not resize after longest string .And
height and width is height and width of column(listbox), not pane. So
when data is not filled in MListbox, the size of widget is not as
defined. But this problem is fixed, I use 3 days to modify the original
MListbox.
TableMatrix and TixGrid is a long history with bugs by installation, etc..
That is why I say perl/Tk have limitations and looking for new package
of GUI.
------------------------------
Date: Wed, 13 Jul 2005 18:53:01 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: Checking If A Function Exists
Message-Id: <db3kdu$1sr$1@slavica.ukpost.com>
Anno Siegel wrote:
> Hal Vaughan <hal@thresholddigital.com> wrote in comp.lang.perl.misc:
>
> [snip]
>
>
>>Is it possible to check and see if a particular functionname is available
>>without forcing an error?
>
> defined &filterincoming
> *filterincoming{CODE}
> main->can('filterincoming')
In practice you are only going to want to do this if the function name
is in a variable (or, in general, the result of an expression.
defined &$filterincoming
*$filterincoming{CODE}
main->can($filterincoming)
> eval { $data = filterincoming->($data) }
Er, you mean
eval { $data = filterincoming($data) }
..or in a variable..
eval { $data = $filterincoming->($data) }
------------------------------
Date: Wed, 13 Jul 2005 13:37:58 GMT
From: "Shea Martin" <sheam@hb-studios.com>
Subject: Help-> "Your vendor has not defined Win32::Process macro wait"
Message-Id: <WO8Be.60592$Ph4.1799823@ursa-nb00s0.nbnet.nb.ca>
I create a win32 process like this:
use strict;
Win32::Process::Create($g_sProcess,
$cmd , $a_sCommand, 1, Win32::Process::DETACHED_PROCESS, "." );
# this does not work, though this is what examples show
# Win32::Process->Create($g_sProcess,
# $cmd , $a_sCommand, 1, Win32::Process::DETACHED_PROCESS, "." );
Then in later in another subroutine:
I do this:
if( $g_sProcess->wait(5) )
{
$msg = "Previous command finished.\n";
$g_sProcess = 0;
}
Which generates the error in the subject line: Your vendor has not defined
Win32::Process macro wait, used at yourscript.pl.
What am I doing wrong here?
Thanks,
~S
------------------------------
Date: Wed, 13 Jul 2005 13:44:52 GMT
From: "Shea Martin" <sheam@hb-studios.com>
Subject: Re: Help-> "Your vendor has not defined Win32::Process macro wait"
Message-Id: <oV8Be.60599$Ph4.1800221@ursa-nb00s0.nbnet.nb.ca>
oops. I used 'wait' not 'Wait'.
~S
"Shea Martin" <sheam@hb-studios.com> wrote in message
news:WO8Be.60592$Ph4.1799823@ursa-nb00s0.nbnet.nb.ca...
>I create a win32 process like this:
>
> use strict;
> Win32::Process::Create($g_sProcess,
> $cmd , $a_sCommand, 1, Win32::Process::DETACHED_PROCESS, "." );
>
> # this does not work, though this is what examples show
> # Win32::Process->Create($g_sProcess,
> # $cmd , $a_sCommand, 1, Win32::Process::DETACHED_PROCESS, "." );
>
> Then in later in another subroutine:
> I do this:
> if( $g_sProcess->wait(5) )
> {
> $msg = "Previous command finished.\n";
> $g_sProcess = 0;
> }
>
> Which generates the error in the subject line: Your vendor has not defined
> Win32::Process macro wait, used at yourscript.pl.
>
> What am I doing wrong here?
>
> Thanks,
>
> ~S
>
------------------------------
Date: Wed, 13 Jul 2005 20:00:17 +0200
From: alsandrea@hotmail.it (als)
Subject: NET::LDAP filter problem.
Message-Id: <db3krh$4mn$1@news.newsland.it>
hi, I have a strange problem with the NET::LDAP search filter.
This script works fine:
sub go {
....
my $smesg = $ldap->search(
base => 'dc=XXX,dc=XXX',
scope => 'sub',
filter => 'uid=USERNAME' , <------ it's a constant ('uid=pippo')
attrs => [ 'mail' ] );
....
}
but not this:
sub go {
...
my ($var) = @_; <--- contains the same user value but read from a text file
my $smesg = $ldap->search(
base => 'dc=XXX,dc=XXX',
scope => 'sub',
filter => "uid=$var",
attrs => [ 'mail' ] );
....
}
Does anybody knows the problem, bug? Any suggestions?
Thanks.
--
questo articolo e` stato inviato via web dal servizio gratuito
http://www.newsland.it/news segnala gli abusi ad abuse@newsland.it
------------------------------
Date: Wed, 13 Jul 2005 06:59:33 -0500
From: "Tambaa Hapa" <noaddress@nodomain.com>
Subject: Re: Replace exactly match of a number
Message-Id: <db2vmc$iir$1@home.itg.ti.com>
Thanks a bunch Dave. That certainly did the trick. I guess I just needed a
little imagination!
TH
"Dave Weaver" <zen13097@zen.co.uk> wrote in message
news:42d4e0c8$0$24082$db0fefd9@news.zen.co.uk...
> Tambaa Hapa <noaddress@nodomain.com> wrote:
> > I am trying to replace a number with some string. For example, replace
&1
> > with hello. However using s/&$num/hello/g where $num = 1 also replaces
&10
> > to hello0. Anyone have any ideas on how to do this?
>
> s/&$num(?!\d)/hello/g;
>
> see "perldoc perlre" for details.
>
>
------------------------------
Date: Wed, 13 Jul 2005 12:27:50 -0400
From: yo <>
Subject: using passwd in a perl script
Message-Id: <j7gad1leqhtd9ff5j5ebcu3bprgrstlq0d@4ax.com>
I have the following perl script which works fine.
#!/usr/bin/perl
open(INFILE, "@ARGV[0]");
$infile = <INFILE>;
($username,$password) = split(/\|/, $infile);
close(INFILE);
@calladduser = ("/usr/sbin/adduser $username -g 503 -d
/home/mailusers/$username
-s /sbin/nologin -p $password","\n");
system("@calladduser");
my problem is im using shadow passwords and adduser -p doesn't use
crypt on the password.
How can i use the passwd command in this perl script to use the value
from $password without asking for user input. Another words i dont
want it to be interactive.
im not very good with perl and any help would be great
TIA, P
------------------------------
Date: Wed, 13 Jul 2005 16:34:56 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: using passwd in a perl script
Message-Id: <Xns96927FFCF52F8asu1cornelledu@127.0.0.1>
yo <> wrote in news:j7gad1leqhtd9ff5j5ebcu3bprgrstlq0d@4ax.com:
> I have the following perl script which works fine.
>
> #!/usr/bin/perl
You should always have
use strict;
use warnings;
in your script
> open(INFILE, "@ARGV[0]");
You should always, yes always, check the return value of open to see if
it succeeded.
That single line contains at least three "errors".
> @calladduser = ("/usr/sbin/adduser $username -g 503 -d
> /home/mailusers/$username
> -s /sbin/nologin -p $password","\n");
> system("@calladduser");
This is sick. Do you take pleasure in torturing the readers of your
code?
perldoc -f system
See also:
perldoc -q always
perldoc -q shadow
http://learn.perl.org/
Please read the posting guidelines for this group.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
------------------------------
Date: Wed, 13 Jul 2005 12:49:15 -0400
From: yo <>
Subject: Re: using passwd in a perl script
Message-Id: <ffhad1t7i94eif0g7q5jb4fipdb31ipi9t@4ax.com>
sorry im new to do and not a perl programmer.
i solved my problem with:
solved the problem with
@cryptpasswd = ("echo $password | passwd $username --stdin");
system("@cryptpasswd");
On Wed, 13 Jul 2005 16:34:56 GMT, "A. Sinan Unur"
<1usa@llenroc.ude.invalid> wrote:
>yo <> wrote in news:j7gad1leqhtd9ff5j5ebcu3bprgrstlq0d@4ax.com:
>
>> I have the following perl script which works fine.
>>
>> #!/usr/bin/perl
>
>You should always have
>
>use strict;
>use warnings;
>
>in your script
>
>> open(INFILE, "@ARGV[0]");
>
>You should always, yes always, check the return value of open to see if
>it succeeded.
>
>That single line contains at least three "errors".
>
>> @calladduser = ("/usr/sbin/adduser $username -g 503 -d
>> /home/mailusers/$username
>> -s /sbin/nologin -p $password","\n");
>> system("@calladduser");
>
>This is sick. Do you take pleasure in torturing the readers of your
>code?
>
>perldoc -f system
>
>See also:
>
>perldoc -q always
>perldoc -q shadow
>
>http://learn.perl.org/
>
>Please read the posting guidelines for this group.
>
>Sinan
------------------------------
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 8247
***************************************