Discussion:
[Mason-devel] Bug#436507: libhtml-mason-perl: autoflush breaks store modifier
Charles Fry
2008-07-25 03:06:35 UTC
Permalink
Can someone from the Mason development team take a look at this bug
which was reported in Debian? The attached Perl script can be used for
the demonstration.

thanks,
Charles

---------- Forwarded message ----------
From: Frédéric Brière <***@fbriere.net>
Date: Tue, Aug 7, 2007 at 5:35 PM
Subject: Bug#436507: libhtml-mason-perl: autoflush breaks store modifier
To: Debian Bug Tracking System <***@bugs.debian.org>


Package: libhtml-mason-perl
Version: 1:1.35-3
Severity: normal

Starting from some point between sarge (1.26) and etch (1.35), setting
autoflush breaks the ability to store the output of a component to a
variable. The attached script demonstrates this issue.

On sarge:

$ perl -MHTML::Mason -le 'print $HTML::Mason::VERSION'
1.26
$ perl /autoflush_store.pl
Hello, World!
Hello, World!

On etch (and sid):

$ perl -MHTML::Mason -le 'print $HTML::Mason::VERSION'
1.35
$ perl /autoflush_store.pl
Use of uninitialized value in concatenation (.) or string at
/usr/share/perl5/HTML/Mason/Component/Subcomponent.pm line 34, <DATA>
chunk 1.
Hello, World!
WorldHello, !


-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-1-k7 (SMP w/1 CPU core)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Dave Rolsky
2008-07-25 03:26:00 UTC
Permalink
Post by Charles Fry
Can someone from the Mason development team take a look at this bug
which was reported in Debian? The attached Perl script can be used for
the demonstration.
I'm sort of sick of dealing with the vast number of bugs between buffers,
flushing, filters, etc. This part of the code has never been fully spec'd
out in terms of behavior, and it seems like it's whac-a-mole for bug
fixing. I'm kind of inclined to leave things broken for now, in the
absence of some blindingly simple patch that passes all the existing
tests.

If someone else wants to look at it, feel free, but be warned that it's a
bit of a swamp in there ;)


-dave

/*==========================
VegGuide.Org
Your guide to all that's veg
==========================*/
Dave Rolsky
2008-07-25 19:46:59 UTC
Permalink
Post by Dave Rolsky
I'm sort of sick of dealing with the vast number of bugs between buffers,
Sorry to hear that.
Would it help if I told you that revision 3748 is to blame? (Thank you
git-bisect!) Removing that big if() in flush_buffer() is enough to fix
it -- though it obviously breaks the "flush_filter" test it was meant to
fix in the first place.
See, this is the exact whac-a-mole problem.

At this point, I feel like I'd rather just let some bugs stay. I have
little confidence of fixing all of them. There's too many code paths here,
and too many features to support.

Case in point, who the heck actually uses the store modifier? Why not just
use $m->scomp()? Why did we ever document this in the first place?

Sigh.


-dave

/*==========================
VegGuide.Org
Your guide to all that's veg
==========================*/

Loading...