I am creating a custom MyDate class using Moo with attributes year, month and day.
I want to have three different ways to instantiate MyDate class.
2. MyDate->new(year=>2019, month=>05, day=>16);
1. When called like this, I would like to use the Date::Calc::Today to assign the values to year, month and day
2. When called like this, the values passed will be set to instance data.
3. When called like this, I would want to regex and find year, month and day and assign it to instance data.
I am not sure on how to achieve using Moo.
Can anyone help me with the template.
Thanks in advance.