checks for an undefined I<scalar> value. If you want to see if the hash
is empty, just use C<if (%hash) { # not empty }> for example.
+=item %s defines neither package nor VERSION--version check failed
+
+(F) You said something like "use Module 42" but in the Module file
+there are neither package declarations nor a C<$VERSION>.
+
=item Delimiter for here document is too long
(F) In a here document construct like C<<<FOO>, the label C<FOO> is too
See Server error.
+=item %s does not define %s::VERSION--version check failed
+
+(F) You said something like "use Module 42" but the Module did not
+define a C<$VERSION.>
+
=item Don't know how to handle magic of type '%s'
(P) The internal handling of magical variables has been cursed.
STRLEN len;
SV *req = ST(1);
- if (undef)
- Perl_croak(aTHX_ "%s does not define $%s::VERSION--version check failed",
- HvNAME(pkg), HvNAME(pkg));
-
+ if (undef) {
+ if (pkg)
+ Perl_croak(aTHX_
+ "%s does not define $%s::VERSION--version check failed",
+ HvNAME(pkg), HvNAME(pkg));
+ else {
+ char *str = SvPVx(ST(0), len);
+
+ Perl_croak(aTHX_
+ "%s defines neither package nor VERSION--version check failed", str);
+ }
+ }
if (!SvNIOK(sv) && SvPOK(sv)) {
char *str = SvPVx(sv,len);
while (len) {