can't get perl Class::Struct to work

This is my code:

#!/usr/bin/perl -w

use strict;
use Class::Struct;

struct App =>
{
        name => '$',
};

sub App::name
{
        my $self = shift;
        if( @_ )
        {
                $self->{'name'} = shift;
        }
        return $self->{'name'};
}

my $x = App->new( name => "John" );

printf("Hello %s\n", $x->name);

When I run the script I get:

Why won't it save the name (John)???

If you comment out the entire sub App::name block, it works.

I know, but I was trying to override the accessor method.

Thanks
_Nacho

Well, the manual has some hints.