X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FInstallationCheck.pm;h=397a99f240a46e58efcb500d260ae59f44eaa495;hb=a730d34238db1c8665a8b5e6973f19e5b3757820;hp=e8670761c918f8354ee8862ceebc77471f536b95;hpb=e55f0ed4f13e7e2ad30fd925464378c499006513;p=kivitendo-erp.git diff --git a/SL/InstallationCheck.pm b/SL/InstallationCheck.pm index e8670761c..397a99f24 100644 --- a/SL/InstallationCheck.pm +++ b/SL/InstallationCheck.pm @@ -11,12 +11,13 @@ BEGIN { @required_modules = ( { name => "parent", url => "http://search.cpan.org/~corion/", debian => 'libparent-perl' }, { name => "Archive::Zip", version => '1.16', url => "http://search.cpan.org/~adamk/", debian => 'libarchive-zip-perl' }, + { name => "Clone", url => "http://search.cpan.org/~rdf/", debian => 'libclone-perl' }, { name => "Config::Std", url => "http://search.cpan.org/~dconway/", debian => 'libconfig-std-perl' }, { name => "DateTime", url => "http://search.cpan.org/~drolsky/", debian => 'libdatetime-perl' }, { name => "DBI", version => '1.50', url => "http://search.cpan.org/~timb/", debian => 'libdbi-perl' }, { name => "DBD::Pg", version => '1.49', url => "http://search.cpan.org/~dbdpg/", debian => 'libdbd-pg' }, { name => "Email::Address", url => "http://search.cpan.org/~rjbs/", debian => 'libemail-address-perl' }, - { name => "FCGI", url => "http://search.cpan.org/~mstrout/", debian => 'libfcgi-perl' }, + { name => "FCGI", version => '0.72', url => "http://search.cpan.org/~mstrout/", debian => 'libfcgi-perl' }, { name => "JSON", url => "http://search.cpan.org/~makamaka", debian => 'libjson-perl' }, { name => "List::MoreUtils", version => '0.21', url => "http://search.cpan.org/~vparseval/", debian => 'liblist-moreutils-perl' }, { name => "Params::Validate", url => "http://search.cpan.org/~drolsky/", debian => 'libparams-validate-perl' }, @@ -34,12 +35,20 @@ BEGIN { { name => "YAML", version => '0.62', url => "http://search.cpan.org/~ingy/", debian => 'libyaml-perl' }, ); -@optional_modules = (); +@optional_modules = ( + { name => "Digest::SHA", url => "http://search.cpan.org/~mshelor/", debian => 'libdigest-sha-perl' }, + { name => "IO::Socket::SSL", url => "http://search.cpan.org/~sullr/", debian => 'libio-socket-ssl-perl' }, + { name => "Net::LDAP", url => "http://search.cpan.org/~gbarr/", debian => 'libnet-ldap-perl' }, + # Net::LDAP is core since 5.7.3 + { name => "Net::SMTP::SSL", version => '1.01', url => "http://search.cpan.org/~cwest/", debian => 'libnet-smtp-ssl-perl' }, + { name => "Net::SMTP::TLS", version => '0.12', url => "http://search.cpan.org/~awestholm/", debian => 'libnet-smtp-tls-perl' }, +); @developer_modules = ( { name => "Devel::REPL", url => "http://search.cpan.org/~doy/", debian => 'libdevel-repl-perl' }, { name => "Moose::Role", url => "http://search.cpan.org/~doy/", debian => 'libmoose-role-perl' }, { name => "Perl::Tags", url => "http://search.cpan.org/~osfameron/", debian => 'libperl-tags-perl' }, + { name => "Test::Deep", url => "http://search.cpan.org/~rjbs/", debian => 'libtest-deep-perl' }, ); $_->{fullname} = join ' ', grep $_, @$_{qw(name version)} @@ -51,7 +60,13 @@ sub module_available { my $module = $_[0]; my $version = $_[1] || '' ; - return eval "use $module $version; 1"; + my $got = eval "use $module $version (); 1"; + + if ($got) { + return ($got, $module->VERSION); + } else { + return + } } sub check_kpsewhich { @@ -89,7 +104,7 @@ my %conditional_dependencies; sub check_for_conditional_dependencies { return if $conditional_dependencies{net_ldap}++; - push @required_modules, { 'name' => 'Net::LDAP', 'url' => 'http://search.cpan.org/~gbarr/' } + push @required_modules, grep { $_->{name} eq 'Net::LDAP' } @optional_modules if $::lx_office_conf{authentication} && ($::lx_office_conf{authentication}->{module} eq 'LDAP'); }