From fb48f50b66d4320d06e46a74b6f3ad3716c424a3 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 21 Jul 2023 18:59:21 +0200 Subject: [PATCH] check version with VERSION method, not import Trying to use import to check a version would sometimes check the version, but only if Exporter was being used. Otherwise, the version would throw an error or just be ignored. The correct way to check a version is using the VERSION method. --- Makefile.PL | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index b738fa1..1ff4530 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -16,7 +16,8 @@ BEGIN } use inc::latest 'File::ShareDir::Install'; -File::ShareDir::Install->import('0.03', 'install_share'); +File::ShareDir::Install->VERSION(0.03); +File::ShareDir::Install->import('install_share'); if (inc::latest->can("write")) {