| 1 | |||
| 2 | package Xmldoom::Definition::Property::PlaceHolder; | ||
| 3 | use base qw(Xmldoom::Definition::Property); | ||
| 4 | |||
| 5 | use strict; | ||
| 6 | |||
| 7 | use Data::Dumper; | ||
| 8 | |||
| 9 | sub new | ||
| 10 | { | ||
| 11 | my $class = shift; | ||
| 12 | my $args = shift; | ||
| 13 | |||
| 14 | my $parent; | ||
| 15 | my $prop_name; | ||
| 16 | |||
| 17 | if ( ref($args) eq 'HASH' ) | ||
| 18 | { | ||
| 19 | $parent = $args->{parent}; | ||
| 20 | $prop_name = $args->{name}; | ||
| 21 | } | ||
| 22 | else | ||
| 23 | { | ||
| 24 | $parent = $args; | ||
| 25 | $prop_name = shift; | ||
| 26 | |||
| 27 | # if you don't know, then there is no need to know. | ||
| 28 | $args = { | ||
| 29 | parent => $parent, | ||
| 30 | name => $prop_name, | ||
| 31 | }; | ||
| 32 | } | ||
| 33 | |||
| 34 | my $self = $class->SUPER::new( $args ); | ||
| 35 | $self->{prop_args} = $args; | ||
| 36 | |||
| 37 | bless $self, $class; | ||
| 38 | return $self; | ||
| 39 | } | ||
| 40 | |||
| 41 | sub get_prop_args { return shift->{prop_args}; } | ||
| 42 | |||
| 43 | sub get_data_type | ||
| 44 | { | ||
| 45 | return { type => 'custom' }; | ||
| 46 | } | ||
| 47 | |||
| 48 | 1; | ||
| 49 |