Skip Menu |

This queue is for tickets about the CGI-Application-Plugin-AutoRunmode CPAN distribution.

Report information
The Basics
Id: 16888
Status: rejected
Priority: 0/
Queue: CGI-Application-Plugin-AutoRunmode

People
Owner: Nobody in particular
Requestors: mark [...] summersault.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.12
Fixed in: (no value)



Subject: wish: option not to pass second arg to delegate run modes.
I would like the option to not have the second argument passed to the delegate run modes. This conflicts with form display run modes used by the ValidateRM plugin, which passes a hashref of errors as the second parameter. When using both together I had to workaround the issue by adding a conditional check on the second parameter to possibly ignore it if it wasn't a hashref.
From: thilo [...] cpan.org
Show quoted text
> I would like the option to not have the second argument passed to the > delegate run modes.
Here is an idea: There are now two options to specify the delegate: package name (string) or instance (blessed reference). The second parameter is passed in both cases. A fix for your situation would be to change this behaviour to pass $delegate only in case it is an object reference. That is an incompatible change, but I do not think many people use that feature yet, so I would be willing to do that. And while we are at it, in the case of a $delegate object, I propose to change the order of the two parameters to ($delegate, $app), since we are now calling a method on $delegate with $app as a parameter. So the interface would be: A) with a package name: sub delegation($app){ } B) with a delegate object: sub delegation($self, $app) {} A being a procedural approach, B more object-oriented. Do you think we should be consistent and un-support sub-classing for type A (which now works, as the lookup is done with "can") ?