| Catalyst-Helper-Dojo documentation | Contained in the Catalyst-Helper-Dojo distribution. |
Catalyst::Helper::Dojo - Helper to generate Dojo JavaScript / AJAX library
script/myapp_create.pl Dojo edition
# where "edition" is the edition name you want to install
See HTML::Dojo for a list of available editions.
Helper to generate Dojo JavaScript / AJAX library.
Create javascript files for Dojo in your application's root/static/dojo
directory.
IRC:
Join #catalyst on irc.perl.org.
Mailing Lists:
http://lists.rawmode.org/mailman/listinfo/catalyst
For Dojo-specific support, see http://dojotoolkit.org.
HTML::Dojo, Catalyst::Helper
Carl Franks, cfranks@cpan.org
This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.
| Catalyst-Helper-Dojo documentation | Contained in the Catalyst-Helper-Dojo distribution. |
package Catalyst::Helper::Dojo; use strict; use warnings; use Carp qw/ croak /; use File::Spec; use HTML::Dojo; our $VERSION = '0.02000';
sub mk_stuff { my ( $self, $helper, $edition ) = @_; my %args; $args{edition} = $edition if defined $edition; my $dojo = HTML::Dojo->new( %args ); my $dirs = $dojo->list({ directories => 1, files => 0, }); my $dojo_dir = File::Spec->catdir( $helper->{base}, 'root', 'static', 'dojo' ); for (@$dirs) { my $dir = File::Spec->catdir( $dojo_dir, $_ ); $helper->mk_dir( $dir ); } my $files = $dojo->list; for (@$files) { my $file = File::Spec->catfile( $dojo_dir, $_ ); $helper->mk_file( $file, $dojo->file($_) ); } return; }
1;