Skip Menu |

This queue is for tickets about the Plack-Handler-Stomp CPAN distribution.

Report information
The Basics
Id: 84096
Status: resolved
Priority: 0/
Queue: Plack-Handler-Stomp

People
Owner: Nobody in particular
Requestors: SDESEILLE [...] cpan.org
Cc:
AdminCc:

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



Subject: problem with test nonetwork.t on Win32
Hi DAKKAR I just try to install your last version on Strawberry Perl on Win32 without success. I joined my build.log if it can help you. regards sdeseille
Subject: build.log
Download build.log
application/octet-stream 6.7k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #84096] problem with test nonetwork.t on Win32
Date: Wed, 20 Mar 2013 17:44:19 +0000
To: bug-Plack-Handler-Stomp [...] rt.cpan.org
From: Gianni Ceccarelli <dakkar [...] thenautilus.net>
On 2013-03-20 "Sébastien Deseille via RT" <bug-Plack-Handler-Stomp@rt.cpan.org> wrote: Show quoted text
> I just try to install your last version on Strawberry Perl on Win32 > without success. I joined my build.log if it can help you.
Thank you! It does. I'll get a new dev release out today or tomorrow, please check if it will fix the problem. -- Dakkar - <Mobilis in mobile> GPG public key fingerprint = A071 E618 DD2C 5901 9574 6FE2 40EA 9883 7519 3F88 key id = 0x75193F88 Greebo could, in fact, commit sexual harrassment simply by sitting very quietly in the next room. -- (Terry Pratchett, Maskerade)
Download signature.asc
application/pgp-signature 198b

Message body not shown because it is not plain text.

