Created
August 3, 2009 12:14
-
-
Save ryan5500/160513 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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