mscerts.net
 
Adaptive Technologies
Adobe AIR Apps
Artistic Software
Communications
Database
Desktop Environment
Documentation
Education
Games
Home Automation
Information Management
Internet
Multimedia
Office
Printing
Programming
Religion
Science
Science and Engineering
Security
System
Terminals
Text Editing&Processing
Utilities
 
 
myGengo 1.2.0
corejet.jira 1.0 Alpha 1
jsoncmd 0.0
correct_pycountry 0.12.2
Monsters 1.0
corejet.core 1.0 Alpha 1
Scope::Container::DBI 0.04
DBIx::DataModel 1.27
Word Golf 0.2.1
Plack::Middleware::LogWarn 0.001002
 
 
 

MooseX::Role::BuildInstanceOf 0.06

Less Boilerplate when you need lots of Instances

MooseX::Role::BuildInstanceOf is a Perl module that provides less boilerplate when you need lots of instances.

Developer comments

There can often be a tension between coding for flexibility and for future growth and writing code that is terse, to the point, and solves the smallest possible business problem that is brought to you. Writing the minimum code to solve a particular problem has merit, yet can eventually leave you with an application that has many hacky modifications and is hard to test in an isolated manner. Minimum code should not imply minimum forward planning or poorly tested code.

For me, doing the right thing means I need to both limit myself to the smallest possible solution for a given business case, yet make sure I am not writing CODE that is impossible to grow over time in a clean manner. Generally I attempt to do this by clearly separating the problem domains under a business case into distinct classes. I then tie all the functional bits together in the loosest manner possible. Moose makes this easy, with its powerful attribute features, type coercions and Roles to augment classical inheritance.

Loose coupling and deep configurability work well with inversion of control systems, like Bread::Board or the IOC built into the Catalyst MVC framework. It helps me to defer decisions to the proper authority and also makes it easier to test my logic, since pieces are easier to test independently.

Although this leaves me with the design I desire, I find there's a lot of repeated boilerplate code and logic, particularly in my main application class which often will marshall several underlying classes, each of which is performing a particular job. For example:

 package MyApp::WebPage;

 use Moose;
 use Path::Class qw(file);
 use MyApp::Web::Text;

 has text => (is=>'ro', required=>1, lazy_build=>1);

 sub _build_text {
 file("~/text_for_webpage")->slurp;
 }

Requirements:

· Perl

  Other
-   Lingua::EN::Bigram 0.01
-   Inline 0.46
-   Getopt::Long::GUI 0.1
-   Device::Ericsson::AccessoryMenu 0.8
-   Data::Pairs 0.07
-   Data::Omap 0.06
-   Data::Display 0.02
-   DBIx::Simple::Procedure 1.61
-   CatalystX::CRUD 0.51
-   Catalyst::Plugin::Authentication 0.10016
-   CSV::Template 0.03
-   kombu 0.1.0
-   caslib 0.3.1
-   ternary 0.1
-   pidme 1.0
-   tokyo-python 0.6.2
-   Flask-Actions 0.2
-   Twirlip 0.6
-   href 0.1
-   re2 0.2.6
 
 
                mscerts.net