Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

*** empty log message ***

git-svn-id: svn://svn.tt2.org/tt/Template2/trunk@56 d5a88997-0a34-4036-9ed2-92fb5d660d91
  • Loading branch information...
commit 60dfe443ab30f9727ac60a2b2b0ba1bf99b4e025 1 parent d3ffdb6
@abw authored
Showing with 42 additions and 4 deletions.
  1. +42 −4 Makefile.PL
View
46 Makefile.PL
@@ -51,14 +51,18 @@ plugins that require external modules not available on your system.
EOF
-foreach my $module (qw( XML::DOM XML::RSS XML::XPath DBI )) {
+foreach my $mods ( [ XML::DOM => \&check_dom ],
+ [ XML::RSS => \&check_rss ],
+ [ XML::XPath => \&check_xpath ],
+ [ DBI => \&dbi_config ] ) {
+ my ($module, $code) = @$mods;
+
eval "use $module";
if ($@) {
- print " $module: not found - skipping test\n";
+ print " $module - skipping test (module not installed)\n";
}
else {
- print " $module found - including test\n";
- dbi_config() if $module eq 'DBI';
+ &$code;
}
}
@@ -109,6 +113,40 @@ EOF
#------------------------------------------------------------------------
+# check_dom_version()
+#------------------------------------------------------------------------
+
+sub check_dom {
+ if ($] == 5.006 && $XML::DOM::VERSION <= 1.25) {
+ print " XML::DOM - version $XML::DOM::VERSION may not work with Perl $], skipping\n";
+ }
+ else {
+ print " XML::DOM - including tests\n";
+ }
+}
+
+
+sub check_rss {
+ if ($XML::RSS::VERSION < 0.9) {
+ print " XML::RSS - please upgrade to version 0.9 or later ($XML::RSS::VERSION installed)\n";
+ }
+ else {
+ print " XML::RSS - including tests\n";
+ }
+}
+
+
+sub check_xpath {
+ if ($XML::XPath::VERSION < 1.00) {
+ print " XML::XPath - please upgrade to version 1.00 or later ($XML::XPath::VERSION installed)\n";
+ }
+ else {
+ print " XML::XPath - including tests\n";
+ }
+}
+
+
+#------------------------------------------------------------------------
# dbi_config()
#
# Quiz the user for options related to running the DBI tests.
Please sign in to comment.
Something went wrong with that request. Please try again.