File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ the scope of current package:
4949
5050 class NAME VERSION BLOCK
5151
52+ class NAME;
53+
54+ class NAME VERSION;
55+
5256The C<class> keyword declares a new package which is intended to be a class.
5357All other keywords from the C<class> feature should be used in scope of this
5458declaration.
@@ -57,6 +61,11 @@ declaration.
5761 # class definition goes here
5862 }
5963
64+ Classes can be declared in either block or statement syntax. If a block is
65+ used, the body of the block contains the implementation of the class. If the
66+ statement form is used, the remainder of the file is used up until the next
67+ C<class> or C<package> statement.
68+
6069C<class> and C<package> declarations are similar, but classes automatically get
6170a constructor named C<new> - You don't have to (and should not) write one.
6271Additionally, in the class BLOCK you are allowed to declare fields and methods.
You can’t perform that action at this time.
0 commit comments