Make your Moo-based object constructors blow up on unknown attributes

Edit Package perl-MooX-StrictConstructor
https://metacpan.org/release/MooX-StrictConstructor

Simply loading this module makes your constructors "strict". If your constructor is called with an attribute init argument that your class does not declare, then it dies. This is a great way to catch small typos. Your application can use Carp::Always to generate stack traces on 'die'. Previously all exceptions contained traces, but this could potentially leak sensitive information, e.g. My::Sensitive::Class->new( password => , extra_value => 'foo' );

Refresh
Refresh
Source Files
Filename Size Changed
MooX-StrictConstructor-0.011.tar.gz 0000014954 14.6 KB
cpanspec.yml 0000000547 547 Bytes
perl-MooX-StrictConstructor.changes 0000002582 2.52 KB
perl-MooX-StrictConstructor.spec 0000002533 2.47 KB
Revision 5 (latest revision is 6)
Lars Vogdt's avatar Lars Vogdt (lrupp) accepted request 783767 from Tina Müller's avatar Tina Müller (tinita) (revision 5)
- updated to 0.011
   see /usr/share/doc/packages/perl-MooX-StrictConstructor/Changes
  0.011     2020-03-10 09:38:39-07:00 America/Los_Angeles
  
          - Switched from Carp::confess to die in order to avoid leaking
            sensitive data via stack traces. The previous behavior can be
            enabled in an application by using Carp::Always.  Thanks
            @jrubinator!
Comments 0
openSUSE Build Service is sponsored by