[26144] in Perl-Users-Digest
Perl-Users Digest, Issue: 8335 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 19 00:05:38 2005
Date: Thu, 18 Aug 2005 21:05:05 -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, 18 Aug 2005 Volume: 10 Number: 8335
Today's topics:
debian rename <shane@weasel.is-a-geek.net>
Listing Folders with Net::IMAP <jon@watcher.net.nz>
Module Can't Access Routines in Another Module (even wi <hal@thresholddigital.com>
Re: Module Can't Access Routines in Another Module (eve <hal@thresholddigital.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 19 Aug 2005 14:58:14 +1200
From: Shane <shane@weasel.is-a-geek.net>
Subject: debian rename
Message-Id: <pan.2005.08.19.02.58.13.854369@weasel.is-a-geek.net>
Hi all <g>
This piece of perl works brill for me on my slackware machine, but not on
my debian machine, any ideas why?
sub changename{
my @list = &unread;
foreach $mail(@list){
my $old_name = $mail;
($mail=~s/2,$/2,S/);
rename($old_name, $mail);
print $old_name."\n";
}}
whats Im trying to do is mark mail as read on a imap server by appending
an S on the end
TIA
--
Hardware, n.: The parts of a computer system that can be kicked
The best way to get the right answer on usenet is to post the wrong one.
------------------------------
Date: Fri, 19 Aug 2005 13:28:59 +1200
From: "Jon" <jon@watcher.net.nz>
Subject: Listing Folders with Net::IMAP
Message-Id: <de3cli$tnj$1@lust.ihug.co.nz>
I'm trying to write an IMAP Webmail Client using Net::IMAP and am having
problems getting a list of IMAP
folders.
#!/usr/bin/perl
use Data::Dumper;
use Net::IMAP;
use strict;
use warnings;
my $imap = new Net::IMAP( "example.net" );
my $result = $imap->login( "username", "password" );
if ($result->{Status} ne "ok")
{
die ("Authentication Failed");
}
my @folders = $imap->list( "", "%" );
print Dumper( @folders );
$imap->logout;
With the code above I was expecting @folders to be populated with the
available folders on the server. Instead it produces this.
$VAR1 = bless( {
'StatusCode' => undef,
'Status' => 'ok',
'Text' => 'List completed.',
'Sequence' => '3'
}, 'Net::IMAP::Response' );
Is anybody able to point me in the right direction?
Thanks,
--
Jon
jon@watcher.net.nz
------------------------------
Date: Thu, 18 Aug 2005 21:41:19 -0400
From: Hal Vaughan <hal@thresholddigital.com>
Subject: Module Can't Access Routines in Another Module (even with "use" statement!)
Message-Id: <BcWdnZ2dnZ0KWwTznZ2dnV2lmN6dnZ2dRVn-y52dnZ0@comcast.com>
I've seen this come up before, and when it did, I thought maybe a typo was
involved (which is VERY hard for me to detect -- a little like dyslexia,
but harder to explain), so I retyped the lines involved, and that seemed to
fix it. It isn't helping now.
I have a program that uses ModuleA. It also uses ModuleB. ModuleB also
needs ModuleC. Both ModuleB and ModuleC use ModuleA. In each case, I
have:
use myLib::comm::ModuleA;
On the first line in ModuleB that uses a function in ModuleA, when it gets
to that line, I get:
Undefined subroutine &myLib::comm::ModuleA called at comm/ModuleB.pm line
281.
I have an almost identical situation with another program that uses ModuleC,
also calls ModuleB, and never has any issue or problem.
So why is it that ModuleB is NOT loading, using, or recognizing ModuleA? Is
there a problem using a particular module in one module when it's used in
the main program or in other modules that are in use? I've never seen this
happen before.
Thanks for any help!
Hal
------------------------------
Date: Thu, 18 Aug 2005 21:56:02 -0400
From: Hal Vaughan <hal@thresholddigital.com>
Subject: Re: Module Can't Access Routines in Another Module (even with "use" statement!)
Message-Id: <BcWdnZ2dnZ0FWwTznZ2dnbOhmN6dnZ2dRVn-y52dnZ0@comcast.com>
Sorry -- I transposed module names from notes, since this was running on a
different system. Corrections are below:
Hal Vaughan wrote:
> I've seen this come up before, and when it did, I thought maybe a typo was
> involved (which is VERY hard for me to detect -- a little like dyslexia,
> but harder to explain), so I retyped the lines involved, and that seemed
> to
> fix it. It isn't helping now.
>
> I have a program that uses ModuleA. It also uses ModuleB. ModuleB also
> needs ModuleC. Both ModuleB and ModuleC use ModuleA. In each case, I
> have:
>
> use myLib::comm::ModuleA;
Should be:
use myLib::ModuleA;
> On the first line in ModuleB that uses a function in ModuleA, when it gets
> to that line, I get:
>
> Undefined subroutine &myLib::comm::ModuleA called at comm/ModuleB.pm line
> 281.
Should be:
Undefined subroutine &myLib::ModuleB::ModuleA called at comm/ModuleB.pm line
281.
> I have an almost identical situation with another program that uses
> ModuleC, also calls ModuleB, and never has any issue or problem.
>
> So why is it that ModuleB is NOT loading, using, or recognizing ModuleA?
> Is there a problem using a particular module in one module when it's used
> in
> the main program or in other modules that are in use? I've never seen
> this happen before.
>
> Thanks for any help!
>
> Hal
Sorry for the misunderstanding -- my fault for reading the notes wrong.
Hal
------------------------------
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 8335
***************************************