Re: How to implement both object->method and module::function interfa ce?
[email protected] (Chaim Frenkel) 09 Aug 2000 10:07:21 -0400
| Newsgroups | perl.perl6.stdlib |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "HB" == Hildo Biersma <[email protected]> writes: HB> There's a reason people use objects - if only to give the user a handle HB> to wrap the module's state. Any module that supports both OO and HB> procedural usage is basically a singleton - only one instance exists at HB> any one time (at least in procedural mode). For most modules, this HB> doesn't and shouldn't make sense. Sorry, this doesn't make sense. Please explain the difference between $foo->twiddle and twiddle $foo Or to go to a more specific domain $fh = new File::Text "blah" open($fh, "blah") $txt = $fh->read $txt = <$fh> etc. There is nothing preventing a procedural interface. One only needs a handle. <chaim> -- Chaim Frenkel Nonlinear Knowledge, Inc. [email protected] +1-718-236-0183