How can you create an object of a class in a package?

Answer Posted / bhagwat gupta

--Like you do in any perl programme.

package PackageName;

use RelativePath::ModuleName;# The Class as per your questn
...
...

my $object = ModuleName->new();
...
...
1;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are scalar data and scalar variables?

639


Explain socket programming in perl?

514


What does perl do in linux?

535


How to renaming a file in perl programming?

555


Explain the functioning of conditional structures in perl.

470






What are the options that can be used to avoid logic errors in perl?

523


What is the function of cgiwrap in cgi programming?

495


Which statement has an initialization, condition check and increment expressions in its body? Write a syntax to use that statement.

551


What is qq (double q)operator in perl?

560


What does `$result = f() .. g()' really return?

573


What does redo statement do in perl?

539


What is a perl references?

524


Explain the default scope of variables in perl?

519


What are different data types that perl supports. Elaborate on them.

557


What does delete function do in perl?

523