Data::RefSupport - Perl extension for working with xD data structures (refs)


SchemaView-Plus documentation Contained in the SchemaView-Plus distribution.

Index


Code Index:

NAME

Top

Data::RefSupport - Perl extension for working with xD data structures (refs)

SYNOPSIS

Top

	use Data::RefSupport qw/total_dereference/;

	my @xd_structure = [ [ 1, 2 ], [ 3, [ 4, 5 ] ] ];
	my @clean_array = total_dereference(@xd_structure);




DESCRIPTION

Top

Module provides some functions for good work with xD data structures (refs). E.g. total_dereference in SYNOPSIS has result

	( 1, 2, 3, 4, 5 )

FUNCTIONS

Top

total_derefererence xD

Make one array from many xD arrays arguments

	my @xd_structure = [ [ 1, 2 ], [ 3, [ 4, 5 ] ] ];
	my @clean_array = total_dereference(@xd_structure);

VERSION

Top

0.02

AUTHOR

Top

(c) 2001 Milan Sorm, sorm@pef.mendelu.cz at Faculty of Economics, Mendel University of Agriculture and Forestry in Brno, Czech Republic.

This module was needed for making SchemaView Plus (svplus).

SEE ALSO

Top

perl(1), svplus(1).


SchemaView-Plus documentation Contained in the SchemaView-Plus distribution.
package Data::RefSupport;

use strict;
use vars qw/$VERSION @ISA @EXPORT_OK/;
use Exporter;

$VERSION = '0.02';
@ISA = qw/Exporter/;
@EXPORT_OK = qw/total_dereference/;

sub total_dereference {
	my @array = @_;

	return map {
		ref $_ eq 'ARRAY' ? total_dereference(@$_) : $_
	} @array;
}

1;

__END__