package MyApp::View::Site;
use Reaction::Class;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
extends 'Reaction::UI::View::TT';
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.
use aliased 'Reaction::UI::ViewPort';
use aliased 'Reaction::UI::ViewPort::SiteLayout';
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
__PACKAGE__->config(
view_name => 'Site',
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
package MyApp::View::Site::Widget::Root;
use Reaction::UI::WidgetClass;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
__PACKAGE__->meta->make_immutable;
use MooseX::Types::Moose qw( Int );
use Reaction::Types::Core qw( NonEmptySimpleStr );
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
extends 'DBIx::Class';
use Reaction::Class;
use Reaction::InterfaceModel::Reflector::DBIC;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
my $reflector = Reaction::InterfaceModel::Reflector::DBIC->new;
package MyApp::Model::DBIC;
use Reaction::Class;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
extends 'Catalyst::Model::Reaction::InterfaceModel::DBIC';
use parent 'Reaction::UI::Controller::Collection::CRUD';
use Reaction::Class;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
__PACKAGE__->config(
model_name => 'DBIC',
package MyApp::Widget::Foo;
use Reaction::UI::WidgetClass;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
__PACKAGE__->meta->make_immutable;
package MyApp::Widget::Foo;
use Reaction::UI::WidgetClass;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
implements fragment now {
arg timestamp => time();
package MyApp::Widget::Bar;
use Reaction::UI::WidgetClass;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
extends 'MyApp::Widget::Foo';
use DateTime;
- use namespace::clean -except => 'meta';
+ use namespace::autoclean;
my @Fields = qw( year month day hour minute second );