Skip to content

Instantly share code, notes, and snippets.

@autarch
Created June 20, 2013 20:42
Show Gist options
  • Save autarch/5826455 to your computer and use it in GitHub Desktop.
Save autarch/5826455 to your computer and use it in GitHub Desktop.
has foo => (
is => 'ro',
lazy => 1,
default => sub { $_[0]->_foo_bar->[0] },
);
has bar => (
is => 'ro',
lazy => 1,
default => sub { $_[0]->_foo_bar->[1] },
);
has _foobar => (
is => 'ro',
lazy => 1,
default => sub { ...; return [ $foo, $bar ] },
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment