[siesta-dev] Class::Accessor

[prev] [thread] [next] [lurker] [Date index for 2003/04/01]

From: Simon Wistow
Subject: [siesta-dev] Class::Accessor
Date: 08:23 on 01 Apr 2003
Either I'm smoking the lackofsleep crack or there's oddness abounding. 
I'm voting for the first.

I'm attempting to migrate to Class::Accessor::Fast but I'm buggered if I 
can stop it from giving me errors. This code ...

BEGIN {
    # the fields that live in storage
    @fields = qw( id name post_address return_path owner );
}

# automaticall make get/set methods
use base 'Class::Accessor::Fast';
Siesta::List->mk_accessors(@fields, 'siesta');

Gives this output

simon@mirth:~/projects/siesta/trunk/siesta$ perl -Iblib/lib 
t/05setup_database.t
1..8
ok 1 - create script ran OK
User jay@xxxxxxxx.xxxxxxxxxx added
ok 2 - added jay
User bob@xxxxxxxx.xxxxxxxxxx added
ok 3 - added Silent Bob
User dante@quick-stop added
ok 4 - added Dante
User randal@rst-video added
ok 5 - added Randal
Set the plugins for dealers to be :
Can't use string ("name") as a HASH ref while "strict refs" in use at 
/usr/local/perl5.6.1/lib/site_perl/5.6.1/Class/Accessor.pm line 151.
not ok 6 - created dealers
#     Failed test (t/05setup_database.t at line 32)
#          got: '65280'
#     expected: '0'
User <jay@xxxxxxxx.xxxxxxxxxx> (1) added to list 'dealers'
User <bob@xxxxxxxx.xxxxxxxxxx> (2) added to list 'dealers'
ok 7 - add bob and jay to dealers
Set the plugins for dealers to be :
Can't use string ("name") as a HASH ref while "strict refs" in use at 
/usr/local/perl5.6.1/lib/site_perl/5.6.1/Class/Accessor.pm line 151.
not ok 8 - set the plugins
#     Failed test (t/05setup_database.t at line 39)
#          got: '65280'
#     expected: '0'
# Looks like you failed 2 tests of 8.
simon@mirth:~/projects/siesta/trunk/siesta$




Various combinations of qw//, push, () and other stuff doesn't help.

Simon

-- 
it's a short link to a dead king

Generated at 13:56 on 01 Jul 2004 by mariachi 0.52