Skip to content

Commit 7495f52

Browse files
committed
tidy
1 parent de1380d commit 7495f52

File tree

7 files changed

+34
-9
lines changed

7 files changed

+34
-9
lines changed

META.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"lib" : "0",
9292
"local::lib" : "0",
9393
"perl" : "5.010",
94-
"strictures" : "0"
94+
"strictures" : "2"
9595
}
9696
},
9797
"test" : {
@@ -102,9 +102,11 @@
102102
"IPC::Open3" : "0",
103103
"Test::InDistDir" : "0",
104104
"Test::More" : "0",
105+
"Test::ReportPerlTidy" : "0",
105106
"blib" : "1.01",
106107
"perl" : "5.010",
107108
"strict" : "0",
109+
"strictures" : "2",
108110
"warnings" : "0"
109111
}
110112
}

Makefile.PL

+5-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ my %WriteMakefileArgs = (
7171
"curry" => 0,
7272
"lib" => 0,
7373
"local::lib" => 0,
74-
"strictures" => 0
74+
"strictures" => 2
7575
},
7676
"TEST_REQUIRES" => {
7777
"File::Spec" => 0,
@@ -80,8 +80,10 @@ my %WriteMakefileArgs = (
8080
"IPC::Open3" => 0,
8181
"Test::InDistDir" => 0,
8282
"Test::More" => 0,
83+
"Test::ReportPerlTidy" => 0,
8384
"blib" => "1.01",
8485
"strict" => 0,
86+
"strictures" => 2,
8587
"warnings" => 0
8688
},
8789
"VERSION" => "0.000001",
@@ -135,14 +137,15 @@ my %FallbackPrereqs = (
135137
"Sub::Name" => 0,
136138
"Test::InDistDir" => 0,
137139
"Test::More" => 0,
140+
"Test::ReportPerlTidy" => 0,
138141
"Time::HiRes" => 0,
139142
"blib" => "1.01",
140143
"constant" => 0,
141144
"curry" => 0,
142145
"lib" => 0,
143146
"local::lib" => 0,
144147
"strict" => 0,
145-
"strictures" => 0,
148+
"strictures" => 2,
146149
"warnings" => 0
147150
);
148151

cpanfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ requires "curry" => "0";
4141
requires "lib" => "0";
4242
requires "local::lib" => "0";
4343
requires "perl" => "5.010";
44-
requires "strictures" => "0";
44+
requires "strictures" => "2";
4545

4646
on 'test' => sub {
4747
requires "File::Spec" => "0";
@@ -50,9 +50,11 @@ on 'test' => sub {
5050
requires "IPC::Open3" => "0";
5151
requires "Test::InDistDir" => "0";
5252
requires "Test::More" => "0";
53+
requires "Test::ReportPerlTidy" => "0";
5354
requires "blib" => "1.01";
5455
requires "perl" => "5.010";
5556
requires "strict" => "0";
57+
requires "strictures" => "2";
5658
requires "warnings" => "0";
5759
};
5860

lib/OpenGL/Debug.pm

+5-2
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@ sub import {
2020

2121
my %uniq_imports = map { $_ => 1 } @imports;
2222

23-
my %all_consts = map { $_ => 1 } map { @{ $Acme::MITHALDU::BleedingOpenGL::EXPORT_TAGS{$_} } } grep { /const/ } keys %Acme::MITHALDU::BleedingOpenGL::EXPORT_TAGS;
23+
my %all_consts =
24+
map { $_ => 1 }
25+
map { @{ $Acme::MITHALDU::BleedingOpenGL::EXPORT_TAGS{$_} } }
26+
grep { /const/ } keys %Acme::MITHALDU::BleedingOpenGL::EXPORT_TAGS;
2427

2528
my $glut_init_skips = "glut(MainLoop|Init(|DisplayMode|Context(Version|Profile|Flags)|Window(Size|Position)))";
2629

2730
my @non_debugs = grep { $all_consts{$_} or /^($glut_init_skips|glutCreateWindow)$/ } keys %uniq_imports;
2831
my @functions = grep { !$all_consts{$_} and !/^($glut_init_skips|glutCreateWindow)$/ } keys %uniq_imports;
2932

3033
my @caller = caller;
31-
install_sub( { code => \&{"Acme::MITHALDU::BleedingOpenGL::$_"}, into => $caller[0], as => $_ } ) for @non_debugs;
34+
install_sub( { code => \&{"Acme::MITHALDU::BleedingOpenGL::$_"}, into => $caller[0], as => $_ } ) for @non_debugs;
3235
install_sub( { code => make_wrapped( $_ ), into => $caller[0], as => $_ } ) for @functions;
3336

3437
return;

lib/PryoNet/ServerRole.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ sub on_recv_udp {
4949
my ( $port, $ip_address ) = unpack_sockaddr_in $addr;
5050
my $ip_string = inet_ntoa $ip_address;
5151
my $from_address = "$ip_string:$port";
52-
my $frame = $self->extract_frame( \$dgram );
52+
my $frame = $self->extract_frame( \$dgram );
5353
if ( $frame->isa( "PryoNet::FrameWorkMessage::RegisterUDP" ) ) {
5454
my $from_connection_id = $frame->connection_id;
55-
my $connection = delete $self->pending_connections->{$from_connection_id};
55+
my $connection = delete $self->pending_connections->{$from_connection_id};
5656
return if !$connection or $connection->udp_remote_address;
5757

5858
$connection->udp_remote_address_octets( $addr );

t/basic.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package basic_test;
55
use Test::InDistDir;
66
use Test::More;
77

8-
use Microidium::Client;
8+
use Microidium;
99

1010
run();
1111
done_testing;

t/zzz_tidy.t

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use strictures 2;
2+
3+
use Test::InDistDir;
4+
use Test::More;
5+
6+
use Test::ReportPerlTidy; # from https://github.com/wchristian/Test-ReportPerlTidy
7+
8+
run();
9+
done_testing;
10+
exit;
11+
12+
sub run {
13+
Test::ReportPerlTidy::run( sub { shift =~ /^Makefile\.PL$|^Microidium-\d/ } );
14+
return;
15+
}

0 commit comments

Comments
 (0)