Skip to content

Instantly share code, notes, and snippets.

@berekuk
Created June 29, 2011 19:31
Show Gist options
  • Select an option

  • Save berekuk/1054698 to your computer and use it in GitHub Desktop.

Select an option

Save berekuk/1054698 to your computer and use it in GitHub Desktop.
package Role::RO;
use Moose::Role;
has 'read_only' => (
is => 'ro',
isa => 'Bool',
);
package Role::RO::Auto;
use Moose::Role;
with 'Role::RO';
has '+read_only' => (
default => sub {
... # set read_only based on current euid
},
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment