Egg::Helper - Framework of helper script for Egg.


  # The helper script is obtained.
  perl -MEgg::Helper -e "Egg::Helper->out" > /path/to/bin/
  # Project is generated.
  perl /path/to/bin/ Project:[PROJECT_NAME]


It is a module that offers the helper function for Egg.

Please make the helper script first of all to use it as follows.

  perl -MEgg::Helper -e "Egg::Helper->out" > /path/to/bin/
  chmod 755 /path/to/bin/

* Putting on the place that PATH passed is convenient for

Afterwards, please make the project as follows. Project:MYPROJECT

The directory named MYPROJECT is made from this in the current directory. And, the skeleton for the project is generated in that.

Passing at the output destination can be specified by '-o' option. Project:MYPROJECT -o /path/to

MYPROJECT is made for the subordinate of /path/to from this.

Passing Perl cannot be acquired according to circumstances and there might be doing the error end. For that case, please set PELR_PATH to the environment variable.

  export PELR_PATH=/usr/bin/perl

A is generated to bin of the made project. The helper only for the project can be used by using this script.

  cd /path/to/MYPROJECT/bin
  ./ D:Make NewDispatch

Please see special each helper's document about special helper's use.


These are for the developer of the helper script. It is not information necessary for the application making.


A global HASH reference is returned.

yaml_load or parse_yaml ([YAML_FILE])

After given YAML is regularized, it returns it.

escape_html ([HTML_TEST])

It escapes in the HTML tag in the text.

escape_html ([PLAIN_TEXT])

It returns it based on escape ending HTML tag in the text.

escape_uri ([URI])

It escapes in the character for which the escape in URI is necessary.


It returns it based on the escape character in URI.


The part of <# param_name #> in [TEXT] is replaced with the value of corresponding [PARAM_HASH].

* The CODE reference can be defined in the value of [PARAM_HASH].

fread or read_file ([FILE_PATH], [PARAM])

The content of the given file is returned.

When the read content is a text, the result of passing conv is returned. The content is returned by the SCALAR reference, except when the content is a text.

When [PARAM] is omitted, global is used.

fwrite or save_file ([PARAM], [FILE_DATA])

The file is made based on information given by [FILE_DATA].

[FILE_DATA] becomes HASH reference with the following keys and the values.

  filename : Generated file PATH.
  value    : Content of generated file.
  filetype : Only bin can be specified.
             When making it to bin, the content given with value is a value of
             the MIME::Base64 encode.
  permission: After the file is generated, a specified permission is set.
  * The value of filename and value passes conv.

[PARAM] is HASH reference passed to conv.


When operating by system OS UNIX, true is restored.


When operating by system OS Windows, true is restored.


When operating by system OS MacOS, true is restored.


Passing Perl is returned. When it is not possible to acquire it from environment variable PERL_PATH or File::Which, the exception is generated.


The object project name under execution is returned.


A global value of default is set. Because this is called beforehand, it is not necessary to usually call it from the helper module.


Passing at the output destination is returned.

The thing specified by environment variable EGG_OUT_PATH besides specifying it by '-o' option is possible. Anything returns a current passing when there is no specification.


A current now passing is returned.


It sets it concerning the document of the default put on the module.

chdir ([PATH])

After chdir is done, it reports to a standard output.

copy ([PATH1], [PATH2])

After File::Copy::copy is done, it reports to a standard output.

move ([PATH1], [PATH2])

After File::Copy::move is done, it reports to a standard output.

remove_dir ([PATH])

After File::Path::rmtree is done, it reports to a standard output.


If 'is_unix' is true, 'exec_perl_Makefile' is called and if it is false, 'output_manifest' is called.

* Please prepare 'output_manifest'.


If 'is_unix' is true, 'exec_perl_Makefile' is called after make distclean is done and if it is false, 'output_manifest' is called.

* Please prepare 'output_manifest'.


Perl Makefile.PL and a series of operation are done.

It is necessary to have moved to the root directory etc. of the project before it calls it.


The object of the object project is returned.

* Prepare_component etc. have not gone. Please call it if necessary after it receives it.


The setting of the object project is returned reading.

It gives priority to that if there is YAML file at the output destination of Egg::Helper::P::YAML.


Whether it is accepted as a module name is checked.


The last number of the test file of the object project is returned most.


The value obtained from Egg::Plugin::YAML->loadrc is set in global.

encode_bin_out ([FILE_PATH])

The result of MIME::Base64::encode_base64 is returned reading the file of [FILE_PATH].

It is convenient so that filetype passed to 'save_file' may make value of bin.


Help of default is output.




Masatoshi Mizuno, <>


Copyright (C) 2007 Bee Flag, Corp. <>, 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.