Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: refactor newlistapproved to absorb newmoderatelist

by Corion (Pope)
on Jul 13, 2012 at 16:48 UTC ( #981664=note: print w/replies, xml ) Need Help??

in reply to refactor newlistapproved to absorb newmoderatelist

I admit that I'm a bit unclear on where the two go together, except in the sequence they are called in. Maybe unifying the caller (by introducing one more level of indirection) would be cleaner? It wouldn't reduce the htmlcode() invocations, that's sure.

I already find newlistapproved quite unwieldly, so I'm not sure that pushing some more code into it improves it, maintenance-wise...

Replies are listed 'Best First'.
Re^2: refactor newlistapproved to absorb newmoderatelist
by jdporter (Canon) on Jul 13, 2012 at 17:02 UTC

    well, newmoderatelist is never used except after calling newlistapproved with the showunapproved option. keeping them together reduces the likelihood of bugs. ANd I think it reduces surprise. Understanding that newmoderatelist was a "continuation" of newlistapproved was something of a revelation for me.

    I could see the advantage of doing it that way if it was to "jump over" some large and/or variable chunk of code, but it doesn't. It always only jumps over votefoot. And now that votefoot is gone from there, there is absolutely no reason for the continuation code to be in a separate htmlcode node.

    Merging the code, as in the patches I just submitted, actually reduces code complexity a bit. For one thing, there's no need to shove the "passed" data into %HTMLVARS anymore.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://981664]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2017-11-22 13:11 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (323 votes). Check out past polls.