Catalyst-Plugin-AutoCRUD

 view release on metacpan or  search on metacpan

lib/Catalyst/Plugin/AutoCRUD/Controller/Root.pm  view on Meta::CPAN

  $Catalyst::Plugin::AutoCRUD::Controller::Root::VERSION = '2.143070';
}

use strict;
use warnings;

use base 'Catalyst::Controller';
use Catalyst::Utils;
use SQL::Translator::AutoCRUD::Quick;
use File::Basename;
use Scalar::Util 'weaken';
use List::Util 'first';

__PACKAGE__->mk_classdata(_site_conf_cache => {});

# the templates are squirreled away in ../templates
(my $pkg_path = __PACKAGE__) =~ s{::}{/}g;
my (undef, $directory, undef) = fileparse(
    $INC{ $pkg_path .'.pm' }
);

lib/Catalyst/Plugin/AutoCRUD/Controller/Root.pm  view on Meta::CPAN

            $conf->{headings}->{$f} =
                $user->{headings}->{$f} || $meta->f->{$f}->extra('display_name');
        }
    }

    # set up helper variables for templates
    $c->stash->{cpac_db} = $db;
    $c->stash->{cpac_table} = $table;
    $c->stash->{cpac}->{tm} = $c->stash->{cpac}->{m}->t->{$table};
    $c->stash->{cpac}->{tc} = $c->stash->{cpac}->{c}->{$db}->{t}->{$table};
    weaken $c->stash->{cpac}->{tm};
    weaken $c->stash->{cpac}->{tc};
}

sub helloworld : Chained('base') Args(0) {
    my ($self, $c) = @_;
    $c->forward('build_site_config');
    $c->stash->{cpac}->{g}->{title} = 'Hello World';
    $c->stash->{template} = 'helloworld.tt';
}

sub end : ActionClass('RenderView') {



( run in 0.291 second using v1.01-cache-2.11-cpan-65fba6d93b7 )