How do I test for an array? I have written a module that gets and sets characteristics of an object, and I am using another module called Test::More to test my module. Two of my methods return arrays. One is a simple array of integers. The other is an array of objects.
Using methods/functions from Test::More, how can I test to see whether or not the returned values are arrays? I currently have this: # set the librarian's term ids; how do I test for this? $librarian->term_ids(3, 614, 601); is(ref($librarian->term_ids), 'ARRAY', 'set term_ids()'); But since the returned value is NOT a reference this always fails. How can I check to see whether or not $librarian->terms points to an array? Is there some Perl function that tells me what sort of data type a variable defines? -- Eric "Feeling Rather Embarrassed" Morgan