Skip to content

Commit 002265a

Browse files
committedJan 30, 2011
perltidy
1 parent da04c1f commit 002265a

9 files changed

+344
-421
lines changed
 

‎Makefile.PL

-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,3 @@ WriteMakefile(
4040
},
4141
'EXE_FILES' => ['bin/minicpan_webserver'],
4242
);
43-

‎bin/minicpan_webserver

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use Getopt::Long;
99
my $port = 2963;
1010
GetOptions( "port=i" => \$port, );
1111

12-
my $server = CPAN::Mini::Webserver->new($port);
13-
$server->run();
12+
my $server = CPAN::Mini::Webserver->new( $port );
13+
$server->run;
1414

1515
__END__
1616

‎build_css.pl

+8-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
use Template;
1010
use YAML qw(LoadFile DumpFile);
1111

12-
foreach my $filename ( File::Find::Rule->new->file->in('root/static/css') ) {
12+
foreach my $filename ( File::Find::Rule->new->file->in( 'root/static/css' ) ) {
1313
next if $filename =~ /my-screen\.css/;
14-
unlink($filename) || die $!;
14+
unlink( $filename ) || die $!;
1515
}
1616

1717
my $settings = 'blueprint/lib/settings.yml';
18-
my $conf = LoadFile($settings);
18+
my $conf = LoadFile( $settings );
1919
$conf->{cpanminiwebserver}->{path} = cwd . '/root/static/css/';
2020
DumpFile( $settings, $conf );
2121
use YAML;
@@ -48,10 +48,11 @@ END
4848
my $tt = Template->new;
4949
$tt->process(
5050
\$template,
51-
{ files => [
52-
[ 'ie' => scalar read_file('root/static/css/ie.css') ],
53-
[ 'print' => scalar read_file('root/static/css/print.css') ],
54-
[ 'screen' => scalar read_file('root/static/css/screen.css') ],
51+
{
52+
files => [
53+
[ 'ie' => scalar read_file( 'root/static/css/ie.css' ) ],
54+
[ 'print' => scalar read_file( 'root/static/css/print.css' ) ],
55+
[ 'screen' => scalar read_file( 'root/static/css/screen.css' ) ],
5556
],
5657
},
5758
\my $perl,

‎build_images.pl

+2-9
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,7 @@ END
2929
};
3030

3131
my $tt = Template->new;
32-
$tt->process(
33-
\$template,
34-
{ files => [
35-
[ 'logo' => encode_base64( read_file('images/logo.png') ) ],
36-
[ 'favicon' => encode_base64( read_file('images/favicon.png') ) ],
37-
],
38-
},
39-
\my $perl,
40-
) || die $template->error();
32+
$tt->process( \$template, { files => [ [ 'logo' => encode_base64( read_file( 'images/logo.png' ) ) ], [ 'favicon' => encode_base64( read_file( 'images/favicon.png' ) ) ], ], }, \my $perl, )
33+
|| die $template->error();
4134
Perl::Tidy::perltidy( source => \$perl, destination => \my $tidied );
4235
write_file( 'lib/CPAN/Mini/Webserver/Templates/Images.pm', $tidied );

0 commit comments

Comments
 (0)
Please sign in to comment.