The from_object constructor always constructs an object of class Time::Moment, regardless of what class it was called on, such as a subclass.
use strict;
use warnings;
use Time::Piece 'localtime';
use Time::Moment;
use With::Roles;
use Scalar::Util 'blessed';
print blessed(Time::Moment->with::roles('+TimeZone')->from_object(scalar localtime)); # Time::Moment
I've verified none of the other constructors have this issue.
The from_object constructor always constructs an object of class Time::Moment, regardless of what class it was called on, such as a subclass.
I've verified none of the other constructors have this issue.