I'm cool with that .. I guess then that each Format module that is 'use'd would somehow publish methods to the DateTime Class rather than an object? I'm not sure how this would be technically done using your example code ..

Ah, bad naming. I wasn't trying to mix DT::F modules here. How bout this (adhoc naming for demonstration purposes):

   use DateTime; # just the basics
   use DateTime::API::Format qw(strptime);

The DT::API::* modules are just collection of methods, which could be as simple as

  # even in DT/API/Format.pm, use package DateTime
  package DateTime;
  sub strptime { ... }

Nothing fancy :)

--d

Reply via email to