Skip to content

Instantly share code, notes, and snippets.

@ryan5500
Created August 3, 2009 12:14
Show Gist options
  • Save ryan5500/160513 to your computer and use it in GitHub Desktop.
Save ryan5500/160513 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use warnings;
use strict;
#make module name directory
if (!$ARGV[0]) {
die "given no module name";
}
my $module_name = $ARGV[0];
my $permissions = "0755";
mkdir $module_name, oct($permissions);
#make 'test', 'lib' directory
chdir $module_name;
my $name = "test";
mkdir $name, oct($permissions);
$name = "lib";
mkdir $name, oct($permissions);
#make Makefile.PL
unless(open MAKEFILE, ">>Makefile.PL") {
die "Cannot create logfile: $!";
}
print MAKEFILE "";
close MAKEFILE;
print 'successfully created ' . $ARGV[0] . ' cpan directory \n';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment