Help for this page

Select Code to Download


  1. or download this
    sub some_attribute {
      my $self = shift;
      $self->{some_attribute} = shift if @_;
      return $self->{some_attribute};
    }
    
  2. or download this
    has some_attribute => (is => 'rw');
    
  3. or download this
    {
        package Binary::Humax::HmtData;
    ...
    
    my $hmt_data = Binary::Humax::HmtData->new_from_file($path_name);
    my $field    = $hmt_data->start_time;
    
  4. or download this
    {
        package Binary::Humax::HmtData::Trait::Attribute;
    ...
    
    # Attribute introspection
    print Binary::Humax::HmtData->meta->get_attribute('start_time')->unpac
    +k, "\n";