Perl5-Alien / Alien-Base

Base classes for Alien:: modules (deprecated, see Alien-Build)
Other
35 stars 19 forks source link

Docs, alien_check_built_version() Return Value Unspecified #170

Closed wbraswell closed 7 years ago

wbraswell commented 7 years ago

In the docs, alien_check_installed_version() clearly tells us what to return: "This function determines if the library is already installed as part of the operating system, and returns the version as a string. If it can't be detected then it should return empty list." https://metacpan.org/pod/Alien::Base::ModuleBuild#alien_check_installed_version

Unfortunately, alien_check_built_version() doesn't give us any such indication, although I do see the string literal 'unknown' returned by Alien::m4... https://metacpan.org/pod/Alien::Base::ModuleBuild#alien_check_built_version $CWD[-1] =~ /^m4-(.*)$/ ? $1 : 'unknown'; https://st.aticpan.org/source/PLICEASE/Alien-m4-0.07/inc/My/ModuleBuild.pm

plicease commented 7 years ago

True. You are supposed to return the version number. For most autoconf style packages ( and a fair few others) you can get it from the name of the directory of the extracted tarball. As I am doing here with the regex. I will update the docs while working on #169 to address this.

wbraswell commented 7 years ago

@plicease Also we need to clearly describe what to return if no version number is found or if an error is encountered, etc.

plicease commented 7 years ago

I believe this is covered by #176 discussion can continue there as needed.

wbraswell commented 7 years ago

:+1: