in reply to Re: UNIVERSAL::can and autoloaded methods
in thread UNIVERSAL::can and autoloaded methods
Thanks for the example! I think I will go with the third approach. I think CGI.pm is most likely the only module I will face with this problem, so I will put in a specific check for it. I was hoping to have it completely generic, but this still looks clean enough for me.
if ( UNIVERSAL::isa($q, 'CGI') || (UNIVERSAL::can($q, 'param') && UNIVERSAL::can($q, 'cookie') ) { ... }
Cheers,
- Cees
|
|---|