Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Class-InsideOut CPAN distribution.

Report information
The Basics
Id: 53526
Status: open
Priority: 0/
Queue: Class-InsideOut

People
Owner: Nobody in particular
Requestors: ted.hopp [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.10
Fixed in: (no value)



Subject: Cannot have object property 'id'
Perhaps it is obvious after one thinks about it, but public and readonly object property names automatically become function names. Therefore, one cannot have an object property named 'id', 'options', etc., unless it is private. Otherwise, bad things happen: package MyClass; use Class::InsideOut qw(:std); public id => my %id; # ... produces: Subroutine MyClass::id redefined at /usr/lib/perl5/site_perl/5.8.8/Class/InsideOut.pm line 458. Prototype mismatch: sub MyClass::id ($) vs none at /usr/lib/perl5/site_perl/5.8.8/Class/InsideOut.pm line 458. This restriction should be documented or (better) eliminated. (The get_/set_ accessor style mentioned in the roadmap would do the trick, I believe.)
Subject: Re: [rt.cpan.org #53526] Cannot have object property 'id'
Date: Fri, 8 Jan 2010 16:09:50 -0500
To: bug-Class-InsideOut [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
On Fri, Jan 8, 2010 at 4:04 PM, Ted Hopp via RT <bug-Class-InsideOut@rt.cpan.org> wrote: Show quoted text
> Perhaps it is obvious after one thinks about it, but public and readonly > object property names automatically become function names. Therefore, > one cannot have an object property named 'id', 'options', etc., unless > it is private. Otherwise, bad things happen: > > This restriction should be documented or (better) eliminated. (The > get_/set_ accessor style mentioned in the roadmap would do the trick, I > believe.)
That's a great point. I'll put it on the Todo list for a future release. David