Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using memoize for validation

  • Loading branch information...
commit 8c17611ee925fa79c90ac368af5833419eb2ef24 1 parent c776a2f
@kthakore kthakore authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 lib/SDLx/Validate.pm
View
11 lib/SDLx/Validate.pm
@@ -4,6 +4,17 @@ use strict;
use warnings;
use Carp;
use Scalar::Util ();
+use Memoize;
+
+memoize('SDLx::Validate::rect');
+memoize('SDLx::Validate::_color_arrayref');
+memoize('SDLx::Validate::_color_number');
+memoize('SDLx::Validate::_color_format');
+memoize('SDLx::Validate::list_rgba');
+memoize('SDLx::Validate::list_rgb');
+memoize('SDLx::Validate::num_rgba');
+memoize('SDLx::Validate::num_rgb');
+
sub surface {
my ($arg) = @_;
Please sign in to comment.
Something went wrong with that request. Please try again.