Revision 3 (by ahitrov@rambler.ru, 2010/03/24 15:19:32) The CORE
<%DOC>

	���������� �������� ������ � ���������� ��� � �����������

</%DOC>
<%ARGS>

	$doc

</%ARGS>
<%INIT>

	return  unless ref($doc);

	my @properties = $doc->structure();
	my $binaries = {};
        for (0..$#properties)
	{
		my $prop = $properties[$_];
		my $name = $prop->{attr};
		if ($prop->{type} eq 'multimedia') {
			my $BINARY = undef;
			if (length($doc->{ $name }) > 8)
			{
				$BINARY = eval ('use vars qw($VAR1); '.$doc->{ $name });
				if (ref($BINARY) ne 'HASH') {  $BINARY = {} };
			}
			$binaries->{$name} = $BINARY;
		}
	}
        return $binaries;

</%INIT>