On 12/21/07 8:39 PM, Adam Prime wrote:
> sub init_convention_manager {
>      my $self = shift;
>      my $cm = $self->SUPER::init_convention_manager(@_);
>      $cm->singular_to_plural_function(\&Lingua::EN::Inflect::Number::to_PL);
>      $cm->plural_to_singular_function(\&Lingua::EN::Inflect::Number::to_S);
>      return $cm;
> }

Also, FWIW, remember that the arguably better and more straightforward way
to do this is to make your own ConventionManager subclass and simply
override the singular_to_plural() and plural_to_singular() methods.  (Then
set the "default" convention_manager_class() name in your Metadata subclass,

The technique shown above (and also used as an example in the docs) is
basically just a way to avoid making a subclass if you just want to override
the singular/plural methods.  But in the long run, making a proper
ConventionManager subclass is probably the best bet.


This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
Rose-db-object mailing list

Reply via email to