diff --git a/pod/perldiag.pod b/pod/perldiag.pod index b05554939e..6f55f15417 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -4741,6 +4741,14 @@ regardless of what name the caller used. (W overload) The call to overload::constant contained an odd number of arguments. The arguments should come in pairs. +=item Odd number of arguments passed to "%s" constructor + +(S) The constructor for the given class was called with an odd +number of arguments. + +Class constructors accept named arguments as a list and expect pairs +of name followed by value as if you were initialising a hash. + =item Odd number of elements in anonymous hash (W misc) You specified an odd number of elements to initialize a hash, @@ -7320,6 +7328,11 @@ whereabouts in the regular expression the escape was discovered. (F) You attempted to add a named attribute to a C definition, but perl does not recognise the name of the requested attribute. +=item Unrecognised parameters for "%s" constructor: %s + +(F) You called new on a class but supplied a parameter name that +didn't match a class field name. + =item Unrecognized signal name "%s" (F) You specified a signal name to the kill() function that was not diff --git a/t/porting/diag.t b/t/porting/diag.t index 4f47bb690f..dbc86470ff 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -243,6 +243,7 @@ my $specialformats_re = qr/%$format_modifiers"\s*($specialformats)(\s*(?:"|\z))? # We skip the bodies of most XS functions, but not within these files my @include_xs_files = ( "builtin.c", + "class.c", "universal.c", );