Dancer

 view release on metacpan or  search on metacpan

bin/dancer  view on Meta::CPAN

            $content->($path);
            $add_to_manifest->($path);
       } else {
            my $file = basename($path);
            my $dir  = dirname($path);
            my $ex = ($file =~ s/^\+//); # look for '+' flag (executable)
            my $template = $templates->{$file};

            $path = catfile($dir, $file); # rebuild the path without the '+' flag
            write_file($path, $template, {appdir => File::Spec->rel2abs($DANCER_APP_DIR)});
            chmod 0755, $path if $ex;
            $add_to_manifest->($path);
        }
    }
}

sub app_tree($) {
    my ($appname) = @_;

    return {
        "Makefile.PL"        => FILE,

lib/Dancer/Logger/File.pm  view on Meta::CPAN

    }

    my $expected_path = $logroot                                  ?
                        Dancer::FileUtils::path($logroot, 'logs') :
                        Dancer::FileUtils::path('logs');

    return $expected_path if -d $expected_path && -x _ && -w _;

    unless (-w $logroot and -x _) {
        my $perm = (stat $logroot)[2] & 07777;
        chmod($perm | 0700, $logroot);
        unless (-w $logroot and -x _) {
            carp "app directory '$logroot' isn't writable/executable and can't chmod it";
            return;
        }
    }
    return $expected_path;
}

sub init {
    my $self = shift;
    $self->SUPER::init(@_);



( run in 0.270 second using v1.01-cache-2.11-cpan-496ff517765 )