On Thu, Jun 03, 2004 at 01:35:47PM -0700, Randal L. Schwartz wrote:
> Your package names should not start with a lowercase.  That's
> reserved for pragmata.

Ah; I was uncertain how solid of a convention this was; I saw no
reference in the manpages on this.

> This code is unnecessarily complex.  First, to create a
> subclass-overloaded ->new (for additional member variables), you
> merely need:

Thanks for that feedback; I was relying on manpages, and couldn't
come up with a good example.

> But in your case, you have *no* additional attributes (member variables),
> so you can leave your "new" entirely out, and it does The Right Thing.

Well, I do intend to introduce additional attributes; I was presenting
a simplified case to illustrate my problem.

So, arbitrarily changing my package to be 'QmailUser' instead of
'qmailUser' solves my problem by sidestepping the test in Schema.pm.

However, if I now ask Net::LDAP::Schema to list attributes for a
hypthetical LDAP object class called 'QmailUser', I still see an
error such as:

  Can't use string ("QmailUser") as a HASH ref while "strict refs" in use at
  /usr/local/lib/perl5/site_perl/5.005/Net/LDAP/Entry.pm line 109, <DATA>
  chunk 417.

because that test in Schema.pm still thinks that I've passed an
Net::LDAP::Entry object, which I haven't.

> Brian> So - have I miscoded here, or have I ticked a bug in Net::LDAP::Schema?
> 
> If your objects cannot also respond to the entire protocol of
> the base class, then you don't have a proper derived class.

Perhaps I'm misunderstanding you here.  I subclassed Net::LDAP::Entry,
but I'm tripping over Net::LDAP::Schema...

> -- 
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
> <[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
Brian Reichert                          <[EMAIL PROTECTED]>
37 Crystal Ave. #303                    Daytime number: (603) 434-6842
Derry NH 03038-1713 USA                 BSD admin/developer at large    

Reply via email to