[Bps-public-commit] RT-Extension-LDAPImport branch, master, updated. 0.35-1-g853a6f6
Alex Vandiver
alexmv at bestpractical.com
Tue Sep 24 14:23:19 EDT 2013
The branch, master has been updated
via 853a6f60ddb6e3125924e1e0150e3152d70ba0b0 (commit)
from 6a430b718d3dcf327d33ce81f6d9f2bbc9ebae6f (commit)
Summary of changes:
META.yml | 1 +
inc/Module/Install/RTx.pm | 29 ++++++++++++++++++++++++++---
inc/Module/Install/ReadmeFromPod.pm | 2 +-
3 files changed, 28 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 853a6f60ddb6e3125924e1e0150e3152d70ba0b0
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Sep 24 14:23:16 2013 -0400
Update inc/
diff --git a/META.yml b/META.yml
index 2f4338d..cc882e6 100644
--- a/META.yml
+++ b/META.yml
@@ -18,6 +18,7 @@ name: RT-Extension-LDAPImport
no_index:
directory:
- inc
+ - t
- xt
recommends:
Net::LDAP::Server::Test: 0
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 434a73d..ac04c79 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -174,14 +174,37 @@ install ::
}
}
+# stolen from RT::Handle so we work on 3.6 (cmp_versions came in with 3.8)
+{ my %word = (
+ a => -4,
+ alpha => -4,
+ b => -3,
+ beta => -3,
+ pre => -2,
+ rc => -1,
+ head => 9999,
+);
+sub cmp_version($$) {
+ my ($a, $b) = (@_);
+ my @a = grep defined, map { /^[0-9]+$/? $_ : /^[a-zA-Z]+$/? $word{$_}|| -10 : undef }
+ split /([^0-9]+)/, $a;
+ my @b = grep defined, map { /^[0-9]+$/? $_ : /^[a-zA-Z]+$/? $word{$_}|| -10 : undef }
+ split /([^0-9]+)/, $b;
+ @a > @b
+ ? push @b, (0) x (@a- at b)
+ : push @a, (0) x (@b- at a);
+ for ( my $i = 0; $i < @a; $i++ ) {
+ return $a[$i] <=> $b[$i] if $a[$i] <=> $b[$i];
+ }
+ return 0;
+}}
sub requires_rt {
my ($self,$version) = @_;
# if we're exactly the same version as what we want, silently return
return if ($version eq $RT::VERSION);
- require RT::Handle;
- my @sorted = sort RT::Handle::cmp_version $version,$RT::VERSION;
+ my @sorted = sort cmp_version $version,$RT::VERSION;
if ($sorted[-1] eq $version) {
# should we die?
@@ -193,4 +216,4 @@ sub requires_rt {
__END__
-#line 313
+#line 336
diff --git a/inc/Module/Install/ReadmeFromPod.pm b/inc/Module/Install/ReadmeFromPod.pm
index 6a80818..b5e03c3 100644
--- a/inc/Module/Install/ReadmeFromPod.pm
+++ b/inc/Module/Install/ReadmeFromPod.pm
@@ -7,7 +7,7 @@ use warnings;
use base qw(Module::Install::Base);
use vars qw($VERSION);
-$VERSION = '0.20';
+$VERSION = '0.22';
sub readme_from {
my $self = shift;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list