Activator

 view release on metacpan or  search on metacpan

bin/activator.pl  view on Meta::CPAN

	elsif ($config_file =~ /\.tt$/i ) {
	    $config_file =~ /(.+)\.tt$/;
	    my $out = $1;
	    if ( !$out ) {
		WARN( "Couldn't process Template file '$config_file'");
		next;
	    }
#	    $fq_dest_file = "$config->{sync_conf_dir}/$out";
	    my $tt = Template->new( { DEBUG => 1,
				      ABSOLUTE => 1,
				      OUTPUT_PATH  => $config->{sync_conf_dir},
				    }
				  );
	    DEBUG( qq(tt processing: $fq_source_file, $config, $out ));
	    $tt->process( $fq_source_file, $config, $out ) || Activator::Log->logdie( $tt->error()."\n");
	}

	# just copy the file
	else {
	    my $rsync_flags = ( $config->{debug} ? '-v' : '' );
	    $rsync_flags   .= ' --cvs-exclude';

bin/activator.pl  view on Meta::CPAN

    my $fq   = $File::Find::name; # is the complete pathname to the file.

    # capture the intervening path
    $fq =~ m|share/apache2/(.+)\.tt$|;
    my $out = $1;
    return unless $out;

    DEBUG( qq( processing $file into ).$config->{apache2}->{ServerRoot}.'/'.$out );
    my $tt = Template->new( { DEBUG => 1,
			      ABSOLUTE => 1,
			      OUTPUT_PATH  => $config->{apache2}->{ServerRoot},
			    }
			  );
    $tt->process( $fq, $config, $out ) || Activator::Log->logdie( $tt->error()."\n");

    # TODO: use some smart hueristics to properly chmod that which
    # should be executable
    #
    #if( $out =~ m@/s?bin/|/init.d/@ ) {
    #	chmod 0755, $config->{apache2}->{ServerRoot}.'/'.$out
    #}



( run in 0.425 second using v1.01-cache-2.11-cpan-4e96b696675 )