Skip Menu |

This queue is for tickets about the Mail-Box CPAN distribution.

Report information
The Basics
Id: 119574
Status: resolved
Priority: 0/
Queue: Mail-Box

People
Owner: Nobody in particular
Requestors: thomas.seeling [...] gmx.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: uninitialized variable in regex match
Date: Thu, 29 Dec 2016 17:51:24 +0100
To: bug-Mail-Box [...] rt.cpan.org
From: Thomas Seeling <thomas.seeling [...] gmx.net>
Subject: uninitialized variable in regex match
To: bug-Mail-Box [...] rt.cpan.org
From: Thomas Seeling <thomas.seeling [...] gmx.net>
Hallo, I encountered the following error message when using pop3s: Use of uninitialized value $Mail::Box::Net::a in pattern match (m//) at /usr/lib/perl5/site_perl/5.24.0/Mail/Box/Net.pm line 40. I believe there is a variable $a used but it should read $d. $a does not occur anywhere in the init function. Tschau...Thomas -- "Do you wanna be a legend or a passing footprint on the sands of time?"
Download signature.asc
application/pgp-signature 490b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #119574] uninitialized variable in regex match
Date: Thu, 29 Dec 2016 18:04:21 +0100
To: Thomas Seeling via RT <bug-Mail-Box [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Thomas Seeling via RT (bug-Mail-Box@rt.cpan.org) [161229 16:52]: Show quoted text
> Thu Dec 29 11:51:41 2016: Request 119574 was acted upon. > Transaction: Ticket created by thomas.seeling@gmx.net > Queue: Mail-Box > Subject: uninitialized variable in regex match > > I encountered the following error message when using pop3s: > Use of uninitialized value $Mail::Box::Net::a in pattern match (m//) at > /usr/lib/perl5/site_perl/5.24.0/Mail/Box/Net.pm line 40. > > I believe there is a variable $a used but it should read $d. > $a does not occur anywhere in the init function.
Yes, your conclusion is correct. Apparently no-one ever used that code-path. Can you try that change? $a is an exception under "use strict", because its history with sort() -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #119574] uninitialized variable in regex match
Date: Thu, 29 Dec 2016 19:02:59 +0100
To: bug-Mail-Box [...] rt.cpan.org
From: Thomas Seeling <thomas.seeling [...] gmx.net>
Subject: Re: [rt.cpan.org #119574] uninitialized variable in regex match
To: bug-Mail-Box [...] rt.cpan.org
From: Thomas Seeling <thomas.seeling [...] gmx.net>
Hallo, Show quoted text
> Yes, your conclusion is correct. Apparently no-one ever used > that code-path. Can you try that change?
I changed $a to $d and the warning disappears. The perl debugger confirms that the regex can be parsed correctly. Strange that "noone ever used that". Is it so uncommon to use pop3s in automation tools? Thanks for the quick response, thanks for your perl modules and a happy new year! Tschau...Thomas -- "Do you wanna be a legend or a passing footprint on the sands of time?"
Download signature.asc
application/pgp-signature 490b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #119574] uninitialized variable in regex match
Date: Thu, 29 Dec 2016 19:56:35 +0100
To: Thomas Seeling via RT <bug-Mail-Box [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Thomas Seeling via RT (bug-Mail-Box@rt.cpan.org) [161229 18:03]: Show quoted text
> Queue: Mail-Box > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=119574 > > > Strange that "noone ever used that". Is it so uncommon to use pop3s in > automation tools?
That code is only run when the folderdir parameter is used, however you may also pass these parameters separately. I expect that nearly everyone is using that. I known that there are people using the POP3 plugin. Show quoted text
> [...] and a happy new year!
Same for you! All the best for 2017 -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #119574] uninitialized variable in regex match
Date: Wed, 4 Jan 2017 14:16:46 +0100
To: bug-Mail-Box [...] rt.cpan.org
From: Thomas Seeling <thomas.seeling [...] gmx.net>
Subject: Re: [rt.cpan.org #119574] uninitialized variable in regex match
To: bug-Mail-Box [...] rt.cpan.org
From: Thomas Seeling <thomas.seeling [...] gmx.net>
Hallo, a minor bugreport in addition to my previous one: the man-page for Mail::Box::Manager does not explain the "type" option, but it mentions it in the example for the open() method. Do you mind helping me out? Just out of curiosity I wanted to separate the url in single parameters, but I fail although I thought I had it all sorted out. The open() call in the comments does not work. Do you see what I'm doing wrong? my $url = "pop3s://thomas.seeling%40t-online.de:***\@securepop.t-online.de:995/"; my $folder = $mgr->open( $url, extract => 'LAZY'); #my $folder = $mgr->open( type => 'pop3s', # username => 'thomas.seeling%40t-online.de', # password => '***', # server_name => 'securepop.t-online.de', # server_port => '995', # folder => '/', # extract => 'LAZY'); ERROR: Could not authenticate using any login method ERROR: Cannot create POP3 client for /. WARNING: Folder does not exist, failed opening pop3s folder pop3s://thomas.seeling%40t-online.de@securepop.t-online.de:995. Tschau...Thomas -- "Do you wanna be a legend or a passing footprint on the sands of time?"
Download signature.asc
application/pgp-signature 490b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #119574] uninitialized variable in regex match
Date: Sat, 7 Jan 2017 17:45:15 +0100
To: Thomas Seeling via RT <bug-Mail-Box [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Thomas Seeling via RT (bug-Mail-Box@rt.cpan.org) [170104 13:17]: Show quoted text
> Queue: Mail-Box > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=119574 > > > a minor bugreport in addition to my previous one: > the man-page for Mail::Box::Manager does not explain the "type" option, > but it mentions it in the example for the open() method.
Weird, the doc is in my sources. I do see the option explain in http://search.cpan.org/~markov/Mail-Box-2.120/lib/Mail/Box/Manager.pod and also https://metacpan.org/pod/distribution/Mail-Box/lib/Mail/Box/Manager.pm#type-=%3E-FOLDERTYPENAME|FOLDERTYPE Show quoted text
> my $url = > "pop3s://thomas.seeling%40t-online.de:***\@securepop.t-online.de:995/";
The url parser expects a '@', not '%40'. What do the standards say? -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #119574] uninitialized variable in regex match
Date: Sun, 8 Jan 2017 12:11:16 +0100
To: bug-Mail-Box [...] rt.cpan.org
From: Thomas Seeling <thomas.seeling [...] gmx.net>
Subject: Re: [rt.cpan.org #119574] uninitialized variable in regex match
To: bug-Mail-Box [...] rt.cpan.org
From: Thomas Seeling <thomas.seeling [...] gmx.net>
Hallo, Show quoted text
> Weird, the doc is in my sources.
my fault, I missed it, I expected it another place in the docs, at "synopsis". There should be a complete list of possible arguments to the type attribute, like pop3, pop3s, <object name> or whatever. Show quoted text
> The url parser expects a '@', not '%40'. What do the standards say?
my username is name@t-online.de, and when I wrote my script I assumed it might confuse the parser, depending on the direction of search (ltr or rtl). %40 is working for me ever since, and %40 is hex for @. Tschau...Thomas -- "Do you wanna be a legend or a passing footprint on the sands of time?"
Download signature.asc
application/pgp-signature 490b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #119574] uninitialized variable in regex match
Date: Sun, 8 Jan 2017 22:09:14 +0100
To: Thomas Seeling via RT <bug-Mail-Box [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Thomas Seeling via RT (bug-Mail-Box@rt.cpan.org) [170108 11:17]: Show quoted text
> Queue: Mail-Box > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=119574 > > > "synopsis". There should be a complete list of possible arguments to the > type attribute, like pop3, pop3s, <object name> or whatever.
Ah. Well, you can easily find it in the source code. But I have now added that to the doc. Show quoted text
>
> > The url parser expects a '@', not '%40'. What do the standards say?
> > my username is name@t-online.de, and when I wrote my script I assumed it > might confuse the parser, depending on the direction of search (ltr or > rtl). %40 is working for me ever since, and %40 is hex for @.
You are correct. When it contains an '@', it must be encoded. You probably guessed right. This is the code of decodeURL(). It decodes your url correctly. my $url = "pop3s://thomas.seeling%40t-online.de:***\@securepop.t-online.de:995/"; my ($type, $username, $password, $hostname, $port, $path) = $url =~ m!^(\w+)\: # protocol (?:// (?:([^:@/]*) # username (?:\:([^@/]*))? # password \@)? ([\w.-]+)? # hostname (?:\:(\d+))? # port number )? (.*) # foldername !x; print "($type, $username, $password, $hostname, $port, $path)\n"; --> (pop3s, thomas.seeling%40t-online.de, ***, securepop.t-online.de, 995, /) So, what is going wrong. Can you do some debugging yourself (just put print statement in Manager.pm ;-) -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions drs Mark A.C.J. Overmeer MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Discussion stopped long time ago