Re: Typo on CPAN docs?

[prev] [thread] [next] [Date index for 2004/11/27]

From: Michael G Schwern
Subject: Re: Typo on CPAN docs?
Date: 08:53 on 27 Nov 2004
On Fri, Nov 26, 2004 at 05:51:25PM -0800, Nathan L. Kugland wrote:
> Film->table('film');
>        Film->columns(All => qw/id title rating/);
>        Film->has_many(stars => [ Role => 'actor' ]);
> 
>        Actor->table('actor');
>        Actor->columns(All => qw/id name/);
>        Actor->has_many(films => [ Role => 'film' ]);
> 
> Note the lack of quotes around the Role class name. Using this example 
> verbatim gave me this:
>    Bareword "Role" not allowed while "strict subs" in use ...

That's weird.  It shouldn't.  => autoquotes the left hand side if its
a word (ie. all alphanumerics or underscore).

Maybe you hit a little perl bug.


> Now, a bit higher in the CPAN docs (under Mapping), there is this example:
> 
> Music::CD->has_many(styles => [ 'Music::StyleRef' => 'style' ]);
> 
> ...where the class name is enquoted. It seems that the Many-to-Many 
> example class names be similarly enquoted, to be strict-safe.

Music::StyleRef is not a word since it contains :: so it needs quoting.


        -- 
        Michael G Schwern        schwern@xxxxx.xxx  http://www.pobox.com/~schwern/
1. You are thin.
2. You look great.
3. You live in a castle with robot servants.
        -- http://www.angryflower.com/anaddi.gif

Typo on CPAN docs?
Nathan L. Kugland 01:51 on 27 Nov 2004

Re: Typo on CPAN docs?
Michael G Schwern 08:53 on 27 Nov 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52