sub foo :Alias(bar) { ... }
# These both do the same thing.
foo();
bar();
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
| [reply] [d/l] |
Does this really do what the poster wants? My impression was that Data::Alias is designed more to handle magic aliasing of scalars (possibly references), such as occurs in fors and subroutines, than to handle non-scalars such as subroutines. Of course, you can use
alias *old_func = \&new_func,
but I don't see what that gains over just
*old_func = \&new_func.
I searched the Data::Alias documentation for 'code' and 'function', but couldn't find anything indicating what I might be missing. | [reply] [d/l] [select] |