Skip Menu |

This queue is for tickets about the Expect CPAN distribution.

Report information
The Basics
Id: 78611
Status: open
Priority: 0/
Queue: Expect

People
Owner: Nobody in particular
Requestors: ssb [...] umn.edu
Cc:
AdminCc:

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



Subject: extend Multiline_Matching to /s and /ms?
I marked this as Normal rather than Wishlist because I'm intending to offer a patch if you're open to this. I'm doing some work where I'm using Expect to implement a binary protocol and ran into a little bump because match() was returning it split on newlines. I hacked it to use /ms if $Expect::Multiline_Matching was set to 2. I'd intend to make this into a patch where 2 would result in /s and 3 would result in /ms. Would you be willing to consider incorporating this?
Am Fr 27. Jul 2012, 14:47:49, https://openid.umn.edu/ssb schrieb: Show quoted text
> I marked this as Normal rather than Wishlist because I'm intending to > offer a patch if you're open to this. > > I'm doing some work where I'm using Expect to implement a binary > protocol and ran into a little bump because match() was returning it > split on newlines. I hacked it to use /ms if > $Expect::Multiline_Matching was set to 2. I'd intend to make this
into Show quoted text
> a patch where 2 would result in /s and 3 would result in /ms. > > Would you be willing to consider incorporating this?
Hmm, do you know that you do not need to set $Expect::Multiline_Matching, because you can add the 'ms' option within the regexp by just adding '(?ms)' to it? Or you construct the regexp as an object via qr//ms. Can you test if this works for you? Roland -- RGiersig@cpan.org
Subject: Re: [rt.cpan.org #78611] extend Multiline_Matching to /s and /ms?
Date: Mon, 6 Aug 2012 16:36:34 -0500
To: bug-Expect [...] rt.cpan.org
From: Scott Bertilson <ssb [...] umn.edu>
Yes that does it. I've seen the (? stuff in other people's code, but never took the time to look into it...thanks. Scott On Mon, Jul 30, 2012 at 11:03 AM, Roland Giersig via RT < bug-Expect@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=78611 > > > Am Fr 27. Jul 2012, 14:47:49, https://openid.umn.edu/ssb schrieb:
> > I marked this as Normal rather than Wishlist because I'm intending to > > offer a patch if you're open to this. > > > > I'm doing some work where I'm using Expect to implement a binary > > protocol and ran into a little bump because match() was returning it > > split on newlines. I hacked it to use /ms if > > $Expect::Multiline_Matching was set to 2. I'd intend to make this
> into
> > a patch where 2 would result in /s and 3 would result in /ms. > > > > Would you be willing to consider incorporating this?
> > Hmm, do you know that you do not need to set > $Expect::Multiline_Matching, because you can add the 'ms' option within > the regexp by just adding '(?ms)' to it? Or you construct the regexp as > an object via qr//ms. > > Can you test if this works for you? > > Roland > -- > RGiersig@cpan.org >