This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Adding Module::Build::Version missed in upgrade.
[perl5.git] / lib / Module / Build / Version.pm
1 package Module::Build::Version;
2 use base qw/version/;
3
4 use overload (
5     '""' => \&stringify,
6 );
7
8 sub new {
9     my ($class, $value) = @_;
10     my $self = $class->SUPER::new($value);
11     $self->original($value);
12     return $self;
13 }
14
15 sub original {
16     my $self = shift;
17     $self->{original} = shift if @_;
18     return $self->{original};
19 }
20
21 sub stringify {
22     my $self = shift;
23     return $self->original;
24 }
25
26 1;