Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prevent using names of existing modules as application name for dance…

…r script.
  • Loading branch information...
commit 1e4908f9a67b35386b42a3663f70e95eeab592d2 1 parent 94d2cc7
@racke racke authored yanick committed
Showing with 3 additions and 0 deletions.
  1. +3 −0  script/dancer
View
3  script/dancer
@@ -77,6 +77,9 @@ NOYAML
sub validate_app_name {
my $name = shift;
+ die "$name is an already existing module, please pick a different name for your application.\n"
+ if grep { -f join '/', $_, $name . '.pm' } @INC;
+
return unless $name =~ /[^\w:]/
or $name =~ /^\d/
or $name =~ /\b:\b|:{3,}/;
Please sign in to comment.
Something went wrong with that request. Please try again.