diff options
author | David Golden <dagolden@cpan.org> | 2011-01-24 23:06:38 -0500 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2011-01-24 23:41:45 -0500 |
commit | 7cf8bfc08bba55cf85781cc2cdb8d5ace99245ec (patch) | |
tree | 708c8bbcc6060f3955178daa2f60ab83bac7f336 /cpan/Module-Build/lib/Module/Build/Version.pm | |
parent | 313ce23f886218e9cbc159ce0f8dfdff84e48128 (diff) | |
download | perl-7cf8bfc08bba55cf85781cc2cdb8d5ace99245ec.tar.gz |
Update Module::Build to CPAN version 0.3622
[DELTA]
0.3622 - Mon Jan 24 21:06:50 EST 2011
- No changes from 0.36_21
0.36_21 - Fri Jan 21 11:01:28 EST 2011
- Changed YAML::Tiny references to the new CPAN::Meta::YAML module
instead, which is the YAML-variant that is going into the Perl core
0.36_20 - Fri Dec 10 15:36:03 EST 2010
*** DEPRECATIONS ***
- Module::Build::Version has been deprecated. Module::Build now depends
directly upon version.pm. A pure-perl version has been bundled in inc/
solely for bootstrapping in case configure_requires is not supported.
M::B::Version remains as a wrapper around version.pm.
- Module::Build::ModuleInfo has been deprecated. Module::Build now
depends directly upon Module::Metadata (which is an extraction of
M::B::ModuleInfo intended for general reuse). A pure-perl version has
been bundled in inc/ solely for bootstrapping in case
configure_requires is not supported. M::B::ModuleInfo remains as a
wrapper around Module::Metadata.
- Module::Build::YAML has been deprecated. Module::Build now depends
directly upon YAML::Tiny. M::B::YAML remains as a subclass wrapper.
The YAML_support feature has been removed, as YAML is now an ordinary
dependency.
0.36_19 - Tue Dec 7 13:43:42 EST 2010
Bug fixes:
- Perl::OSType is declared as a 'configure_requires' dependency, but is
also bundled in inc (and loaded if needed) [David Golden]
0.36_18 - Mon Dec 6 16:46:49 EST 2010
Changes:
- Added dependency on Perl::OSType to refactor and centralize
management of OS type mapping [David Golden]
- When parsing a version number out of a file, any trailing alphabetical
characters will be dropped to avoid fatal errors when comparing version
numbers. These would have been dropped (with a warning) anyway during
an ordinary numeric comparison. (RT#56071) [David Golden]
Bug fixes:
- A Perl interpreter mismatch between running Build.PL and running Build
is now a fatal error, not a warning (RT#55183) [David Golden]
- Bundled Module::Build::Version updated to bring into sync with CPAN
version.pm 0.86 [David Golden]
- No longer uses fake user 'foo' in t/tilde (RT#61793) [David Golden]
- Won't fail tests if an ancient Tie::IxHash is installed
[Christopher J. Madsen]
- Correctly report missing metafile field names [David Golden]
- Suppress uninitialized value errors during Pod creation
on ActiveState Perl [David Golden]
- Return to starting directory after install action; this is
an attempt to fix an install.t heisenbug (RT#63003) [David Golden]
- A broken version.pm load won't cause Module::Build::Version to
die trying to install itself as a mock version (RT#59499)
[Eric Wilhelm and David Golden]
- PERL_DL_NONLAZY is now always set when tests are run
(RT#56055) [Dmitry Karasik]
- 'fakeinstall' will use .modulebuildrc actions for 'install' if
no specific 'fakeinstall' options are provided (RT#57279)
[David Golden]
- Add install*script to search path for installdeps client
and search site, then vendor, then core paths
- Skip noexec tmpdir check on Windows (RT#55667) [Jan Dubois]
- Arguments with key value pairs may now have keys with "-" in them
(RT#53050) [David Golden]
- Add quotemeta to t/tilde.t test to fix Cygwin fails
[Chris Williams and David Golden]
- Build script now checks that M::B is at least the same version
of M::B as provided in 'configure_requires' in META
(RT#54954) [David Golden]
0.36_17 - Wed Oct 27 18:08:36 EDT 2010
Enhancements:
- Added 'distinstall' action to run 'Build install' inside the
generated distribution directory [Jeff Thalhammer]
0.36_16 - Thu Aug 26 12:44:07 EDT 2010
Bug fixes:
- Better error message in case package declaration is not found
when searching for version. [Alexandr Ciornii]
- Skips 'release_status' tests on perl < 5.8.1 due to buggy
treatment of dotted-decimal version numbers [David Golden]
0.36_15 - Wed Aug 25 10:41:28 EDT 2010
Bug fixes:
- Added a mock Software::License to prevent t/properties/license.t
from failing.
0.36_14 - Sun Aug 22 22:56:50 EDT 2010
Enhancements:
- Adds 'release_status' and 'dist_suffix' properties in preparation
for adding CPAN Meta Spec 2 support. 'dist_suffix' will be set
to 'TRIAL' automatically when necessary. [David Golden]
- Makes 'license' more liberal. You can now specify either a license
key from the approved list (c.f. Module::Build::API) or just a
Software::License subclass name (e.g. 'Perl_5'). This should
provide better support for custom or proprietary licenses.
[David Golden]
0.36_13 - Wed Jul 28 22:40:25 EDT 2010
Bug-fixes:
- Bundled Module::Build::Version updated to bring into sync with CPAN
version.pm 0.82 [David Golden]
0.36_12 - Tue Jul 27 00:08:51 EDT 2010
Enhancements:
- Module::Build::Compat will now convert dotted-decimal prereqs into
decimal rather than dying (and will warn about this). [Apocalypse]
Bug fixes:
- Caches case-sensitivity checks to boost performance, fixes
RT#55162 and RT#56513 [Reini Urban]
- Won't try to use ActivePerl doc generation tools without confirming
that they are indeed installed. [David Golden]
- Sets temporary $ENV{HOME} in testing to an absolute path, which fixes
some issues when tested as part of the Perl core [Nicholas Clark]
- Module::Build::ModuleInfo now warns instead of dying when a module
has an invalid version. ->version now just returns undef
(RT#59593) [David Golden]
Changes:
- When authors do not specify Module::Build in configure_requires and
Module::Build is automatically added, a warning will be issued
showing the added prerequisite [David Golden]
- Moved automatic configure_requires generation into get_metadata()
and added an 'auto' argument to toggle it (on for META and off
for MYMETA) [David Golden]
0.36_11 - Thu May 27 09:41:23 EDT 2010
Bug fixes:
- Handle META/MYMETA reading and writing within Module::Build to ensure
utf8 mode on filehandles. Now passes/gets only strings to YAML::Tiny
or Module::Build::YAML
0.36_10 - Wed May 19 18:36:06 EDT 2010
Bug fixes:
- Fix failing t/manifypods.t on Windows from 0.36_09 changes [Klaus
Eichner]
0.36_09 - Tue May 11 09:19:12 EDT 2010
Bug fixes:
- Improve HTML documentation generation on ActivePerl (RT#53478)
[Scott Renner and Klaus Eichner]
0.36_08 - Mon Apr 26 08:00:15 EDT 2010
Enhancements:
- Give a list of valid licenses when given one we don't recognize
(RT#55951) [Yanick Champoux]
- Added 'Build manifest_skip' action to generate a default MANIFEST.SKIP
[David Golden]
Changes:
- When temporarily generating a MANIFEST.SKIP when none exists, it will
be removed on exit instead of hanging around until 'Build clean'. This
is less surprising/confusing and the 'Build manifest_skip' action
is now available instead to bootstrap the file [David Golden]
Bug fixes:
- Fixed runtime error on cygwin when searching for an executable command
during installdeps testing [David Golden]
Diffstat (limited to 'cpan/Module-Build/lib/Module/Build/Version.pm')
-rw-r--r-- | cpan/Module-Build/lib/Module/Build/Version.pm | 681 |
1 files changed, 9 insertions, 672 deletions
diff --git a/cpan/Module-Build/lib/Module/Build/Version.pm b/cpan/Module-Build/lib/Module/Build/Version.pm index 21abe00cbe..e659712ddb 100644 --- a/cpan/Module-Build/lib/Module/Build/Version.pm +++ b/cpan/Module-Build/lib/Module/Build/Version.pm @@ -1,684 +1,21 @@ package Module::Build::Version; use strict; - use vars qw($VERSION); -$VERSION = 0.77; - -eval "use version $VERSION"; -if ($@) { # can't locate version files, use our own - - # Avoid redefined warnings if an old version.pm was available - delete $version::{$_} foreach keys %version::; - - # first we get the stub version module - my $version; - while (<DATA>) { - s/(\$VERSION)\s=\s\d+/\$VERSION = 0/; - $version .= $_ if $_; - last if /^1;$/; - } - - # and now get the current version::vpp code - my $vpp; - while (<DATA>) { - s/(\$VERSION)\s=\s\d+/\$VERSION = 0/; - $vpp .= $_ if $_; - last if /^1;$/; - } - - # but we eval them in reverse order since version depends on - # version::vpp to already exist - eval $vpp; die $@ if $@; - $INC{'version/vpp.pm'} = 'inside Module::Build::Version'; - eval $version; die $@ if $@; - $INC{'version.pm'} = 'inside Module::Build::Version'; -} - -# now we can safely subclass version, installed or not -use vars qw(@ISA); -@ISA = qw(version); - -1; -__DATA__ -# stub version module to make everything else happy -package version; - -use 5.005_04; -use strict; - -use vars qw(@ISA $VERSION $CLASS *declare *qv); - -$VERSION = 0.77; - -$CLASS = 'version'; - -push @ISA, "version::vpp"; -local $^W; -*version::qv = \&version::vpp::qv; -*version::declare = \&version::vpp::declare; -*version::_VERSION = \&version::vpp::_VERSION; -if ($] > 5.009001 && $] <= 5.010000) { - no strict 'refs'; - *{'version::stringify'} = \*version::vpp::stringify; - *{'version::(""'} = \*version::vpp::stringify; - *{'version::new'} = \*version::vpp::new; -} - -# Preloaded methods go here. -sub import { - no strict 'refs'; - my ($class) = shift; - - # Set up any derived class - unless ($class eq 'version') { - local $^W; - *{$class.'::declare'} = \&version::declare; - *{$class.'::qv'} = \&version::qv; - } - - my %args; - if (@_) { # any remaining terms are arguments - map { $args{$_} = 1 } @_ - } - else { # no parameters at all on use line - %args = - ( - qv => 1, - 'UNIVERSAL::VERSION' => 1, - ); - } - - my $callpkg = caller(); - - if (exists($args{declare})) { - *{$callpkg."::declare"} = - sub {return $class->declare(shift) } - unless defined(&{$callpkg.'::declare'}); - } - - if (exists($args{qv})) { - *{$callpkg."::qv"} = - sub {return $class->qv(shift) } - unless defined(&{"$callpkg\::qv"}); - } - - if (exists($args{'UNIVERSAL::VERSION'})) { - local $^W; - *UNIVERSAL::VERSION = \&version::_VERSION; - } +$VERSION = '0.87'; ### XXX sync with version of version.pm below - if (exists($args{'VERSION'})) { - *{$callpkg."::VERSION"} = \&version::_VERSION; - } -} +use version 0.87; +our @ISA = qw(version); 1; -# replace everything from here to the end with the current version/vpp.pm -package version::vpp; -use strict; - -use POSIX qw/locale_h/; -use locale; -use vars qw ($VERSION @ISA @REGEXS); -$VERSION = '0.77'; -$VERSION = eval $VERSION; - -push @REGEXS, qr/ - ^v? # optional leading 'v' - (\d*) # major revision not required - \. # requires at least one decimal - (?:(\d+)\.?){1,} - /x; - -use overload ( - '""' => \&stringify, - '0+' => \&numify, - 'cmp' => \&vcmp, - '<=>' => \&vcmp, - 'bool' => \&vbool, - 'nomethod' => \&vnoop, -); - -my $VERSION_MAX = 0x7FFFFFFF; - -eval "use warnings"; -if ($@) { - eval ' - package warnings; - sub enabled {return $^W;} - 1; - '; -} - -sub new -{ - my ($class, $value) = @_; - my $self = bless ({}, ref ($class) || $class); - - if ( ref($value) && eval('$value->isa("version")') ) { - # Can copy the elements directly - $self->{version} = [ @{$value->{version} } ]; - $self->{qv} = 1 if $value->{qv}; - $self->{alpha} = 1 if $value->{alpha}; - $self->{original} = ''.$value->{original}; - return $self; - } - - my $currlocale = setlocale(LC_ALL); - - # if the current locale uses commas for decimal points, we - # just replace commas with decimal places, rather than changing - # locales - if ( localeconv()->{decimal_point} eq ',' ) { - $value =~ tr/,/./; - } - - if ( not defined $value or $value =~ /^undef$/ ) { - # RT #19517 - special case for undef comparison - # or someone forgot to pass a value - push @{$self->{version}}, 0; - $self->{original} = "0"; - return ($self); - } - - if ( $#_ == 2 ) { # must be CVS-style - $value = 'v'.$_[2]; - } - - $value = _un_vstring($value); - - # exponential notation - if ( $value =~ /\d+.?\d*e[-+]?\d+/ ) { - $value = sprintf("%.9f",$value); - $value =~ s/(0+)$//; # trim trailing zeros - } - - # This is not very efficient, but it is morally equivalent - # to the XS code (as that is the reference implementation). - # See vutil/vutil.c for details - my $qv = 0; - my $alpha = 0; - my $width = 3; - my $saw_period = 0; - my $vinf = 0; - my ($start, $last, $pos, $s); - $s = 0; - - while ( substr($value,$s,1) =~ /\s/ ) { # leading whitespace is OK - $s++; - } - - if (substr($value,$s,1) eq 'v') { - $s++; # get past 'v' - $qv = 1; # force quoted version processing - } - - $start = $last = $pos = $s; - - # pre-scan the input string to check for decimals/underbars - while ( substr($value,$pos,1) =~ /[._\d,]/ ) { - if ( substr($value,$pos,1) eq '.' ) { - if ($alpha) { - Carp::croak("Invalid version format ". - "(underscores before decimal)"); - } - $saw_period++; - $last = $pos; - } - elsif ( substr($value,$pos,1) eq '_' ) { - if ($alpha) { - require Carp; - Carp::croak("Invalid version format ". - "(multiple underscores)"); - } - $alpha = 1; - $width = $pos - $last - 1; # natural width of sub-version - } - elsif ( substr($value,$pos,1) eq ',' - and substr($value,$pos+1,1) =~ /[0-9]/ ) { - # looks like an unhandled locale - $saw_period++; - $last = $pos; - } - $pos++; - } - - if ( $alpha && !$saw_period ) { - require Carp; - Carp::croak("Invalid version format ". - "(alpha without decimal)"); - } - - if ( $alpha && $saw_period && $width == 0 ) { - require Carp; - Carp::croak("Invalid version format ". - "(misplaced _ in number)"); - } - - if ( $saw_period > 1 ) { - $qv = 1; # force quoted version processing - } - - $last = $pos; - $pos = $s; - - if ( $qv ) { - $self->{qv} = 1; - } - - if ( $alpha ) { - $self->{alpha} = 1; - } - - if ( !$qv && $width < 3 ) { - $self->{width} = $width; - } - - while ( substr($value,$pos,1) =~ /\d/ ) { - $pos++; - } - - if ( substr($value,$pos,1) !~ /[a-z]/ ) { ### FIX THIS ### - my $rev; - - while (1) { - $rev = 0; - { - - # this is atoi() that delimits on underscores - my $end = $pos; - my $mult = 1; - my $orev; - - # the following if() will only be true after the decimal - # point of a version originally created with a bare - # floating point number, i.e. not quoted in any way - if ( !$qv && $s > $start && $saw_period == 1 ) { - $mult *= 100; - while ( $s < $end ) { - $orev = $rev; - $rev += substr($value,$s,1) * $mult; - $mult /= 10; - if ( abs($orev) > abs($rev) - || abs($rev) > abs($VERSION_MAX) ) { - if ( warnings::enabled("overflow") ) { - require Carp; - Carp::carp("Integer overflow in version"); - } - $s = $end - 1; - $rev = $VERSION_MAX; - } - $s++; - if ( substr($value,$s,1) eq '_' ) { - $s++; - } - } - } - else { - while (--$end >= $s) { - $orev = $rev; - $rev += substr($value,$end,1) * $mult; - $mult *= 10; - if ( abs($orev) > abs($rev) - || abs($rev) > abs($VERSION_MAX) ) { - if ( warnings::enabled("overflow") ) { - require Carp; - Carp::carp("Integer overflow in version"); - } - $end = $s - 1; - $rev = $VERSION_MAX; - } - } - } - } - - # Append revision - push @{$self->{version}}, $rev; - if ( substr($value,$pos,1) eq '.' - && substr($value,$pos+1,1) =~ /\d/ ) { - $s = ++$pos; - } - elsif ( substr($value,$pos,1) eq '_' - && substr($value,$pos+1,1) =~ /\d/ ) { - $s = ++$pos; - } - elsif ( substr($value,$pos,1) eq ',' - && substr($value,$pos+1,1) =~ /\d/ ) { - $s = ++$pos; - } - elsif ( substr($value,$pos,1) =~ /\d/ ) { - $s = $pos; - } - else { - $s = $pos; - last; - } - if ( $qv ) { - while ( substr($value,$pos,1) =~ /\d/ ) { - $pos++; - } - } - else { - my $digits = 0; - while (substr($value,$pos,1) =~ /[\d_]/ && $digits < 3) { - if ( substr($value,$pos,1) ne '_' ) { - $digits++; - } - $pos++; - } - } - } - } - if ( $qv ) { # quoted versions always get at least three terms - my $len = scalar @{$self->{version}}; - $len = 3 - $len; - while ($len-- > 0) { - push @{$self->{version}}, 0; - } - } - - if ( substr($value,$pos) ) { # any remaining text - if ( warnings::enabled("misc") ) { - require Carp; - Carp::carp("Version string '$value' contains invalid data; ". - "ignoring: '".substr($value,$pos)."'"); - } - } - - # cache the original value for use when stringification - if ( $vinf ) { - $self->{vinf} = 1; - $self->{original} = 'v.Inf'; - } - else { - $self->{original} = substr($value,0,$pos); - } - - return ($self); -} - -*parse = \&new; - -sub numify -{ - my ($self) = @_; - unless (_verify($self)) { - require Carp; - Carp::croak("Invalid version object"); - } - my $width = $self->{width} || 3; - my $alpha = $self->{alpha} || ""; - my $len = $#{$self->{version}}; - my $digit = $self->{version}[0]; - my $string = sprintf("%d.", $digit ); - - for ( my $i = 1 ; $i < $len ; $i++ ) { - $digit = $self->{version}[$i]; - if ( $width < 3 ) { - my $denom = 10**(3-$width); - my $quot = int($digit/$denom); - my $rem = $digit - ($quot * $denom); - $string .= sprintf("%0".$width."d_%d", $quot, $rem); - } - else { - $string .= sprintf("%03d", $digit); - } - } - - if ( $len > 0 ) { - $digit = $self->{version}[$len]; - if ( $alpha && $width == 3 ) { - $string .= "_"; - } - $string .= sprintf("%0".$width."d", $digit); - } - else # $len = 0 - { - $string .= sprintf("000"); - } - - return $string; -} - -sub normal -{ - my ($self) = @_; - unless (_verify($self)) { - require Carp; - Carp::croak("Invalid version object"); - } - my $alpha = $self->{alpha} || ""; - my $len = $#{$self->{version}}; - my $digit = $self->{version}[0]; - my $string = sprintf("v%d", $digit ); - - for ( my $i = 1 ; $i < $len ; $i++ ) { - $digit = $self->{version}[$i]; - $string .= sprintf(".%d", $digit); - } - - if ( $len > 0 ) { - $digit = $self->{version}[$len]; - if ( $alpha ) { - $string .= sprintf("_%0d", $digit); - } - else { - $string .= sprintf(".%0d", $digit); - } - } - - if ( $len <= 2 ) { - for ( $len = 2 - $len; $len != 0; $len-- ) { - $string .= sprintf(".%0d", 0); - } - } - - return $string; -} - -sub stringify -{ - my ($self) = @_; - unless (_verify($self)) { - require Carp; - Carp::croak("Invalid version object"); - } - return exists $self->{original} - ? $self->{original} - : exists $self->{qv} - ? $self->normal - : $self->numify; -} - -sub vcmp -{ - require UNIVERSAL; - my ($left,$right,$swap) = @_; - my $class = ref($left); - unless ( UNIVERSAL::isa($right, $class) ) { - $right = $class->new($right); - } - - if ( $swap ) { - ($left, $right) = ($right, $left); - } - unless (_verify($left)) { - require Carp; - Carp::croak("Invalid version object"); - } - unless (_verify($right)) { - require Carp; - Carp::croak("Invalid version object"); - } - my $l = $#{$left->{version}}; - my $r = $#{$right->{version}}; - my $m = $l < $r ? $l : $r; - my $lalpha = $left->is_alpha; - my $ralpha = $right->is_alpha; - my $retval = 0; - my $i = 0; - while ( $i <= $m && $retval == 0 ) { - $retval = $left->{version}[$i] <=> $right->{version}[$i]; - $i++; - } - - # tiebreaker for alpha with identical terms - if ( $retval == 0 - && $l == $r - && $left->{version}[$m] == $right->{version}[$m] - && ( $lalpha || $ralpha ) ) { - - if ( $lalpha && !$ralpha ) { - $retval = -1; - } - elsif ( $ralpha && !$lalpha) { - $retval = +1; - } - } - - # possible match except for trailing 0's - if ( $retval == 0 && $l != $r ) { - if ( $l < $r ) { - while ( $i <= $r && $retval == 0 ) { - if ( $right->{version}[$i] != 0 ) { - $retval = -1; # not a match after all - } - $i++; - } - } - else { - while ( $i <= $l && $retval == 0 ) { - if ( $left->{version}[$i] != 0 ) { - $retval = +1; # not a match after all - } - $i++; - } - } - } - - return $retval; -} - -sub vbool { - my ($self) = @_; - return vcmp($self,$self->new("0"),1); -} - -sub vnoop { - require Carp; - Carp::croak("operation not supported with version object"); -} - -sub is_alpha { - my ($self) = @_; - return (exists $self->{alpha}); -} - -sub qv { - my $value = shift; - my $class = 'version'; - if (@_) { - $class = ref($value) || $value; - $value = shift; - } - - $value = _un_vstring($value); - $value = 'v'.$value unless $value =~ /(^v|\d+\.\d+\.\d)/; - my $version = $class->new($value); - return $version; -} - -*declare = \&qv; - -sub is_qv { - my ($self) = @_; - return (exists $self->{qv}); -} - - -sub _verify { - my ($self) = @_; - if ( ref($self) - && eval { exists $self->{version} } - && ref($self->{version}) eq 'ARRAY' - ) { - return 1; - } - else { - return 0; - } -} - -sub _un_vstring { - my $value = shift; - # may be a v-string - if ( $] >= 5.006_000 && length($value) >= 3 && $value !~ /[._]/ ) { - my $tvalue = sprintf("v%vd",$value); - if ( $tvalue =~ /^v\d+\.\d+\.\d+$/ ) { - # must be a v-string - $value = $tvalue; - } - } - return $value; -} - -sub _VERSION { - my ($obj, $req) = @_; - my $class = ref($obj) || $obj; - - no strict 'refs'; - if ( exists $INC{"$class.pm"} and not %{"$class\::"} and $] >= 5.008) { - # file but no package - require Carp; - Carp::croak( "$class defines neither package nor VERSION" - ."--version check failed"); - } - - my $version = eval "\$$class\::VERSION"; - if ( defined $version ) { - local $^W if $] <= 5.008; - $version = version::vpp->new($version); - } - - if ( defined $req ) { - unless ( defined $version ) { - require Carp; - my $msg = $] < 5.006 - ? "$class version $req required--this is only version " - : "$class does not define \$$class\::VERSION" - ."--version check failed"; +=head1 NAME - if ( $ENV{VERSION_DEBUG} ) { - Carp::confess($msg); - } - else { - Carp::croak($msg); - } - } +Module::Build::Version - DEPRECATED - $req = version::vpp->new($req); +=head1 DESCRIPTION - if ( $req > $version ) { - require Carp; - if ( $req->is_qv ) { - Carp::croak( - sprintf ("%s version %s required--". - "this is only version %s", $class, - $req->normal, $version->normal) - ); - } - else { - Carp::croak( - sprintf ("%s version %s required--". - "this is only version %s", $class, - $req->stringify, $version->stringify) - ); - } - } - } +Module::Build now lists L<version> as a C<configure_requires> dependency +and no longer installs a copy. - return defined $version ? $version->stringify : undef; -} +=cut -1; #this line is important and will help the module return a true value |