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

How to turn on Perl warnings? Why is that important?

570


Explain the different types of data perl can handle.

489


How to determine strings length in perl?

525


What is the use of '>>' in perl?

532


How to prevent file truncation in perl?

492






What $! In perl?

519


Explain 'grep' function.

531


List all the features of perl programming?

503


Explain the arguments for perl interpreter.

519


how to extract pin_code,phone_number,year from text file using regular expressions in perl

1841


What does localtime() do in perl?

559


What is the difference between single (') and double (") quote in a string in perl?

477


What are prefix dereferencer? List them.

555


Explain tk?

511


How can I implement the function overloading in Perl ? I read about the operator overloading, I do not know how to implement the function overloading. Thanks in advance ?

2492