Catalyst::HelperãåºåããMyApp.pmã«ã
use Catalyst::Runtime '5.70';
ã£ã¦ãããããªãã§ããã
ãã¾ãHelper使ããªãããæ°ä»ããªãã£ããã©ãè¯ãè¦ããæååã«ãªã£ã¦ããã§ããããã£ã¦ãã¨ã¯ãCatalyst::Runtimeãã¼ã¸ã§ã³5.70以ä¸ãè¦æ±ãã¦ããããããªãã¦ãsub importã«'5.70'ã¨ããå¼æ°ã渡ãã¦ãã ããªãã§ããã
ããã
use Catalyst::Runtime 5.70;
ãã®ããã«æ¸ãã¨ãã¼ã¸ã§ã³ãã§ãã¯ãåãã¦ãCatalyst::Runtimeã®ãã¼ã¸ã§ã³ã5.70æªæºã ã¨ã³ã³ãã¤ã«ã¨ã©ã¼ã«ãªãã¾ãã
$ perl -e "use Catalyst::Runtime '5.70';"; $ perl -e "use Catalyst::Runtime 5.70;"; Catalyst::Runtime version 5.7 required--this is only version 5.5 at -e line 1. BEGIN failed--compilation aborted at -e line 1. # æé ãã¾ãããå®éã«ã¯5.5ã¨ãããã¾ããã
ã¡ãªã¿ã«ãã¼ã¸ã§ã³æå®é¨åã¯IVãããªãã¨ãã¡ãªã®ã§ã
BEGIN { my $ver = 5.70; use Catalyst::Runtime $ver; }
ã£ã¦æ¸ãã¦ããã¼ã¸ã§ã³ãã§ãã¯ã¯ãã¦ãããªãã®ã§ã注æãã