On Fri, 14 Feb 2003, Matthew Simon Cavalletto wrote:
> However, using classes enables inheritance and other useful programming
> techniques, and there's a lot to be said for that.
Good point.
> Hmm. It seems like we can get the best of both worlds if we simply
> allow these functions to be called as class methods, for those formats
> that don't require any per-object initialization.
>
> my $dt = DateTime::Format::ICal->parse_datetime('20030117T032900Z');
>
> Or, more generally:
>
> my $format = 'DateTime::Format::ICal';
> my $dt = $format->parse_datetime( '20030117T032900Z' );
> my $dur = $format->parse_duration( '+P3WT4H55S' );
That's fine with. I can the the ICal docs to reflect this, because this
should just work with no code changes for the ICal format module.
-dave
/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/