perlmeditation
jdporter
<h1>Getting Started with Moose</h1>
<p>
I recently decided to get with the program and use [mod://Moose] in my current/impending projects.
All the cool kids are doing it!
</p><p>
I immediately hit a roadblock: I'm using [http://www.activestate.com/Products/activeperl|ActiveState Perl],
and their repository does not have Moose. (Apparently they had some problems building it.)
</p><p>
So I went searching, got help, and resolved my problems. Now I have Moose installed.
Here's how I did it, and below are links to essential Moose-related resources.
</p>
<p>
But first, I want to mention something which I found confusing: <i>MooseX</i>.
What is MooseX? How is it different from Moose?
</p><p>
MooseX is a namespace for Moose eXtensions which are not part of
the Moose package proper. You will find a large number of Moose extensions in the
[http://cpan.uwinnipeg.ca/search?query=MooseX&mode=dist|MooseX] namepace on CPAN.
</p>
<h3>Windows: ActiveState Perl 5.8</h3>
<p>
<ol>
<li> If you don't already know how to, read [id://434813]. </li>
<li> Add the following repository to your configuration:<br>
<tt>[http://theoryx5.uwinnipeg.ca/ppms/package.xml]</tt><br>
You can name it "kobes". </li>
<li> While viewing all packages (vs. viewing installed packages), find "Moose" in the list, and install it.
(Type <c> ppm install Moose </c> to circumvent the gui.)</li>
</ol>
This will install [mod://Moose] and a number of dependencies.
</p>
<p>
Alternative ppm repositories are available; see [http://theoryx5.uwinnipeg.ca/ppms/] for some suggestions.
</p>
<h3>Windows: ActiveState Perl 5.10</h3>
<p>
<ol>
<li> If you don't already know how to, read [id://434813]. </li>
<li> Add the following repository to your configuration:<br>
<tt>[http://cpan.uwinnipeg.ca/PPMPackages/10xx/package.xml]</tt><br>
You can name it "kobes". </li>
<li> While viewing all packages (vs. viewing installed packages), find "Moose" in the list, and install it.
(Type <c> ppm install Moose </c> to circumvent the gui.)</li>
</ol>
This will install [mod://Moose] and a number of dependencies.
</p>
<p>
Alternative ppm repositories are available; see [http://cpan.uwinnipeg.ca/PPMPackages/10xx/] for some suggestions.
</p>
<h3>Other platforms, including Strawberry Perl on Windows</h3>
<p>
ActiveState Perl has its own way of doing things; the rest of the world uses a module
installation tool called <b><tt>[doc://cpan]</tt></b>.<br>
Please read [id://128077] if you are not familiar with it.
</p><p>
Install Moose by typing <c> install Moose </c> at the <b><tt>cpan></tt></b> prompt.<br>
This will install [mod://Moose] and a number of dependencies directly from CPAN.
</p>
<h3>Windows: Camelbox Perl </h3>
<p>
If you're using [http://code.google.com/p/camelbox/|Camelbox], you're in luck: Moose is pre-packaged with
the perl installation. However, you may still wish to install some
[http://cpan.uwinnipeg.ca/search?query=MooseX&mode=dist|Moose extensions], which are not-prepackaged
with Camelbox.
</p>
<h2>Resources</h2>
<ul>
<li> [http://www.iinteractive.com/moose/|The Moose's Mouth], so to speak </li>
<li> The [mod://Moose::Cookbook] </li>
<li> [http://users.ox.ac.uk/~oliver/data/files/moose-quick-ref.pdf|Moose Quick-Ref Card] (PDF, 100kb) </li>
<li> [http://search.cpan.org/~sartak/Moose-0.55/lib/Moose/Util/TypeConstraints.pm#Default_Type_Constraints|Type
Constraints for Perl Intrinsic Types] (for those who already know something about Moose) </li>
<li> [wp://IRC] channel <a href="irc://irc.perl.org/"><c>#moose</c></a> on [http://irc.perl.org/|<c>irc.perl.org</c>] </li>
<li> <strike>[http://en.wikibooks.org/wiki/Programming_with_Moose|Programming with Moose] - online book</strike> </li>
</ul>