package Egg::Helper::Build::Prototype; # # Masatoshi Mizuno ElusheE<64>cpan.orgE # # $Id: Prototype.pm 226 2008-01-27 10:23:16Z lushe $ # use strict; use warnings; use File::Spec; use HTML::Prototype; our $VERSION= '3.00'; sub _start_helper { my($self)= @_; my $c= $self->config; my $o= $self->_helper_get_options; return $self->_helper_help() if $o->{help}; my $htdocs= $c->{dir}{htdocs} || $c->{dir}{static} || return $self->_helper_help('I want configuration dir->{htdocs}.'); -e $htdocs || return $self->_helper_help("'$htdocs' is not found."); my $prototype = File::Spec->catfile( $htdocs, 'prototype.js' ); my $controls = File::Spec->catfile( $htdocs, 'controls.js' ); my $dragdrop = File::Spec->catfile( $htdocs, 'dragdrop.js' ); my $complete = <helper_generate_files( param => {}, chdir => [$c->{root}], complete_msg => $complete, create_files => [ { filename=> $prototype, value=> $HTML::Prototype::prototype }, { filename=> $controls, value=> $HTML::Prototype::controls }, { filename=> $dragdrop, value=> $HTML::Prototype::controls }, ], ); } sub _helper_help { my $self = shift; my $msg = shift || ""; $msg .= "\n\n" if $msg; my $pname= lc $self->project_name; print <, L, L, L, L, =head1 AUTHOR Masatoshi Mizuno ElusheE<64>cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright (C) 2008 Bee Flag, Corp. ELE, All Rights Reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available. =cut