Singleton: Difference between revisions
Content added Content deleted
mNo edit summary |
Thundergnat (talk | contribs) (→{{header|Perl 6}}: fix markup) |
||
Line 1,640: | Line 1,640: | ||
=={{header|Perl 6}}== |
=={{header|Perl 6}}== |
||
<lang |
<lang perl6>class Singleton { |
||
# We create a lexical variable in the class block that holds our single instance. |
# We create a lexical variable in the class block that holds our single instance. |
||
my Singleton $instance = Singleton.bless; # You can add initialization arguments here. |
my Singleton $instance = Singleton.bless; # You can add initialization arguments here. |