From: Dave Rolsky Date: Sat, 2 May 2009 21:09:53 +0000 (-0500) Subject: Add a simple code example for "no Moose". X-Git-Tag: 0.78~60 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=adf8494e7fc97255a6fbd4a2f82759a8138dff60;p=gitmo%2FMoose.git Add a simple code example for "no Moose". --- diff --git a/lib/Moose/Manual/Classes.pod b/lib/Moose/Manual/Classes.pod index 7183de9..5619db3 100644 --- a/lib/Moose/Manual/Classes.pod +++ b/lib/Moose/Manual/Classes.pod @@ -83,6 +83,14 @@ namespace. We recommend that you take advantage of this feature, since it just makes your classes "cleaner". You can do this by simply adding C at the end of your module file. + package Person; + + use Moose; + + has 'ssn' => ( is => 'rw' ); + + no Moose; + This deletes Moose's sugar functions from your class's namespace, so that C<< Person->can('has') >> will no longer return true.