aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/Manual
diff options
context:
space:
mode:
authorrafl <rafl@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-05-11 21:58:09 +0000
committerrafl <rafl@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-05-11 21:58:09 +0000
commit91c2674b76609201dd79d5c81518d763623cb1f7 (patch)
tree4de16399bf4db1b8af544768cd2a45aedf07f9c7 /lib/Reaction/Manual
parent83529ec10275fa6aef95000ccb1f846b16a7e396 (diff)
downloadreaction-91c2674b76609201dd79d5c81518d763623cb1f7.tar.gz
reaction-91c2674b76609201dd79d5c81518d763623cb1f7.zip
s/namespace::\Kclean/autoclean/ for the manual.
Diffstat (limited to 'lib/Reaction/Manual')
-rw-r--r--lib/Reaction/Manual/Clipboard.pod2
-rw-r--r--lib/Reaction/Manual/Tutorial.pod21
-rw-r--r--lib/Reaction/Manual/Widgets.pod8
3 files changed, 15 insertions, 16 deletions
diff --git a/lib/Reaction/Manual/Clipboard.pod b/lib/Reaction/Manual/Clipboard.pod
index 8a810df..eb92f50 100644
--- a/lib/Reaction/Manual/Clipboard.pod
+++ b/lib/Reaction/Manual/Clipboard.pod
@@ -64,7 +64,7 @@ One way to achive that is to do the following:
has 'name' => (isa => 'Str', required => 1, rw => 1);
- use namespace::clean -except => [ 'meta' ];
+ use namespace::autoclean;
__PACKAGE__->load_components(qw(Core));
__PACKAGE__->table('bar');
diff --git a/lib/Reaction/Manual/Tutorial.pod b/lib/Reaction/Manual/Tutorial.pod
index 955f7d5..ce73ff9 100644
--- a/lib/Reaction/Manual/Tutorial.pod
+++ b/lib/Reaction/Manual/Tutorial.pod
@@ -31,7 +31,7 @@ a simple TT view won't suffice. We need to create our own C<lib/MyApp/View/Site.
package MyApp::View::Site;
use Reaction::Class;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
extends 'Reaction::UI::View::TT';
@@ -43,8 +43,7 @@ The C<use Reaction::Class> line will import L<Moose>, L<strict> and L<warnings>
our file and might perform some Reaction specific setups.
We make sure that we don't provide imported functions as methods at runtime by using
-L<namespace::clean>. But we need to C<-except> the C<meta> method that was exported
-by Moose.
+L<namespace::autoclean>.
In its simplest version, our view just needs to do a C<extends 'Reaction::UI::View::TT'>
to make a new subclass of it.
@@ -65,7 +64,7 @@ the root namespace for our application. For this purpose, it should look like th
use aliased 'Reaction::UI::ViewPort';
use aliased 'Reaction::UI::ViewPort::SiteLayout';
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
__PACKAGE__->config(
view_name => 'Site',
@@ -93,8 +92,8 @@ the root namespace for our application. For this purpose, it should look like th
1;
-The effects of L<strict>, L<warnings>, L<parent>, L<aliased> and L<namespace::clean> should
-be clear by now. Let's take a look at the configuration.
+The effects of L<strict>, L<warnings>, L<parent>, L<aliased> and L<namespace::autoclean>
+should be clear by now. Let's take a look at the configuration.
The C<view_name> determines which view to use. We set it to C<Site>, which is our only view
by now. Be careful to set C<view_name> and not C<view>, which would fail telling you it
@@ -225,7 +224,7 @@ widget at C<lib/MyApp/View/Site/Widget/Root.pm>:
package MyApp::View::Site::Widget::Root;
use Reaction::UI::WidgetClass;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
__PACKAGE__->meta->make_immutable;
@@ -285,7 +284,7 @@ data additions in C<lib/MyApp/Schema/Foo.pm>:
use MooseX::Types::Moose qw( Int );
use Reaction::Types::Core qw( NonEmptySimpleStr );
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
extends 'DBIx::Class';
@@ -347,7 +346,7 @@ C<lib/MyApp/InterfaceModel/DBIC.pm>:
use Reaction::Class;
use Reaction::InterfaceModel::Reflector::DBIC;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
my $reflector = Reaction::InterfaceModel::Reflector::DBIC->new;
@@ -373,7 +372,7 @@ this we create a simple catalyst model in C<lib/MyApp/Model/DBIC.pm>:
package MyApp::Model::DBIC;
use Reaction::Class;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
extends 'Catalyst::Model::Reaction::InterfaceModel::DBIC';
@@ -408,7 +407,7 @@ CRUD controller in C<lib/MyApp/Controller/Foo.pm>:
use parent 'Reaction::UI::Controller::Collection::CRUD';
use Reaction::Class;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
__PACKAGE__->config(
model_name => 'DBIC',
diff --git a/lib/Reaction/Manual/Widgets.pod b/lib/Reaction/Manual/Widgets.pod
index f79c87d..3e20427 100644
--- a/lib/Reaction/Manual/Widgets.pod
+++ b/lib/Reaction/Manual/Widgets.pod
@@ -20,7 +20,7 @@ The simplest widget would be this:
package MyApp::Widget::Foo;
use Reaction::UI::WidgetClass;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
__PACKAGE__->meta->make_immutable;
@@ -53,7 +53,7 @@ A widget can a new fragment like this:
package MyApp::Widget::Foo;
use Reaction::UI::WidgetClass;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
implements fragment now {
arg timestamp => time();
@@ -114,7 +114,7 @@ In this case, Reaction allows us to use Moose method modifiers with fragments:
package MyApp::Widget::Bar;
use Reaction::UI::WidgetClass;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
extends 'MyApp::Widget::Foo';
@@ -145,7 +145,7 @@ implementation of this is listed below:
use DateTime;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
my @Fields = qw( year month day hour minute second );