1334 links
  • linx
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
  • ► Play Videos
Links per page: 20 50 100
page 1 / 1
1 results tagged new-operator x
  • thumbnail
    How can I prevent Perl Moose Read-Only Attributes being set upon a call to new? - Stack Overflow

    Use the init_arg attribute configuration (see "Constructor parameters" in Moose::Manual::Attributes):

    package SOD::KuuAnalyze::ProdId;
    use Moose;
    
    has 'users' => (
        isa => 'ArrayRef[Str]', is => "ro",
        init_arg => undef,    # do not allow in constructor
    );
    1;
    February 3, 2022 at 9:58:55 AM UTC - permalink -
    QRCode
    - https://stackoverflow.com/questions/1814046/how-can-i-prevent-perl-moose-read-only-attributes-being-set-upon-a-call-to-new
    attributes moose new-operator perl privacy
Links per page: 20 50 100
page 1 / 1
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation