Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aereal
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aereal/9479077 to your computer and use it in GitHub Desktop.
Save aereal/9479077 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use cartonup;
use Plack;
package cartonize;
use strict;
use warnings;
use File::Basename qw(dirname);
sub import {
my $package_dir = dirname(__FILE__);
# stolen from Carton::CLI->cmd_exec v0.9.15
my $carton_path = $ENV{PERL_CARTON_PATH} || "$package_dir/../../local";
my $lib = "$carton_path/lib/perl5";
require lib::core::only;
require lib;
lib::core::only->import;
lib->import($lib);
}
1;
requires "Plack";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment