in reply to Objects: Classical and Functional

How to see what this actually prints?

$ perl a2.pl | tr \\r \\n | uniq Just |another |Perl |hacker, Just |another | Perl |hacker, Just |nother a| Perl |acker, h Just|nother a| Perl|acker, h Just|other an| Perl|cker, ha Just|ther ano| Perl|ker, hac t Jus|ther ano|l Per|ker, hac t Jus|her anot|l Per|er, hack st Ju|her anot|rl Pe|er, hack st Ju|er anoth|rl Pe|r, hacke st Ju|r anothe|rl Pe|, hacker ust J|r anothe|erl P|, hacker

Also, it turns out the bless isn't even necessary. I replaced it with + and the code still works. I'm a bit disappointed.

Replies are listed 'Best First'.
Re^2: Objects: Classical and Functional
by davido (Cardinal) on Oct 25, 2011 at 10:22 UTC

    Oh, good call. :)

    I pulled so much of the guts out of my original OO approach that it no longer needed an object, just a namespace as provided by the hash ref. I thought I had tried that (the plus), but it must have been on an earlier revision where the constructor was still its own function. Thanks for having a look.


    Dave