chansen / p5-time-moment

Time::Moment represents an exact moment in time.
32 stars 8 forks source link

Typo disallows export for Time::Moment::Adjusters #29

Closed unobe closed 6 years ago

unobe commented 6 years ago

Thanks for the module, @chansen ! I use it at work and am also considering using it for a custom project and noted that there's a misspelling of 'OrthodoxEasterSunday' on line 17 of Time::Moment::Adjusters that doesn't allow the function to be exported.

chansen commented 6 years ago

Thank you for the bug report! I'll push a CPAN release this weekend, if you need a temporary workaround you can use the following:

use Time::Moment;
use Time::Moment::Adjusters qw[:all];

BEGIN {
  # Workaround typo in Time::Moment <= v0.43
  if (__PACKAGE__->can('OthodoxEasterSunday')) {
    *OrthodoxEasterSunday = \&Time::Moment::Adjusters::OrthodoxEasterSunday;
  }
}

say Time::Moment->now->with(OrthodoxEasterSunday);
unobe commented 6 years ago

Thanks @chansen !

chansen commented 6 years ago

I have shipped the long overdue release of v0.44 to CPAN incorporating fixes for this typo. Sorry for the delay!

-- chansen

unobe commented 6 years ago

Thanks @chansen !