diff options
Diffstat (limited to 'ext/attrs/attrs.xs')
-rw-r--r-- | ext/attrs/attrs.xs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/attrs/attrs.xs b/ext/attrs/attrs.xs index 4c00cd7cb2..4914fda8f4 100644 --- a/ext/attrs/attrs.xs +++ b/ext/attrs/attrs.xs @@ -17,14 +17,15 @@ get_flag(char *attr) MODULE = attrs PACKAGE = attrs void -import(Class, ...) -char * Class +import(...) ALIAS: unimport = 1 PREINIT: int i; CV *cv; PPCODE: + if (items < 1) + Perl_croak(aTHX_ "Usage: %s(Class, ...)", GvNAME(CvGV(cv))); if (!PL_compcv || !(cv = CvOUTSIDE(PL_compcv))) croak("can't set attributes outside a subroutine scope"); if (ckWARN(WARN_DEPRECATED)) |