Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Moose examples

by stvn (Monsignor)
on Sep 03, 2009 at 13:15 UTC ( #793178=note: print w/replies, xml ) Need Help??

in reply to Moose examples

Here are a couple suggestions from my CPAN directory, all of which are being used in production at my $work. Unfortunately the docs are kind of slim in many of them (not enough time in the day for me), but I think you are more interested in reading the code anyway. Be sure to also check out the test suites though, they are always helpful in the absence of docs.

  • Forest
  • Forest::Tree is a basic n-ary tree object, which is a pretty standard data structure so should be easy to understand. For examples of roles that are meant to be combined with Forest::Tree, take a look at Forest::Tree::Roles::HasNodeFormatter, Forest::Tree::Roles::MetaData and Forest::Tree::Roles::JSONable. The distro also comes with a number of utility modules, each of which has an interface role associated, such as Forest::Tree::Reader is the interface role for Forest::Tree::Reader::SimpleTextFile.

  • Text::Flow
  • This module is actually very simple, it is meant to fill the need for a non-ASCII-output text flow module. It makes light use of Moose here, but I thought it might be helpful.

  • Path::Router
  • This is Yet Another path routing/dispatching module. Each of the classes are pretty small and so easy to see what is going on.

  • Path::Class::Versioned
  • This is another pretty simple (but useful) module that makes interesting use of Moose type constraints. It also has some usage of MooseX::Params::Validate which is one of the nicer Moose extensions.

  • Lighttpd::Control
  • This a simple wrapper around the lighttpd web server, it will require that you have that to actually run this code, but the code itself should be pretty readable anyway. It makes use of a number of Moose features, such as; coercion, builders, predicates and clearers as well as augment/inner (which is the inverse of override/super). Again, the test suite is a good place to look.

  • FCGI::Engine
  • This module was an attempt to fill the gap with FastCGI deployment. Catalyst had some nice tools, but beyond that there was nothing so I took the good bits from Catalyst and added a few more myself. Of particular interest would probably be the FCGI::Engine::Types module as it has some nice and reasonably simple examples of type constraint usage. Also note that the FCGI::Engine module itself consumes the MooseX::Getopt role which allows it to be easily called from the command line.

  • Excel::Template::Plus
  • This is a wrapper around Excel::Template and I was particularly fond of some of the bits of Excel::Template::Plus::TT, specifically where we actually wrapped the Excel::Template object and delegated to methods.

Outside of my own CPAN directory, I would also recommend looking at any of the following, many of which I have used myself and some of which I plan to use at some point.

And here are some which are command-line-app specific.


Replies are listed 'Best First'.
Re^2: Moose examples
by Anonymous Monk on Sep 03, 2009 at 13:51 UTC

    Thank you!

    For taking time from your obvious busy schedule, and expending considerable effort to present this information.

    I will review the code of, and where possible try out, every module noted, before responding further.

    I may be gone some time...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://793178]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2021-01-27 04:04 GMT
Find Nodes?
    Voting Booth?