Skip Menu |

This queue is for tickets about the perl-ldap CPAN distribution.

Report information
The Basics
Id: 4086
Status: resolved
Priority: 0/
Queue: perl-ldap

People
Owner: Nobody in particular
Requestors: BradfordBlack [...] msn.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: LDAP Schema
Hello, The following code is cut from the examples. It simply enumerates returns a list of attributes and prints their names. Or that is what's expected. The result is a list of HASH(*) values which is not what is expected. Is this the expected result? Curious, Brad CODE ******************************************************************************** #!/usr/bin/perl -w use Net::LDAP; use Net::LDAP::Schema; $directoryPath = "/users/brad/Documents/My Job (HDS)/Business Model Notes/LDAP Notes/LDAP Schema Files/iPlanet Schemas/"; $ldapSchemaFile = $directoryPath . "00core.ldif"; # # Load from LDIF # $schema = Net::LDAP::Schema->new; $schema->parse($ldapSchemaFile) or die $schema->error; @attributes = $schema->all_attributes(); # # Display the attributes # foreach ( @attributes) { print "attributeType $_\n"; } RESULT ******************************************************************************** attributeType HASH(0x35d68c) attributeType HASH(0x30b01c) attributeType HASH(0x35d7a0) attributeType HASH(0x36ceec) attributeType HASH(0x3566e4) attributeType HASH(0x36d180) attributeType HASH(0x366018) attributeType HASH(0x3611d4) attributeType HASH(0x35fc44) attributeType HASH(0x30af14) attributeType HASH(0x37beac) attributeType HASH(0x3782b0) ... SYSTEM INFO ******************************************************************************** This is perl, v5.6.0 built for darwin (OS X)
From: Graham Barr <gbarr [...] pobox.com>
Subject: Re: [cpan #4086] LDAP Schema
Date: Thu, 16 Oct 2003 15:52:10 +0100
To: bug-perl-ldap [...] rt.cpan.org
RT-Send-Cc:
On 13 Oct 2003, at 1:53, Guest via RT wrote: Show quoted text
> Hello, > > The following code is cut from the examples. It simply enumerates > returns a list of attributes and prints their names. Or that is what's > expected. The result is a list of HASH(*) values which is not what is > expected.
Sorry, that is a documentation error. It will be fixed in the next release. To get the name you need to do foreach ( @attributes) { print "attributeType ",$_->{name},"\n"; } Graham. Show quoted text
> > Is this the expected result? > > Curious, > > Brad > > CODE > *********************************************************************** > ********* > > #!/usr/bin/perl -w > > use Net::LDAP; > use Net::LDAP::Schema; > > $directoryPath = "/users/brad/Documents/My Job (HDS)/Business Model > Notes/LDAP Notes/LDAP Schema Files/iPlanet Schemas/"; > $ldapSchemaFile = $directoryPath . "00core.ldif"; > > # > # Load from LDIF > # > $schema = Net::LDAP::Schema->new; > $schema->parse($ldapSchemaFile) or die $schema->error; > > @attributes = $schema->all_attributes(); > # > # Display the attributes > # > > foreach ( @attributes) > { > print "attributeType $_\n"; > } > > RESULT > *********************************************************************** > ********* > > attributeType HASH(0x35d68c) > attributeType HASH(0x30b01c) > attributeType HASH(0x35d7a0) > attributeType HASH(0x36ceec) > attributeType HASH(0x3566e4) > attributeType HASH(0x36d180) > attributeType HASH(0x366018) > attributeType HASH(0x3611d4) > attributeType HASH(0x35fc44) > attributeType HASH(0x30af14) > attributeType HASH(0x37beac) > attributeType HASH(0x3782b0) > ... > > > SYSTEM INFO > *********************************************************************** > ********* > This is perl, v5.6.0 built for darwin (OS X) >