BEGIN { $::RD_AUTOACTION = q { bless [@item[1..$#item]], 'Config::Yacp::Deparse::'.$item[0] }; } #### my $tree = Config::Yapc->new('test.ini', $parser->file($text)); my $deparsed = $tree->deparse; #### $VAR1 = bless({ text => bless ([ bless ([ bless ([ '[', 'value1', ']' ], 'Config::Yapc::Deparse::header'), [ bless ([ bless ([ 'key1', '=', 'value1' ], 'Config::Yapc::Deparse::pair') ], 'Config::Yapc::Deparse::assign'), bless ([ bless ([ 'key2', '=', 'value2' ], 'Config::Yapc::Deparse::pair'), bless ([ ';', 'comment2' ], 'Config::Yapc::Deparse::comment'), ], 'Config::Yapc::Deparse::assign'), bless ([ bless ([ 'key3', '=', 'value3' ], 'Config::Yapc::Deparse::pair') ], 'Config::Yapc::Deparse::assign') ] ], 'Config::Yapc::Deparse::section'), bless ([ bless ([ '[', 'value1', ']' ], 'Config::Yapc::Deparse::header'), [ bless ([ bless ([ 'key4', '=', 'value4' ], 'Config::Yapc::Deparse::pair') ], 'Config::Yapc::Deparse::assign'), bless ([ bless ([ 'key5', '=', 'value5' ], 'Config::Yapc::Deparse::pair') ], 'Config::Yapc::Deparse::assign'), bless ([ bless ([ 'key6', '=', 'value6' ], 'Config::Yapc::Deparse::pair'), bless ([ ';', 'comment6' ], 'Config::Yapc::Deparse::comment'), ], 'Config::Yapc::Deparse::assign') ] ], 'Config::Yapc::Deparse::section') ], 'Config::Yapc::Deparse::file'), name => 'text.ini' }, 'Config::Yacp' ); #### sub Config::Yacp::Deparse::file::deparse { ... } sub Config::Yacp::Deparse::section::deparse { ... } etc...