Created
June 24, 2009 21:02
-
-
Save masak/135513 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Things to check for: | |
* Referring to variables that aren't in scope. | |
* Inheriting from classes or roles that weren't declared. | |
* Presupposing 'self' in a sub. | |
* Never using 'self' (explicitly or implicitly) in a method or submethod. | |
* Calling an only sub/method with the wrong number/type of argument. | |
* Make sure that 'handles' values refer only to methods that are actually | |
defined by the given type. | |
* Check if assumtions are made about parameters which are not checked | |
beforehand, such as 'sub foo(@arrays) { for @arrays -> @array { ... } }' | |
* Subs which are never called. | |
* 'Inconsistent' use of $^foo and $foo in a scope. | |
* Reading from a variable before it has been assigned to. | |
* Type mismatch in assignment. | |
* Boolean values which are never true, or never false. | |
* Assigning to a variable and then never using it. | |
* Just falling out of a sub or method without returning anything. (Need to | |
check if the last value appears to be a read of some sort, or the single | |
value of the sub or method.) | |
* use-ing a module and then never referring to it or anything in it. | |
* Passing a constant which doesn't conform to the where clause in an only | |
sub | |
* Passing 'map' a Hash instead of a Code. | |
* Having two multi variants which will lead to ties. For example (Int $a?) | |
and (Str $a?). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment