2

I've been searching for a while and I cannot find an easy solution for building an install package on linux for a perl application I've built. My application is a mojolicious application and I am using DBIx::Schema. I need to accomplish the following;

  • import my DB schema into a database
  • check for and install any missing perl modules
  • copy my actual application to a location.
  • possibly set my application to run as a service.

This is rather trival on windows, but I can't seem to find a clean solution to do this on Linux. Is the easiest approach to just write another perlscript to do the install?

thanks.

user1768233
  • 1,409
  • 3
  • 20
  • 28

2 Answers2

1

Try to use Rex or checkout this SO question Is there a Perl or Lua alternative to Capistrano?.

Community
  • 1
  • 1
Logioniz
  • 891
  • 6
  • 15
0

To deploy your DBIx::Class::Schema you can use $schema->deploy in an install script. It uses SQL::Translator to generate the SQL statements for your RDBMS of choice.

Another possibility to generate the SQL statements in the app build process and store them in text files per supported RDBMS using $schema->deployment_statements.

Many people package their apps like CPAN modules so they can't be installed using the CPAN toolkit apps like cpan, cpanminus or cpanplus.

Alexander Hartmaier
  • 2,178
  • 12
  • 21