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
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
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
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
--- 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.
--- 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,
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
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
--- 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
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
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
11 matches
Mail list logo