From 59e10e3d446a9efc0ce06afe812e3f1f14e5c174 Mon Sep 17 00:00:00 2001 From: doy Date: Mon, 20 Apr 2009 22:20:42 -0500 Subject: add description section to docs --- lib/MooseX/NonMoose.pm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'lib') diff --git a/lib/MooseX/NonMoose.pm b/lib/MooseX/NonMoose.pm index 86df197..e99cded 100644 --- a/lib/MooseX/NonMoose.pm +++ b/lib/MooseX/NonMoose.pm @@ -35,6 +35,30 @@ MooseX::NonMoose - easy subclassing of non-Moose classes =head1 DESCRIPTION +C allows for easily subclassing non-Moose classes with Moose, +taking care of the annoying details connected with doing this, such as setting +up proper inheritance from L and installing (and inlining, at +C time) a constructor that makes sure things like C +methods are called. It tries to be as non-intrusive as possible - when this +module is used, inheriting from non-Moose classes and inheriting from Moose +classes should work identically, aside from the few caveats mentioned below. +One of the goals of this module is that including it in a +L-based package used across an entire application should be +possible, without interfering with classes that only inherit from Moose +modules, or even classes that don't inherit from anything at all. + +There are several ways to use this module. The most straightforward is to just +C in your class; this should set up everything necessary +for extending non-Moose modules. L and +L can also be applied to your +metaclasses manually, either by passing a C<-traits> option to your C line, or by applying them using L in a +L-based class. L is the +part that provides the main functionality of this module; if you don't care +about inlining, this is all you need to worry about. Applying +L as well will provide an inlined +constructor, when you immutabilize your class. + =cut Moose::Exporter->setup_import_methods; -- cgit v1.2.3-54-g00ecf