1 Mar 2005 13:58
Re: invalid CODE
Rolf Schaufelberger <rs <at> plusw.de>
2005-03-01 12:58:40 GMT
2005-03-01 12:58:40 GMT
Am Dienstag 01 März 2005 13:18 schrieb Simon Flack:
> Rolf Schaufelberger wrote:
> > Hi,
> >
> > I want to use the Maypole (Class::DBI) Classes outside Maypole (I have
> > some scripts, feeding my database)
> >
> > So, for Maypole I have my
> > BeerDB.pm and some BeerDB/Pub.om, BeerDB/Beer.pm etc
> >
> > To use it outside Maypole I've setup a
> > Beer/DBI.pm which just calls
> > Class::DBI::Loader to create the classes.
> >
> > But now I get an compile error
> >
> > invalied CODE attribute: Exported at bla/bla/BeerDB/Users.pm
> >
> > (and BeerDB/Users I have: sub authenticate : Exported {..} )
> >
> > adding "use attributes" changed nothing, reading the attributes man page
> > doesn't really help me. What's wrong ?
>
> 'Exported' isn't a built in code attribute, and must be defined in your
> BeerDB::* CDBI classes or in their <at> ISA inheritance tree. When you use
> your Class::DBI classes in Maypole, the Exported attribute will be
> defined for you. You're getting this error since you're trying to use
> those classes outside Maypole without defining the attribute.
Yes, that was probably the last thing I've understood when reading the man
(Continue reading)
RSS Feed