in reply to Re: RFC: OO Perl using Moo/Moose book
in thread RFC: OO Perl using Moo/Moose book

Life happened; I had to stop work on it; the grant expired.

I am still pretty interested in writing such a book. The idea is not so much to concentrate on a framework like Moose, but instead to teach object-oriented programming principles from the ground up, with all examples in Perl, using Moose/Moo where appropriate. (For simpler stuff, Class::Tiny and Role::Tiny too.) Given how far Perl 6 has progressed, it might also be fun to work on a parallel version of the book in Perl 6.

The GitHub project for the book is here. (It uses Pod::PseudoPod rather than normal Pod, so Github's pod rendering can't fully handle it.)

  • Comment on Re^2: RFC: OO Perl using Moo/Moose book

Replies are listed 'Best First'.
Re^3: RFC: OO Perl using Moo/Moose book
by LanX (Saint) on Apr 26, 2019 at 15:46 UTC
    > but instead to teach object-oriented programming principles from the ground up

    do you know Damian's book on that topic?

    I really liked the intro and overview, though things like roles are not covered. (I think)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      I'm familiar with it, yeah, but it's pretty different from the kind of thing I want to do.

      I want to write something that teaches good OO design (when to use roles, when to use inheritance, when to use delegation, etc) and just happens to use Perl for its examples. His is more focused on the mechanics of OO in Perl. Like he has about 2˝ chapters on bless and the different types of references it can be applied to, whereas I only plan to mention bless in passing.

      It is also about 20 years old, so doesn't even mention stuff like Moose.

      I want to write a book that a Python, Ruby, or Java programmer can read and learn from, and take away valuable advice even if they don't learn any more Perl than is necessary to grok the examples. (Though hopefully the examples will be beautiful and elegant enough that they are tempted to learn a bit more about Perl.)

        Yeah I just mentioned it because you said "from the ground up"

        Things like encapsulation and polymorphism are well explained.

        And a new user should be aware that classes are just packages.

        > when to use roles, when to use inheritance, when to use delegation, etc

        You could use the dynamic of the monastery to discuss these concepts little by little.

        > Python, Ruby, or Java 

        Well are there any good Python or Ruby books on the topic?

        I'd say orientation towards Java would cause too much conceptual problems.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice