- 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.
- or download this
package A;
use Spiffy -Base;
use strict;
field $_ for qw(id name);
sub new { bless {}, $self }
- or download this
package B;
use A -Base;
use strict;
field $_ for qw(addr phone city);
sub new { bless {}, $self }
- or download this
package C;
use A -Base;
use strict;
field $_ for qw(model type);
sub new { bless {}, $self }
- or download this
#!/usr/bin/perl
use strict;
...
'name' => 'kouxuan',
'id' => 456
}, 'B' );