Well I am looking at making (yet another) module for adding signatures to Perl subroutines.
I know that there are a lot of solutions to this problem already, but of course none of them works exactly like I want them to. The problem with them is generaly that you have to choose if you want positional argument passing or named argument passing, but a single subroutine cannot have both. I want it to be possible to pass the arguments either as positional arguments or as named arguments. The caller should decide what they want to use.
To make that possible I need some way to distinguish a hash reference that contains named arguments and one that is just a normal argument. By associating an attribute with a hash refernence that might be possible.
And yes I know I will probably not be able to make a module that is better than what already exists on CPAN, but you can't blame a guy for trying :) And I am learning a lot of Perl along the way.
In reply to Re^2: Adding attributes to values?
by oyse
in thread Adding attributes to values?
by oyse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |