Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Autoclearing all accessors in a Mouse/Moose class

by yulivee07 (Sexton)
on Jan 29, 2016 at 12:55 UTC ( [id://1153991] : perlquestion . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    \%data = { customer_number => $custno, country => $country, ticket_typ
    +e => $ticketsystem };
    $test_class = "Utils::Testclass::MyTest"->new($data);
    ...
        predicate => 'has_ticket_type',
        clearer   => 'clear_ticket_type',
    );
    
  2. or download this
    map {  $data{$_} = '' unless defined $data{$_} } keys %data;
    
  3. or download this
    has 'country' => (
        is        => 'rw',
    ...
                         }
                     }
    );