in reply to feedback on subroutine as both function and method in one

Well, that's not giving the user a choice between a function and a method - it's the difference between an object method and a class method.

In order to call it as a function, it needs to work as xpkg::mproc or (if exported) just mproc.

CGI.pm carries this off, but I can't think of any other modules that do it. You might look at the CGI.pm code to see how it's done there - but I think it's all pretty hairy in there :)

--
<http://www.dave.org.uk>

Perl Training in the UK <http://www.iterative-software.com>

  • Comment on Re: feedback on subroutine as both function and method in one