Skip Menu |

This queue is for tickets about the Object-Tiny CPAN distribution.

Report information
The Basics
Id: 39123
Status: new
Priority: 0/
Queue: Object-Tiny

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.06
Fixed in: (no value)



Subject: Silently throws out arguments to accessors.
Object::Tiny's accessors are read-only, but they silently throw out arguments. $ perl -wle 'package Foo; use Object::Tiny qw(bar baz); package main; $obj = Foo->new(bar => 23); $obj->bar(42); print $obj->bar' 23 Since immutable objects are not the norm in Perl, people aren't going to expect it and go ahead and try to set anyway. The lack of a warning or error will make the resulting bug hard to track down.