[26017] in Perl-Users-Digest
Perl-Users Digest, Issue: 8233 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 8 16:21:38 2005
Date: Thu, 7 Jul 2005 08: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 Thu, 7 Jul 2005 Volume: 10 Number: 8233
Today's topics:
Re: DBD::Sybase / DBD::ODBC + FreeTDS woes - placeholde <richard@zync.co.uk>
Re: FAQ 2.17 Where do I send bug reports? <noreply@gunnar.cc>
Re: Gtk2 radio buttons problem <zentara@highstream.net>
Re: Is there a name for secondary or derived properties <pilkowsk@informatik.uni-marburg.de>
Re: sorting <tadmc@augustmail.com>
Re: validating Xml in perl <vikrantREMOVE@DELETEsaysnetsoftDDDD.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 07 Jul 2005 11:46:06 GMT
From: Richard Gration <richard@zync.co.uk>
Subject: Re: DBD::Sybase / DBD::ODBC + FreeTDS woes - placeholders and implicit datatype conversions
Message-Id: <pan.2005.07.07.11.46.05.967403@zync.co.uk>
[ Apologies for multi-post, something happened to the post in this ng and
I really wanted to thank you both]
Thank you very much, both Anthony and Michael, for the useful advice,
comments and encouragement. I have it all working now :-) I'm so happy!
Thank you, thank you, thank you.
I installed Sybase 12.5.3 on Gentoo very easily. I had a bit of trouble
installing apache, but that was all down to Gentoo's package management
system. I loaded some backups from the 11.0.3 server and they were
converted fine by Sybase. Perl connects fine via DBD::Sybae. sqsh insisted
on compiling against freetds, but again that's a Gentoo pkg mgmt issue.
Not a problem!
I hope this info is of some use to someone else.
Rich
------------------------------
Date: Thu, 07 Jul 2005 12:10:38 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: FAQ 2.17 Where do I send bug reports?
Message-Id: <3j4dcuFo6sgsU1@individual.net>
PerlFAQ Server wrote:
>
> 2.17: Where do I send bug reports?
>
> If you are reporting a bug in the perl interpreter or the modules
> shipped with Perl, use the *perlbug* program in the Perl distribution or
> mail your report to perlbug@perl.org .
Shouldn't http://rt.perl.org/perlbug/ and http://rt.cpan.org/ be mentioned?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Thu, 07 Jul 2005 08:37:57 -0400
From: zentara <zentara@highstream.net>
Subject: Re: Gtk2 radio buttons problem
Message-Id: <n88qc1tto2p1ki1k51n1vqkknthj5rhbqu@4ax.com>
On Wed, 6 Jul 2005 17:11:32 +0200, "Sylvie" <reply@newsgroup.invalid>
wrote:
>"zentara" <zentara@highstream.net> wrote:
>
>> You can setup signal blockers. I did it manually here, but if you had
>> alot of buttons, you could do it all by putting the buttons in a hash,
>> and looping through the hash to set the blockers/unblockers:
>
><snip code>
>
>Thank you, this works almost perfect. Only problem left: when I click on a
>radio button and drag the mouse to another radio button (while mouse is
>still clicked) the signals get blocked and cannot be unblocked. Do you have
>any idea how to fix this?
Yeah, teach your users how to use a mouse. :-)
I don't see any problem with the operation, as you describe it
on my system(linux). If I enter a radiobutton zone, and
left-click-and-hold-down, then drag to the other button,
nothing happens. Its as if the button says "maybe you changed
your mind, and I won't toggle until I see a button release". If
I let go of the button, the function goes back to normal.
The radiobutton's are set to toggle on a button-release.
So I have no idea why you would want to change that behavior,
or what you are trying to accomplish.
Are you using a recent version of gtk2-perl? Or are you on MSWindows?
If it's a MSWindows problem, maybe you should ask on the
gtk2-perl maillist.
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
------------------------------
Date: Thu, 7 Jul 2005 11:30:25 +0200
From: Fabian Pilkowski <pilkowsk@informatik.uni-marburg.de>
Subject: Re: Is there a name for secondary or derived properties?
Message-Id: <3j4b11FnisfvU1@individual.net>
* fishfry schrieb:
> For
> example, if a user calls isMovie() on a program object whose star-rating
> has not been set yet, then isMovie() will return false, which is an
> inaccurate result. In fact, at that moment the Program object is really
> in an "incomplete" state, and the result of isMovie() is really
> indeterminate.
>
> To do this correctly, the documentation should inform the caller that
> isMovie() must not be called until the Program object is completely
> initialized ... but how would they know when that is?
To do this correctly your constructor should expect some parameters for
initialization. Therewith you avoid such an indeterminate state of your
object. IMHO it's not really pretty to give someone an almost empty
object and force him to set its attributes afterwards. Do it the other
way round: Create your object after you have all informations you need
to avoid such problems.
>
> I was wondering if there is some computer science term for this concept
> of primary versus derived attribute of an object, and if there is a
> recommended way to handle it.
I don't know a term for that (which doesn't mean that there is no one).
But I would implement both kinds of attributes identically, without any
anonymous subs.
>
> sub isMovie {
> my($self) = shift;
> return $self->{'_isMovie'}->();
> }
>
> Is this a reasonable way to do this kind of thing? I don't think I've
> ever felt the need to use an anonmous subroutine before, but in this
> instance it felt natural.
I would write it as
sub isMovie {
my $self = shift;
return defined $self->{_starRating} ? 1 : 0;
}
This way, the information that "isMovie" depends on "_starRating" is
clear when looking at this sub. Otherwise you have to look at the
constructor to find this out. And IMHO it's unusual to hide such info in
the constructor. Btw, from the programmers point of view there is
absolutely no difference between isMovie() and other methods (you called
"primary" ones).
regards,
fabian
------------------------------
Date: Thu, 7 Jul 2005 07:35:15 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: sorting
Message-Id: <slrndcq8c3.fll.tadmc@magna.augustmail.com>
Luthor <bbrunno3000@yahoo.con> wrote:
> I have the following hash:
>
> %hash
> $hash->{value1}->{value2}
There are *two* completely different variables there, with similar-looking
names.
Perhaps you meant to access the %hash variable instead?
$hash{value1}->{value2}
> how can I sort the hash based on value2?
The way the Perl FAQ says to.
perldoc -q sort
How do I sort a hash (optionally by value instead of key)?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 07 Jul 2005 20:14:06 +0530
From: Vikrant <vikrantREMOVE@DELETEsaysnetsoftDDDD.com>
Subject: Re: validating Xml in perl
Message-Id: <dajf5u$5go$2@domitilla.aioe.org>
Michel Rodriguez wrote:
> I used XML::Parser, but XML::LibXML would be very similar. As many
> mentionned before, this will only check well-formedness, not validity of
> the XML, see the XML spec itself (
> http://www.w3.org/TR/2004/REC-xml-20040204/ ) for more on the difference
> between the 2.
>
>
thanks for the info
vikrant
------------------------------
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 8233
***************************************