You are viewing the version of this documentation from Perl 5.41.5. This is a development version of Perl.
class NAMESPACE
class NAMESPACE VERSION
class NAMESPACE BLOCK
class NAMESPACE VERSION BLOCK

Declares the BLOCK or the rest of the compilation unit as being in the given namespace, which implements an object class (see perlclass). This behaves similarly to package, except that the newly-created package behaves as a class.