--- On Sat, 19/7/08, Bill Ward [EMAIL PROTECTED] wrote:
I can't think of any reason you would want to use an
imported subroutine as an object method.
Class::Trait
Moose::Role
mixin
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog-
On Mon, Jul 21, 2008 at 12:12 AM, Ovid
[EMAIL PROTECTED] wrote:
--- On Sat, 19/7/08, Bill Ward [EMAIL PROTECTED] wrote:
I can't think of any reason you would want to use an
imported subroutine as an object method.
Class::Trait
Moose::Role
mixin
I've never used any of those... but in
Sorry for replying to an old thread... but I was catching up on old email.
It occurs to me that if we had the behavior that OO method calling
would reject any imported modules, wouldn't that solve the problem? I
can't think of any reason you would want to use an imported subroutine
as an object
* On Fri, Jul 18 2008, Bill Ward wrote:
Sorry for replying to an old thread... but I was catching up on old email.
It occurs to me that if we had the behavior that OO method calling
would reject any imported modules, wouldn't that solve the problem?
How do you tell what an imported
On Fri, Jul 18, 2008 at 8:04 PM, Jonathan Rockway [EMAIL PROTECTED] wrote:
* On Fri, Jul 18 2008, Bill Ward wrote:
It occurs to me that if we had the behavior that OO method calling
would reject any imported modules, wouldn't that solve the problem?
How do you tell what an imported subroutine
On Fri, Jun 20, 2008 at 01:45:41PM +0100, Ovid wrote:
Buried deep within some code, someone used a module (Test::Most 0.03)
which exports a 'set' function. They weren't actually using that
module. It was just leftover cruft. Unfortunately, the parent class
of that module inherited from
--- Hans Dieter Pearcey [EMAIL PROTECTED] wrote:
never does anything to the importing package
use Foo::Bar as = Bar;
plops a constant function Bar into your package. The constant is an
object on which you can do
Bar-some_function(@args)
and it is the equivalent of calling
2008/6/20 Hans Dieter Pearcey [EMAIL PROTECTED]:
On Fri, Jun 20, 2008 at 04:19:41PM +0100, Fergal Daly wrote:
To be a little more constructive. Here's something that is
implementable and I think reasonable.
use Foo::Bar;
never does anything to the importing package
use Foo::Bar as = Bar;
Buried deep within some code, someone used a module (Test::Most 0.03)
which exports a 'set' function. They weren't actually using that
module. It was just leftover cruft. Unfortunately, the parent class
of that module inherited from Class::Accessor.
Test::Most exports 'set' and Class::Accessor
--- Ovid [EMAIL PROTECTED] wrote:
I'm trying to think of the best way to deal with this. My first
thought is to create a drop in replacement for Exporter which will
not
export a function if caller-can($function) *unless* the person
explicitly lists it in the import list with a unary plus:
* the person
explicitly lists it in the import list with a unary plus:
# 2008
use Foo; # exports nothing
use Bar; # exports set with Exporter::Safe
set() # Bar
# 2009 after upgrading some modules
use Foo; # new version in 2009 exports set
use Bar; # exports set with Exporter::Safe
set
explicitly lists it in the import list with a unary plus:
# 2008
use Foo; # exports nothing
use Bar; # exports set with Exporter::Safe
set() # Bar
# 2009 after upgrading some modules
use Foo; # new version in 2009 exports set
use Bar; # exports set with Exporter::Safe
set() # now Foo
it in the import list with a unary plus:
# 2008
use Foo; # exports nothing
use Bar; # exports set with Exporter::Safe
set() # Bar
# 2009 after upgrading some modules
use Foo; # new version in 2009 exports set
use Bar; # exports set with Exporter::Safe
set() # now Foo and triggers rm -rf / :)
Of course
# from Ovid
# on Friday 20 June 2008 05:45:
Test::Most exports 'set' and Class::Accessor calls a 'set' method.
Oops.
I'm trying to think of the best way to deal with this. My first
thought is to create a drop in replacement for Exporter which will not
export a function if caller-can($function)
On Fri, Jun 20, 2008 at 04:19:41PM +0100, Fergal Daly wrote:
To be a little more constructive. Here's something that is
implementable and I think reasonable.
use Foo::Bar;
never does anything to the importing package
use Foo::Bar as = Bar;
plops a constant function Bar into your
15 matches
Mail list logo