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

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -