Perl + object-oriented programming help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl + object-oriented programming help
# 1  
Old 10-23-2008
Perl + object-oriented programming help

Currently Im trying to write a program that manipulates a class-based object as part of its functionality. However, the perl compiler is complaining that the class's respective package is not returning a true value.

I have done the following

a) Created a new package containing the body of the class (the constructor, its variables etc...)

b) Defined a new{} method within the package to ensure valid object creation

b) In my .pl program I have referenced the class package through the use keyword

From my understanding these are necessary to ensure you can properly create and use objects

So Im not sure what I could possibly doing wrong
# 2  
Old 10-23-2008
Post the code please.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

How to initialize an object with another object of different class?

How to initialize an object of class say "A", with an object of type say "B". The following code give the error message "error: conversion from âAâ to non-scalar type âBâ requested" #include <iostream> using namespace std; class B; class A{ public: A() { cout <<"\nA()" << endl; } ... (1 Reply)
Discussion started by: techmonk
1 Replies

2. Shell Programming and Scripting

perl - return an object from subroutine - Net::LDAP

Hi all, I'm not even sure a person can do this in perl, seems like you should be able to though. Here's the error IO::Socket::INET: connect: Operation now in progress at server_search.pl line 256, <DATA> line 466. Here's the perl code... sub ldap_new{ $nl = Net::LDAP->new( "$_" ) or... (3 Replies)
Discussion started by: jtollefson
3 Replies

3. Shell Programming and Scripting

How to use JavaScript in Perl Object Oriented

i am new to Perl CGI Object oriented. I want to use some java script in my Perl CGI but i am not able to do that. I am using Submit button then via param() i am getting all field parameters. But i want to validate all fields first then i want to move. But Use of Java script, i don't know (1 Reply)
Discussion started by: Navrattan Bansa
1 Replies

4. Shell Programming and Scripting

perl programming

how to link the linux files in perl on the local webpage ???? suppose we have some results and want to get them published on the local webpage of our internal site. how this can be done using HTML and perl together , so that the results are published directly on the webpage. thanks kullu (0 Replies)
Discussion started by: kullu
0 Replies

5. Programming

Help me with perl programming

Hi, i am very beginer to perl, I am reading one xml file and i am creating hash table for that file. i written code like this #!/usr/bin/perl use warnings; use strict; use XML::LibXML::Reader; #Reading XML with a pull parser my $file; open( $file, 'formal.xml'); my $reader =... (8 Replies)
Discussion started by: veerubiji
8 Replies

6. Programming

Programming help - Perl !

I am having a text file with Vivek 50 Ram 34 Hulk 45 Vivek 23 Ram 23 Vivek 55 Now I need a perl script to display the fields of 1st column & the 2nd column with summation (& avoid the duplicates). Vivek 128 Ram 57 hulk 45 Plz help me... (1 Reply)
Discussion started by: gameboy87
1 Replies

7. UNIX for Dummies Questions & Answers

Object reference not set to an instance of an object

I am new to PHP and UNIX. I am using Apache to do my testing on a Windows Vista machine. I am getting this error when I am trying to connect to a web service. I did a search and did not see any posts that pertain to this. Here is my function: <?php function TRECSend($a, $b, $c, $d,... (0 Replies)
Discussion started by: EddiRae
0 Replies

8. Programming

Open source my OIOIC, a completely new object-oriented mechanism for the C.

OIOIC is a completely new object-oriented mechanism for the C programming language. Please download the "OIOIC-Primer-2nd-Edition-English.tar.gz". (the English version of << OIOIC Primer >> ) http://code.google.com/p/oioic/downloads/list Welcome your advice! Using OIOIC, you can describe... (7 Replies)
Discussion started by: pervise.zhao
7 Replies

9. UNIX for Dummies Questions & Answers

PERL - DB programming

Hi friends, What are the possible ways to connect to DB2 database from Perl (on unix). I need to connect to DB2 and get records for further processing. Can you please suggest the best possible way. I heard about DBI/DBD, if you have some sample scripts please post them too. Thanks in advance. (3 Replies)
Discussion started by: satguyz
3 Replies
Login or Register to Ask a Question