in reply to Re: Adding attributes to values?
in thread Adding attributes to values?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Adding attributes to values?
by rminner (Chaplain) on Oct 21, 2007 at 10:26 UTC | |
by oyse (Monk) on Oct 21, 2007 at 10:40 UTC | |
by rminner (Chaplain) on Oct 21, 2007 at 11:00 UTC | |
by oyse (Monk) on Oct 21, 2007 at 11:15 UTC | |
|
Re^3: Adding attributes to values?
by GrandFather (Saint) on Oct 22, 2007 at 00:06 UTC | |
by oyse (Monk) on Oct 22, 2007 at 12:05 UTC |