diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 7a8173508962..20ab2548abb4 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -27,6 +27,34 @@ here, but most should go in the L section. [ List each enhancement as a =head2 entry ] +=head2 New C Feature + +A new B syntax is now available for defining object classes, +where per-instance data is stored in "field" variables that behave like +lexicals. + + use feature 'class'; + + class Point + { + field $x; + field $y; + + method zero { $x = $y = 0; } + } + +This is described in more detail in L. Notes on the internals of +its implementation and other related details can be found in L. + +This remains a new and experimental feature, and is very much still under +development. It will be the subject of much further addition, refinement and +alteration in future releases. As it is experimental, it yields warnings in +the C category. These can be silenced by a +C statement. + + use feature 'class'; + no warnings 'experimental::class'; + =head1 Security XXX Any security-related notices go here. In particular, any security