Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

code-check/cli-template-perl

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Command line application template for Perl

Implement CLI application by editing main.pl.
You may add new files to keep your code clean, if it is allowed in your challenge.

How to get input parameters

In main.pl, there is a function called main, which receives command line arguments as-is.

sub main {
    # code to run ...
}

main(@ARGV);

How to output result

You can use the standard print() method to output results to standard output.

print("text to output");

Install External Libraries

To install external libraries, write dependencies in cpanfile. Dependencies will be install by using Carton.

Following sample from cpanfile has been verified to installs dependencies as expected.

requires 'Plack', '1.0'; # 1.0 or newer
requires 'JSON', '>= 2.00, < 2.80';
 
recommends 'JSON::XS', '2.0';
conflicts 'JSON', '< 1.0';
 
on 'test' => sub {
      requires 'Test::More', '>= 0.96, < 2.0';
        recommends 'Test::TCP', '1.12';
};
 
on 'develop' => sub {
      recommends 'Devel::NYTProf';
};
 
feature 'sqlite', 'SQLite support' => sub {
      recommends 'DBD::SQLite';
};

About

template for perl

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.