-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter::Simple with immediately following "no" #11853
Comments
From user42@zip.com.auWith recent debian perl 5.14.2, if a Filter::Simple module is turned off use MyFilter; then the remaining script after the "no" is ignored. The attached perl foo.el I expected it to print "this part is not filtered", but it doesn't. If I struck this with Smart::Comments when I'd deleted everything between Nosing around Filter::Simple it looks like when the terminator is found I expect it ought to return with "no MyFilter" or suitably mangled Dunno if an empty "use/no" block ought to be shown to the FILTER{} etc |
From user42@zip.com.au |
From user42@zip.com.auFlags: Site configuration information for perl 5.14.2: Configured by Debian Project at Mon Nov 28 21:49:25 UTC 2011. Summary of my perl5 (revision 5 version 14 subversion 2) configuration: Locally applied patches: |
From @rjbsI have attempted to reproduce your problem in blead with the script you provided, but was ~/tmp/FS$ cat foo.pl I thought maybe the problem had been fixed since your report, but with 5.14.2, I still get the ~/tmp/FS$ perlbrew use 14.2 This is perl 5, version 14, subversion 2 (v5.14.2) built for darwin-2level I am tentatively rejecting this bug. If you can provide further steps to reproduce it, please reply -- |
The RT System itself - Status changed from 'new' to 'open' |
@rjbs - Status changed from 'open' to 'rejected' |
From user42@zip.com.au"Ricardo SIGNES via RT" <perlbug-followup@perl.org> writes:
The MyFilter.pm must end as I posted without "1;". In that case it -- |
@rjbs - Status changed from 'rejected' to 'open' |
From @rjbsWhoops! Yes, verified. So, the question I had was, then, "what is the magic true value?" It had the be the result of I think the little state machine that gathers lines has an off-by-one, although I've really only Inline Patchdiff --git a/dist/Filter-Simple/lib/Filter/Simple.pm b/dist/Filter-Simple/lib/Filter/Simple.pm
index d1da0b2..f0ad0f3 100644
--- a/dist/Filter-Simple/lib/Filter/Simple.pm
+++ b/dist/Filter-Simple/lib/Filter/Simple.pm
@@ -198,6 +198,7 @@ sub gen_filter_import {
if ($terminator{terminator} &&
m/$terminator{terminator}/) {
$lastline = $_;
+ $count++;
last;
}
$data .= $_;
-- |
From user42@zip.com.au"Ricardo SIGNES via RT" <perlbug-followup@perl.org> writes:
Ah, something subtle there.
It's actually a slurp through to the terminator, no? The docs could
Yes, looks likely. It actually only needs a flag rather than a count |
From @rjbs* Kevin Ryde <user42@zip.com.au> [2013-09-12T17:57:07]
Could you write a test for the bug? Then I'll apply your test and my patch and -- |
From user42@zip.com.au"Ricardo Signes via RT" <perlbug-followup@perl.org> writes:
Yes. I wouldn't mind also if the docs began by summarizing the good things of |
From @rjbs* Kevin Ryde <user42@zip.com.au> [2013-09-16T05:01:50]
Such a patch would also be welcome! The days are clearly long gone when -- |
@dcollinsn - Status changed from 'open' to 'stalled' |
From @cpansproutOn Thu Sep 12 19:18:12 2013, perl.p5p@rjbs.manxome.org wrote:
I have just added a test in 7e9e80a and applied Ricardo’s patch as 8bc40f3. -- Father Chrysostomos |
The RT System itself - Status changed from 'stalled' to 'open' |
@cpansprout - Status changed from 'open' to 'pending release' |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release today of Perl 5.26.0, this and 210 other issues have been Perl 5.26.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#107726 (status was 'resolved')
Searchable as RT107726$
The text was updated successfully, but these errors were encountered: