-
Hi,
can some one help me out in finiding the answer for this
package Test;
sub new{
my $pkg = shift;
my $test = {'name'=>shift;};
????
return $test;
}
which of the folowingshould replace ???? in the above code to cause the function new to return an object of type Test?
a) bless $test,$pkg;
b)setType($test,Spkg);
c)object($test,$pkg);
d)object $test,pkg;
letme know the related answer and the a bit of explanation,
thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|