-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ensure with nonstandard versions
This increases support for DragonFly BSD as well as FreeBSD, making them first class citizens for this module. Additionally, it creates a new structured fact called perl, which contains the various version numbers that can be referenced for what version of Perl is the system default. It was mainly added to properly support the config paths for the default @inc on DragonFly and FreeBSD. The cpan provider was updated to fix a few bugs around how it handled version strings, and using rubocop, some additional cleanup was done while there.
- Loading branch information
1 parent
554d408
commit e5b665a
Showing
6 changed files
with
99 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Facter.add(:perl) do | ||
setcode do | ||
perl = {} | ||
current_info = Facter::Util::Resolution.exec('perl -v') | ||
version = current_info.match(/v((\d+)\.(\d+)\.(\d*))/) | ||
Facter.debug "Matching perl version as #{version}" | ||
perl['version'] = version[1] | ||
perl['majversion'] = version[2] | ||
perl['minversion'] = version[3] | ||
perl['subversion'] = version[4] | ||
perl | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters