Fatal error: Cannot redeclare get_post_data() (previously declared in /wp-content/themes/sango-theme-child/yarpp-template-thumbnail.php:3) in /wp-content/themes/sango-theme-child/yarpp-template-thumbnail.php on line 3
package Example;
use strict;
sub new {
my $self = bless({}, shift);
$self->{hoge} = shift;
$self->{piyo} = shift;
return $self;
}
sub get_hoge {
my $self = shift;
return $self->{hoge};
}
1;
子クラス
package ExampleChild;
use strict;
use parent 'Example';
sub new {
my ($class, @args) = @_;
my $self = $class->SUPER::new(shift @args, shift @args);
$self->{fuga} = shift @args;
return $self;
}
1;