|No such thing as a small change
Re^3: A caller() by any other nameby xdg (Monsignor)
|on Dec 03, 2008 at 02:14 UTC
Using defined offsets into arrays/lists, to my mind, has little to offer over the normal positional arg passing
As I understand the idea in POE, one reason for it is forward compatibility. You can rearrange the order of positional arguments -- e.g. insert new ones between fixed arguments and a variable list of arguments at the end -- and since the constants are redefined at the same time, code using the defined offsets still just works.
IMO, PBP should be taken with (several) grains of salt. It's only one opinion about best practices and even the author says it's not an exclusive list of best practices. And there are some stunningly bad recommendations in there, too.
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.