...
|
...
|
@@ -541,9 +541,47 @@ GitPrep is the best example for developers who want to create installabel Mojoli
|
541
|
541
|
|
542
|
542
|
Even if shared hosting server, you can install Mojolicious application as CGI.
|
543
|
543
|
|
544
|
|
-**1. CGI is supported in Mojolicious
|
|
544
|
+***1. cpanm and cpanfile, module installation and version controll***
|
545
|
545
|
|
546
|
|
-It is good luck for us that Mojolicious author [Sebastian Riedel](https://twitter.com/kraih) decided to support CGI in Mojolicious.
|
|
546
|
+[Tatsuhiko Miyagawa](http://weblog.bulknews.net/)'s cpanm and cpanfile is the tool which install CPAN module easily.
|
|
547
|
+
|
|
548
|
+**cpanm** is a command. It is **one file**. you can download cpanm easily and put it in your directory.
|
|
549
|
+
|
|
550
|
+**cpanfile** is **a definition** of module name and version. you create the following file which name is "cpanfile".
|
|
551
|
+
|
|
552
|
+ requires 'Time::HiRes', '== 1.9732';
|
|
553
|
+ requires 'DBD::SQLite', '== 1.50';
|
|
554
|
+ requires 'DBI', '== 1.634';
|
|
555
|
+ requires 'DBIx::Connector', '== 0.53';
|
|
556
|
+ requires 'Object::Simple', '== 3.14';
|
|
557
|
+ requires 'DBIx::Custom', '== 0.36';
|
|
558
|
+ requires 'Validator::Custom', '== 1.01';
|
|
559
|
+ requires 'Config::Tiny', '== 2.23';
|
|
560
|
+ requires 'Data::Page', '== 2.02';
|
|
561
|
+ requires 'Data::Page::Navigation', '== 0.06';
|
|
562
|
+ requires 'Mojolicious', '== 6.57';
|
|
563
|
+ requires 'Mojolicious::Plugin::BasicAuth', '== 0.08';
|
|
564
|
+ requires 'Mojolicious::Plugin::AutoRoute', '== 0.19';
|
|
565
|
+ requires 'Mojolicious::Plugin::INIConfig', '== 0.03';
|
|
566
|
+ requires 'Mojolicious::Plugin::DBViewer', '== 0.28';
|
|
567
|
+ requires 'Text::Markdown::Hoedown', '== 1.01';
|
|
568
|
+ requires 'Time::Moment', '== 0.38';
|
|
569
|
+
|
|
570
|
+If you want to install all defined modules, you only run the following command.
|
|
571
|
+
|
|
572
|
+ perl -Iextlib/lib/perl5 cpanm -L extlib --installdeps .
|
|
573
|
+
|
|
574
|
+It's ok. but in some environment Module::CoreList is not installed, and latest ExtUtils::MakeMaker is needed for module installation.
|
|
575
|
+
|
|
576
|
+I write the following way in "setup_module"
|
|
577
|
+
|
|
578
|
+ perl cpanm -n -l extlib Module::CoreList
|
|
579
|
+ perl -Iextlib/lib/perl5 cpanm -f -L extlib ExtUtils::MakeMaker
|
|
580
|
+ perl -Iextlib/lib/perl5 cpanm -L extlib --installdeps .
|
|
581
|
+
|
|
582
|
+***2. CGI is supported in Mojolicious***
|
|
583
|
+
|
|
584
|
+It is good luck for us that Mojolicious author [Sebastian Riedel](https://twitter.com/kraih) decided to **support CGI** in Mojolicious.
|
547
|
585
|
|
548
|
586
|
We can create web application which support CGI with a little effort.
|
549
|
587
|
|