On Wed Mar 20 13:44:45 2013, dakkar@thenautilus.net wrote: Show quoted text
> On 2013-03-20 "Sébastien Deseille via RT" > <bug-Plack-Handler-Stomp@rt.cpan.org> wrote:
> > I just try to install your last version on Strawberry Perl on Win32 > > without success. I joined my build.log if it can help you.
> > Thank you! It does. I'll get a new dev release out today or tomorrow, > please check if it will fix the problem. >
The problem is fixed but the test end with another error message. I joined a new build.log. Would you accept to explain to me how you have solved the problem with the path "C:\temp\SsoLeTxq4S/_queue_not_subscribed/1363798854.36413-send-cjFa" ? I understood it is link to the mix of slash and backslash but nothing more. regards sdeseille
Subject: build.log
Download build.log
application/octet-stream 5.9k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #84096] problem with test nonetwork.t on Win32
Date: Thu, 21 Mar 2013 10:18:15 +0000
To: bug-Plack-Handler-Stomp [...] rt.cpan.org
From: Gianni Ceccarelli <dakkar [...] thenautilus.net>
On 2013-03-20 "Sébastien Deseille via RT" Show quoted text
> The problem is fixed but the test end with another error message. > I joined a new build.log.
Thank you again. It seems that Perl on Windows really does not like 'fork' and 'kill', I'll have to figure out a better way of spawning processes and stopping them. Show quoted text
> Would you accept to explain to me how you have solved the problem > with the path > "C:\temp\SsoLeTxq4S/_queue_not_subscribed/1363798854.36413-send-cjFa" > ? I understood it is link to the mix of slash and backslash but > nothing more.
It's a bit of a mess… Plack::Handler::Stomp::NoNetwork uses File::ChangeNotify to look for files containing STOMP frames under a directory. File::ChangeNotify, when it can't use more advanced filesystem-monitoring techniques, uses File::Find in a loop to detect added/removed files. File::Find seems to have a little problem building filenames under Windows: it will mix the slashes. My test is checking that the correct files were produced by my code, by building a regular expression for the expected filename, and comparing it with what File::ChangeNotify returned. Due to the bug with the slashes, my regex was not matching the returned string. So I built a more complicated regex: my $sent_dir_re = join '[/\\\\]', map {quotemeta} $sent_dir->volume,$sent_dir->dir_list(1); C<$sent_dir> is a Path::Class object; C<< ->volume >> returns "C:" or something similar on Windows, an empty string on systems that don't have volumes; C<< ->dir_list(1) >> returns the list of directory names (skipping the first empty string that would signify "start at the root"). I pass them through C<quotemeta> to make sure that the regex engine won't get confused by strange characters, then join these strings with C< [/\\] > (there's 4 back-slashes in the source because that thing will be interpreted twice…). So, starting from a directory name of: C:\temp\SsoLeTxq4S\_queue_not_subscribed I get this regex: C:[/\\]temp[/\\]SsoLeTxq4S[/\\]_queue_not_subscribed which will match whatever mix of slashes I get handed. -- Dakkar - <Mobilis in mobile> GPG public key fingerprint = A071 E618 DD2C 5901 9574 6FE2 40EA 9883 7519 3F88 key id = 0x75193F88 I wouldn't ever write the full sentence myself, but then, I never use goto either. -- Larry Wall in <199709032332.QAA21669@wall.org>
Download signature.asc
application/pgp-signature 198b

Message body not shown because it is not plain text.

Hi DAKKAR Thank you to all you help me to understand. regards sdeseille On Thu Mar 21 06:18:37 2013, dakkar@thenautilus.net wrote: Show quoted text
> On 2013-03-20 "Sébastien Deseille via RT"
> > The problem is fixed but the test end with another error message. > > I joined a new build.log.
> > Thank you again. It seems that Perl on Windows really does not like > 'fork' and 'kill', I'll have to figure out a better way of spawning > processes and stopping them. >
> > Would you accept to explain to me how you have solved the problem > > with the path > > "C:\temp\SsoLeTxq4S/_queue_not_subscribed/1363798854.36413-send-cjFa" > > ? I understood it is link to the mix of slash and backslash but > > nothing more.
> > It's a bit of a mess… Plack::Handler::Stomp::NoNetwork uses > File::ChangeNotify to look for files containing STOMP frames under a > directory. File::ChangeNotify, when it can't use more advanced > filesystem-monitoring techniques, uses File::Find in a loop to detect > added/removed files. File::Find seems to have a little problem > building filenames under Windows: it will mix the slashes. > > My test is checking that the correct files were produced by my code, > by building a regular expression for the expected filename, and > comparing it with what File::ChangeNotify returned. Due to the bug > with the slashes, my regex was not matching the returned string. So I > built a more complicated regex: > > my $sent_dir_re = join '[/\\\\]', map {quotemeta} > $sent_dir->volume,$sent_dir->dir_list(1); > > C<$sent_dir> is a Path::Class object; C<< ->volume >> returns "C:" or > something similar on Windows, an empty string on systems that don't > have volumes; C<< ->dir_list(1) >> returns the list of directory names > (skipping the first empty string that would signify "start at the > root"). I pass them through C<quotemeta> to make sure that the regex > engine won't get confused by strange characters, then join these > strings with C< [/\\] > (there's 4 back-slashes in the source because > that thing will be interpreted twice…). So, starting from a directory > name of: > > C:\temp\SsoLeTxq4S\_queue_not_subscribed > > I get this regex: > > C:[/\\]temp[/\\]SsoLeTxq4S[/\\]_queue_not_subscribed > > which will match whatever mix of slashes I get handed. >
Version 1.07 is on its way to CPAN, I have run the tests in a Windows VM and they all pass now. Thanks for your help!
Hi DAKAR I just installed your module with success I join my build.log Thank you to support Win32 users regards sdeseille On Wed Mar 27 19:01:42 2013, DAKKAR wrote: Show quoted text
> Version 1.07 is on its way to CPAN, I have run the tests in a Windows > VM and they all pass now. > > Thanks for your help!
Subject: build.log
Download build.log
application/octet-stream 6.4k

Message body not shown because it is not plain text.