Any-Template-ProcessDir

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

        altogether.

  Optional parameters
    dir_create_mode
        Permissions mode to use when creating destination directories.
        Defaults to 0775. No effect if you are using a single directory.

    file_create_mode
        Permissions mode to use when creating destination files. Defaults to
        0444 (read-only), so that destination files are not accidentally
        edited.

    ignore_files
        Coderef which takes a full pathname and returns true if the file
        should be ignored. By default, all files will be considered.

    readme_filename
        Name of a README file to generate in the destination directory -
        defaults to "README". No file will be generated if you pass undef or
        if you are using a single directory.

lib/Any/Template/ProcessDir.pm  view on Meta::CPAN

sub generate_readme {
    my $self = shift;

    if ( defined( $self->readme_filename ) ) {
        my $readme_file = catfile( $self->dest_dir, $self->readme_filename );
        unlink($readme_file);
        write_file(
            $readme_file,
            "Files in this directory generated from "
              . $self->source_dir . ".\n",
            "Do not edit files here, as they will be overwritten. Edit the source instead!"
        );
    }
}

sub generate_source_symlink {
    my $self = shift;

    # Create symlink from dest dir back to source dir.
    #
    my $source_link = catdir( $self->dest_dir, "source" );

lib/Any/Template/ProcessDir.pm  view on Meta::CPAN

=over

=item dir_create_mode

Permissions mode to use when creating destination directories. Defaults to
0775. No effect if you are using a single directory.

=item file_create_mode

Permissions mode to use when creating destination files. Defaults to 0444
(read-only), so that destination files are not accidentally edited.

=item ignore_files

Coderef which takes a full pathname and returns true if the file should be
ignored. By default, all files will be considered.

=item readme_filename

Name of a README file to generate in the destination directory - defaults to
"README". No file will be generated if you pass undef or if you are using a



( run in 0.413 second using v1.01-cache-2.11-cpan-de7293f3b23 )