On Tue, 21 Mar 2006, Herbert Liechti wrote:

I'm currently implementing a ressource reservation system and I'm
using the DateTime libs for this purpose. My main problem is
that im generating a set of Datetimes from ressource objects
(ie a month view) which are holding the information about
the ressource and its corresponding reservations.

The resulting set has no longer an assiociation to the original
ressource object. For reporting purposes it would be nice to
have an association back to the original object. ie.

my $dt = DateTime->new ( year => xxx, month => and so on....
refers_to => $objectreference);

and later

while iterating my set {
my $resObj = dt->getReferer();
}

any idea how to do that?

You could subclass DateTime.pm and just add your field. The DateTime::Set modules should work fine with this.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

Reply via email to