App-Templer

 view release on metacpan or  search on metacpan

lib/Templer/Site.pm  view on Meta::CPAN


sub assets
{
    my ( $self, %args ) = (@_);

    my $dir =
      $args{ 'directory' } || $self->{ 'directory' } || $self->{ 'input' };
    my $suffix = $args{ 'suffix' } || $self->{ 'suffix' };

    return (
             $self->_findFiles( must_not_match => $suffix . "\$",
                                object         => "Templer::Site::Asset",
                                directory      => $dir,
                                hide_dotfiles  => 0,
                              ) );

}


=head2 _findFiles

lib/Templer/Site.pm  view on Meta::CPAN


    if ( $args{ 'must_match' } )
    {
        foreach my $file ( sort keys %files )
        {
            next if ( -d $file );
            next unless ( $file =~ /$args{'must_match'}/ );
            push( @matches, $class->new( file => $file ) );
        }
    }
    elsif ( $args{ 'must_not_match' } )
    {
        foreach my $file ( sort keys %files )
        {
            next if ( $file =~ /$args{'must_not_match'}/ );
            push( @matches, $class->new( file => $file ) );
        }
    }
    else
    {
        @matches = map {$class->new( file => $_ )} keys %files;
    }

    #
    # Every pages depend on the global configuration file



( run in 0.521 second using v1.01-cache-2.11-cpan-cc502c75498 )