Singleton: Difference between revisions

Content added Content deleted
mNo edit summary
Line 1,640: Line 1,640:


=={{header|Perl 6}}==
=={{header|Perl 6}}==
<lang Perl6>class Singleton {
<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.