return $ph;
}
-sub tag {
- my $ph = shift;
- return unless $ph;
- return *$ph->{tag};
-}
-
-sub name {
- my $ph = shift;
- return unless $ph;
- return *$ph->{name};
-}
-
-sub version {
- my $ph = shift;
- return unless $ph;
- return *$ph->{version};
-}
-
-sub desc {
- my $ph = shift;
- return unless $ph;
- return *$ph->{desc};
-}
-
-sub author {
- my $ph = shift;
- return unless $ph;
- return *$ph->{author};
-}
-
-sub email {
- my $ph = shift;
- return unless $ph;
- return *$ph->{email};
-}
-
-sub url {
- my $ph = shift;
- return unless $ph;
- return *$ph->{url};
-}
-
-sub banner {
- my $ph = shift;
- return unless $ph;
- return *$ph->{banner};
-}
+eval "sub $_ { *\$_[0]->{$_} }"
+ for qw/tag name version desc author email url banner/;
sub print {
my $ph = shift;