Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • It deserves a name---a really important name---to elevate it beyond its mere stupidity into some sort of software engineering jabberwocky worthy of conference presentations, journal articles, and high brow discussion.

    Side effects [ic.ac.uk] considered harmful?

    • Not a side effect. The variable doesn't get modified....
      --

      --
      xoa

      • use Text::AutoFormat;
        $text = autoformat( $entry, { ... } );
        print $entry;

        It looks to me that there was some (perhaps unconscious) expectation that $entry was going to be modified by the call to autoformat(). Perhaps "Unconscious/Anticipatory Side-Effect Considered Harmful" would be better? If not it might be a useful topic for some postmodern criticism :-)

        <aside>Ain't it nice to be able to comment in brian's journal?.../me wonders how long this can last.</aside>

        • I just figured it was a brainfart when adding the autoformat call, that the code was originally something like:
          $entry = get_the_entry();
          print $entry;
          and brian said "Hey, I want formatting", and added the autoformat line.
          $entry = get_the_entry();
          $text = autoformat( $entry, {...} );
          print $entry;
          At least, that's usually how I get in this situation...
          --

          --
          xoa

          • "Brainfart" now that's "worthy of high discussion" :-) Perhaps "Brainus Farticus" would lend it more latin flavor (or not). Seriously though, brian's error looked to me like it was coming from too much C programming, a la...

            stpcpy (char *to, const char *from)

            "C Considered Harmful"? Nah...