Changeset 10556

Show
Ignore:
Timestamp:
04/27/08 16:13:55 (7 months ago)
Author:
tokuhirom
Message:

Web::* を掘っているとちゅう。かなりうごかない部分が多いけど、これから風呂はいるのでいったんこみっと

Location:
lang/perl/Nanto/trunk
Files:
5 added
4 removed
2 modified
1 copied
3 moved

Legend:

Unmodified
Added
Removed
  • lang/perl/Nanto/trunk/examples/SampleBBS/lib/SampleBBS/C/Root.pm

    r10530 r10556  
    1515    ); 
    1616 
    17     $c->view->params->{mobile_attribute} = $c->mobile_attribute; 
     17    $c->view->params->{mobile_attribute} = $c->factory('MobileAttribute'); 
    1818} 
    1919 
  • lang/perl/Nanto/trunk/lib/Nanto/Role/Context.pm

    r10550 r10556  
    22use strict; 
    33use Moose::Role; 
     4 
     5with 'Nanto::Plugin::Factory'; 
    46 
    57sub base_name { 
     
    810    (my $base_name = $proto) =~ s/.+::Context//g; 
    911    $base_name; 
     12} 
     13 
     14sub config { 
     15    my $self = shift; 
     16    $self->component('Config')->load; 
    1017} 
    1118 
  • lang/perl/Nanto/trunk/lib/Nanto/Web/Context.pm

    r10550 r10556  
    3535sub create_view { 
    3636    my $self = shift; 
    37     $self->component('View'); 
     37    $self->component('V'); 
     38} 
     39 
     40sub create_controller { 
     41    my ($self, $moniker) = @_; 
     42    my $pkg = join('::', $self->base_name, $moniker); 
     43    $pkg->use or die $@; 
    3844} 
    3945