% if ( $object->id ) {
% } else {
Ввод тегов возможен только после сохранения документа
% } <%once> use Data::Recursive::Encode; use JSON::XS; my $json = JSON::XS->new->utf8; <%args> $object $name => undef $check => undef $prop => {} <%init> my @tags; if ( $object->id ) { @tags = $keeper->get_documents( class => 'tag::Tag', lclass => 'tag::Cloud', ldest => $object->id, ldestclass => $object->class, ); } my $value; unless ( $prop->{virtual} ) { if ( ref $object->$name ) { $value = $object->$name; } elsif ( $object->$name ) { $value = Data::Recursive::Encode->encode_utf8( $json->decode( $object->$name ) ); } }