in reply to enabling OO and non-OO access to the same module using a hash reference

Lots of modules have functions that accept hash references. For example, options are passed to DBI functions through a hash ref. CGI goes a step further and give its users the option of using a hash ref or a list of pairs to pass arguments to its methods.

Update: I forgot to mention that CGI's functions can be called both as a methods and as functions. From the thread title, that sounds like what you want to do. Check it out!

  • Comment on Re: enabling OO and non-OO access to the same module using a hash reference

Replies are listed 'Best First'.
Re^2: enabling OO and non-OO access to the same module using a hash reference
by Moron (Curate) on Jan 15, 2007 at 17:42 UTC
    Thanks Ikegami - it makes me more comfortable about going the href route to know that as popular a module as CGI went there already.

    -M

    Free your mind