App-Info
view release on metacpan or search on metacpan
lib/App/Info.pm view on Meta::CPAN
$self->{major} = $self->unknown( key => 'major',
prompt => "Enter major version",
callback => sub { /^\d+$/ },
error => "Not a number")
unless defined $self->{major};
}
return $self->{version};
}
Finally, the C<confirm()> method should be used to verify core pieces of data
that significant numbers of other methods rely on. Typically such data are
executables or configuration files from which will be drawn other meta data.
Most often, such major data points will be sought in the object constructor.
Here's an example:
sub new {
# Construct the object so that handlers will work properly.
my $self = shift->SUPER::new(@_);
# Try to find the executable.
( run in 0.506 second using v1.01-cache-2.11-cpan-73692580452 )