forked from evalEmpire/method-signatures
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
no need to check for existence of required parameters
- Loading branch information
1 parent
d663b9c
commit fa3bbd3
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
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
fa3bbd3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This confused me, because I figured $sig->{exists} was meta information about the signature like everything else. I figured it was a flag, not a hunk of code to check that it exists, so it looked like you were hard coding true or false into the generated code.
I'm not entirely happy with putting hunks of code into the signature, but I see the value. How about
check_exists
and we can work out a better place to put the code chunks later?fa3bbd3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm ... I probably misnamed that. I'm basically just saving the chunk of code that you created in
inject_for_sig
and passing that toinject_for_type_check
.Well, putting it into the signature was just the easiest way to get it from one place to another (and I suppose it makes it available for subclasses, if that were useful), but it's certainly not the only way. We could just make it an additional parameter to
inject_for_tyep_check
. Whatever turns you on, man. :)That's fine too.