projects
/
sdlgit/SDL_perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
6da5a69
)
Fixes for Font in strict
Kartik Thakore [Sat, 15 Aug 2009 18:41:43 +0000 (14:41 -0400)]
lib/SDL.pm
patch
|
blob
|
blame
|
history
lib/SDL/Tool/Font.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/SDL.pm
b/lib/SDL.pm
index
6d2a4b4
..
7a7d346
100644
(file)
--- a/
lib/SDL.pm
+++ b/
lib/SDL.pm
@@
-60,7
+60,8
@@
sub NULL {
sub in {
my ($k,@t) = @_;
- (scalar grep { defined $_ && $_ eq $k } @t) <=> 0;
+ return 0 unless defined $k;
+ return $k ~~ @t;
}
sub verify (\%@) {
diff --git
a/lib/SDL/Tool/Font.pm
b/lib/SDL/Tool/Font.pm
index
f22be01
..
b66267f
100644
(file)
--- a/
lib/SDL/Tool/Font.pm
+++ b/
lib/SDL/Tool/Font.pm
@@
-58,7
+58,9
@@
sub new {
-bg => $option{-background} || $option{-bg};
for (qw/ normal bold italic underline / ) {
if ($option{"-$_"}) {
- &{"SDL::TTFont::$_"}($$self{-font});
+
+ SDL::TTFont->can($_)->($$self{-font});
+ #&{$sub}($$self{-font});
}
}
} else {