NAME

MarpaX::Languages::C::AST::Util - C Translation to AST - Class method utilities

VERSION

version 0.07

DESCRIPTION

This modules implements some function utilities. This is inspired from https://kb.wisc.edu/middleware/page.php?id=4309.

SYNPOSIS

use MarpaX::Languages::C::AST::Util qw/whoami whowasi traceAndUnpack/;

my $whoami = whoami();
my $whowasi = whowasi();
callIt(0, '1', [2], {3 => 4});

sub callIt {
    my $hash = traceAndUnpack(['var1', 'var2', 'array1p', 'hash1p'], @_);
}

EXPORTS

The methods whoami(), whowasi() and traceAndUnpack() are exported on demand.

SUBROUTINES/METHODS

whoami()

Returns the name of the calling routine.

whowasi()

Returns the name of the parent's calling routine.

traceAndUnpack($nameOfArgumentsp, @arguments)

Returns a hash mapping @{$nameOfArgumentsp} to @arguments and trace it. The tracing is done using a method quite similar to Log::Any. Tracing and hash mapping stops at the end of @nameOfArguments or @arguments.

AUTHOR

Jean-Damien Durand <jeandamiendurand@free.fr>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Jean-Damien Durand.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.