Re: RFC strict::can -- misunderstandings

2005-12-29 Thread Kurt Starsinic
On 12/7/05, Ovid [EMAIL PROTECTED] wrote: --- Kurt Starsinic [EMAIL PROTECTED] wrote: Or, since it's overriding UNIVERSAL, UNIVERSAL::can::strict It's overridding UNIVERSAL::can (via inheritance). It's not replacing it. If you want to use this module for your module, you have the

Re: RFC strict::can

2005-12-07 Thread Ken Williams
On Dec 4, 2005, at 4:11 PM, Ovid wrote: Your world and my world can be considerably different. Using code very similar to this solved a problem I had with Class::Trait whereby I was exporting methods which should not have been exported. Also, if one is routinely in the habit of checking

Re: RFC strict::can

2005-12-07 Thread David Golden
Ken Williams wrote: The concern I have about the namespace is that the pragma 'strict' suggests that when you use it, you must eliminate ambiguities in your code so that the compiler doesn't have to guess what you mean. That's not what you're doing here, you're erecting new rules to enforce

Re: RFC strict::can

2005-12-07 Thread Kurt Starsinic
On 12/7/05, David Golden [EMAIL PROTECTED] wrote: Ken Williams wrote: The concern I have about the namespace is that the pragma 'strict' suggests that when you use it, you must eliminate ambiguities in your code so that the compiler doesn't have to guess what you mean. That's not what

Re: RFC strict::can -- misunderstandings

2005-12-07 Thread Ovid
--- Kurt Starsinic [EMAIL PROTECTED] wrote: Or, since it's overriding UNIVERSAL, UNIVERSAL::can::strict It's overridding UNIVERSAL::can (via inheritance). It's not replacing it. If you want to use this module for your module, you have the new can() method. Other modules are unaffected.

Re: RFC strict::can

2005-12-05 Thread Ovid
--- Kurt Starsinic [EMAIL PROTECTED] wrote: similar to this solved a problem I had with Class::Trait whereby I was exporting methods which should not have been exported. Do you mean calling methods which should not have been called? No. I did mean which should not have been exported,

RFC strict::can

2005-12-04 Thread Ovid
strict::can is a module which, if used, imports a can method into your namespace. This version of can() will not report imported helper functions or private methods. Full docs below. Comments and suggestions welcome. Cheers, Ovid -- NAME strict::can - Make can() ignore private methods

Re: RFC strict::can

2005-12-04 Thread Kurt Starsinic
On 12/4/05, Ovid [EMAIL PROTECTED] wrote: strict::can is a module which, if used, imports a can method into your namespace. This version of can() will not report imported helper functions or private methods. Full docs below. Comments and suggestions welcome. I think that the ignore

Re: RFC strict::can

2005-12-04 Thread Ovid
--- Kurt Starsinic [EMAIL PROTECTED] wrote: package Foo; use Exporter; use strict::can; if (Foo-can('import')); # BOOM I can provide other examples from my own code, but I think you get the point. The current version on my hard drive allows for import. The module is

Re: RFC strict::can

2005-12-04 Thread Johan Vromans
Kurt Starsinic [EMAIL PROTECTED] writes: The module is clever, but it's not clear to me that it's practically useful. I think it could be useful if the new 'can' would only succeed on public methods (note: not private ones, and also not on non-methods). This would require a way to tag

Re: RFC strict::can

2005-12-04 Thread Kurt Starsinic
On 12/4/05, Ovid [EMAIL PROTECTED] wrote: --- Kurt Starsinic [EMAIL PROTECTED] wrote: package Foo; use Exporter; use strict::can; if (Foo-can('import')); # BOOM I can provide other examples from my own code, but I think you get the point. The current version on my