Help for this page

Select Code to Download


  1. or download this
    package C;
    
    ...
        (Perhaps you need to 'use' the module which defines that package f
    +irst.)
     at C.pm line 5
    BEGIN failed--compilation aborted at C.pm line 5.
    
  2. or download this
    package A;
    use Spiffy -Base;
    use strict;
    field $_ for qw(id name);
    sub new { bless {}, $self }
    
  3. or download this
    package B;
    use A -Base;
    use strict;
    field $_ for qw(addr phone city);
    sub new { bless {}, $self }
    
  4. or download this
    package C; 
    use A -Base;
    use strict;
    field $_ for qw(model type);
    sub new { bless {}, $self }
    
  5. or download this
    #!/usr/bin/perl
    use strict;
    ...
      'name' => 'kouxuan',
      'id' => 456
    }, 'B' );