| Catalyst-Model-Cronolog documentation | Contained in the Catalyst-Model-Cronolog distribution. |
Catalyst::Helper::Model::Cronolog - Helper for Cronolog Models
script/myapp_create.pl model Cronolog Cronolog script/myapp_create.pl model Cronolog Cronolog /path/to/cronlog cronolog_template
Helper for Cronolog Models.
Composes the main model class.
Copyright (c) 2007 Daisuke Maki <daisuke@endeworks.jp> All rights reserved.
| Catalyst-Model-Cronolog documentation | Contained in the Catalyst-Model-Cronolog distribution. |
# $Id: Cronolog.pm 5 2007-01-22 05:28:39Z daisuke $ package Catalyst::Helper::Model::Cronolog; use strict; use warnings; use File::Find::Rule; sub mk_compclass { my ($self, $helper, $cronolog, $template) = @_; $helper->{cronolog} = $cronolog || do { print STDERR "Searching for cronolog...\n"; my @files = File::Find::Rule ->file() ->name('cronolog') ->executable() ->in(qw(/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin/)); $files[0]; }; $helper->{cronolog_template} = $template; $helper->render_file('mainclass', $helper->{file}); }
1; __DATA__