This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate with Sarathy.
[perl5.git] / perl.c
diff --git a/perl.c b/perl.c
index 387b4dd..e7a9bc2 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -2135,6 +2135,8 @@ Perl_moreswitches(pTHX_ char *s)
                    sv_catpv( sv, " ()");
                }
            } else {
+                if (s == start)
+                    Perl_croak(aTHX_ "Module name required with -M option");
                sv_catpvn(sv, start, s-start);
                sv_catpv(sv, " split(/,/,q{");
                sv_catpv(sv, ++s);