Are you working on Perl? Above code snipped will not compile in Perl 5.
bless or eval may be of interest for you. If the data structure passed in arguemnts(e.g. $employeeData) has exactly the same structure as of the underlying object of the given package, you can directly bless it. If not, you'll have to first create some rules to set the properties of object from given data structure and then "eval"
The cost of genericness may be that you know the underlying structure of package and pass the correct arguments.
In reply to Re: Help creating a function
by samarzone
in thread Help creating a function
by varghees
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |