[1038] in BarnOwl Developers
[arolfe@MIT.EDU: Re: [D-O-H] r990 -
daemon@ATHENA.MIT.EDU (Nelson Elhage)
Thu Oct 29 18:12:22 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@nelhage.com
Date: Wed, 16 Apr 2008 16:41:32 -0400
From: Nelson Elhage <nelhage@MIT.EDU>
To: barnowl-dev@mit.edu
I bet this is geofft's bug. I don't have time to deal right now, but
I'll fix it later tonight if no one's beat me to it.
- Nelson
----- Forwarded message from Alex Rolfe <arolfe@MIT.EDU> -----
From: Alex Rolfe <arolfe@MIT.EDU>
To: nelhage@MIT.EDU
Subject: Re: [D-O-H] r990 - trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module
Date: Wed, 16 Apr 2008 16:38:38 -0400
X-Spam-Score: 0.001
X-Spam-Flag: NO
X-Scanned-By: MIMEDefang 2.42
> +Getopt::Long::Configure(qw(no_getopt_compat prefix_pattern="-|--"));
This broke replying to jabber messages when using r1021 from svn. I'd
get an error message because the call to GetOptions (Jabber.pm, like
475) would not find anything and then @ARGV would have length > 1.
Changing it to
Getopt::Long::Configure(qw(no_getopt_compat prefix_pattern=-|--));
makes replying work correctly again. This is with perl 5.8.8 on
Debian. I don't know if this is a bug in my owl install (which has been
upgraded through numerous versions from subversion) or whether you made
a quoting mistake.
Alex
nelhage@MIT.EDU writes:
> Modified:
> trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
> Log:
> Fix sending jabbers to JIDs beginning with `+'
>
>
> Modified: trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
> ===================================================================
> --- trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm 2008-03-21 18:47:51 UTC (rev 989)
> +++ trunk/owl/perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm 2008-03-26 06:24:26 UTC (rev 990)
> @@ -24,6 +24,7 @@
> use Net::Jabber::MUC;
> use Net::DNS;
> use Getopt::Long;
> +Getopt::Long::Configure(qw(no_getopt_compat prefix_pattern="-|--"));
>
> our $VERSION = 0.1;
>
> @@ -476,7 +477,7 @@
> 'subject=s' => \$jwrite_subject,
> 'account=s' => \$from,
> 'id=s' => \$jwrite_sid,
> - );
> + ) or die("Usage: jwrite JID [-t thread] [-s 'subject'] [-a account]\n");
> $jwrite_type = 'groupchat' if $gc;
>
> if ( scalar @ARGV != 1 ) {
> @@ -566,7 +567,7 @@
> }
>
> my $getopt = Getopt::Long::Parser->new;
> - $getopt->configure('pass_through');
> + $getopt->configure('pass_through', 'no_getopt_compat');
> $getopt->getoptions( 'account=s' => \$jid );
> $jid ||= defaultJID();
> if ($jid) {
> @@ -730,7 +731,7 @@
> my @groups;
> my $purgeGroups;
> my $getopt = Getopt::Long::Parser->new;
> - $getopt->configure('pass_through');
> + $getopt->configure('pass_through', 'no_getopt_compat');
> $getopt->getoptions(
> 'account=s' => \$jid,
> 'group=s' => \@groups,
----- End forwarded message -----