Re: (fast reply please!) Idea for new module: A bridge between Perl and R-project

2004-01-30 Thread Clayton Scott
Graciliano M. P. wrote:
I'm working on a module that make a bridge between the R-project
intepreter and Perl. Actually I need to have this done today, soo, I will
ask for a fast reply. Thanks in advance.
Soo, I need some adivices for the name of the module. Here are some names,
just vote in one or send suggestions(please).
  - Rbridge
  - Rcaller
  - Bridge2R
Inline::R ?


Re: Class::Accessor subclass

2003-12-10 Thread Clayton Scott
Simon Cozens wrote:

I'm about to write a Class::Accessor subclass that allows validity checking
on the accessors it generates. For instance, you will be able to say
   __PACKAGE__-mk_accessor(headers = Some::Header::Object);

and then this becomes a runtime error:

   Foo-new({ headers = Completely::Different::Class-new() })

Really I want it just to make sure that certain things are defined when
the constructor is called, but additional assertions would be handy too.
So, uh, what would be a good name for it, then? Class::Accessor::Assert?
That sounds like an interesting sub class and a good name. I was 
thinking of doing something similar but also adding a way to specify 
additional behaviours.

For example if I specify a field is an array, $foo-get($field) will 
return a list if wantarray is true and an additional method called 
${field}_add will be created to allow to to push additional values into 
the field.

In Class::Struct the syntax to specify an array like field is:
struct( foo = '@')
I was thinking about:
__PACKAGE__-mk_accessor( qw( +name @labels [EMAIL PROTECTED] ) );
Where + indicates a required field and @ indicates the list behaviour.

Clayton