'Do the copying.'

def func(self):

    caller = self.caller
    if (not self.rhs):
        string = 'Usage:\n                                                @cpattr[/switch]    <obj>/<attr>    =    <obj1>/<attr1>    [,<obj2>/<attr2>,<obj3>/<attr3>,...]\n                                                @cpattr[/switch]    <obj>/<attr>    =    <obj1>    [,<obj2>,<obj3>,...]\n                                                @cpattr[/switch]    <attr>    =    <obj1>/<attr1>    [,<obj2>/<attr2>,<obj3>/<attr3>,...]\n                                                @cpattr[/switch]    <attr>    =    <obj1>[,<obj2>,<obj3>,...]'
        caller.msg(string)
        return
    lhs_objattr = self.lhs_objattr
    to_objs = self.rhs_objattr
    from_obj_name = lhs_objattr[0]['name']
    from_obj_attrs = lhs_objattr[0]['attrs']
    if (not from_obj_attrs):
        from_obj_attrs = [from_obj_name]
        from_obj = self.caller
    else:
        from_obj = caller.search(from_obj_name)
    if ((not from_obj) or (not to_objs)):
        caller.msg('You    have    to    supply    both    source    object    and    target(s).')
        return
    if ('move' in self.switches):
        clear = True
    else:
        clear = False
    if (not self.check_from_attr(from_obj, from_obj_attrs[0], clear=clear)):
        return
    for attr in from_obj_attrs:
        if (not self.check_has_attr(from_obj, attr)):
            return
    if ((len(from_obj_attrs) != len(set(from_obj_attrs))) and clear):
        self.caller.msg('|RCannot    have    duplicate    source    names    when    moving!')
        return
    result = []
    for to_obj in to_objs:
        to_obj_name = to_obj['name']
        to_obj_attrs = to_obj['attrs']
        to_obj = caller.search(to_obj_name)
        if (not to_obj):
            result.append(("\nCould    not    find    object    '%s'" % to_obj_name))
            continue
        for (inum, from_attr) in enumerate(from_obj_attrs):
            try:
                to_attr = to_obj_attrs[inum]
            except IndexError:
                to_attr = from_attr
            if (not self.check_to_attr(to_obj, to_attr)):
                continue
            value = self.get_attr(from_obj, from_attr)
            to_obj.attributes.add(to_attr, value)
            if (clear and (not ((from_obj == to_obj) and (from_attr == to_attr)))):
                from_obj.attributes.remove(from_attr)
                result.append(('\nMoved    %s.%s    ->    %s.%s.    (value:    %s)' % (from_obj.name, from_attr, to_obj_name, to_attr, repr(value))))
            else:
                result.append(('\nCopied    %s.%s    ->    %s.%s.    (value:    %s)' % (from_obj.name, from_attr, to_obj_name, to_attr, repr(value))))
    caller.msg(''.join(result))
