oop - Perl how to create a two-way mapping with Moose object -
below object attributes forumid, title, childforum
bless( { 'title' => 'usa', 'childforum' => [ bless( { 'forumid' => '163399', 'title' => 'washington' }, 'lib::main' ) ], 'forumid' => '162903', }, 'lib::main' )
now want convert above object other attribute names same values below ('forum_name' in place of 'title', 'forum_id' in place of 'forumid', 'child' in place of 'childforum'):
bless( { 'forum_name' => 'usa', 'child' => [ bless( { 'forum_id' => '163399', 'forum_name' => 'washington' }, 'lib::main' ) 'forum_id' => '162903', }, 'lib::main' )
i want create two-way mapping take names/types , convert them new names , types.
please create this. thanks!
Comments
Post a Comment