Hello,

I am having a bit of a problem.... I wrote a perl script that generates a report in excel. I am using cygwin perl.
I made two batch files one calls perl directly and the other calls a makefile that calls perl.

Admin: make and batch work perfectly
Power User: make and batch work perfectly
User: batch work fine, but when i use the makefile i get this error:
"Can't call method "SaveAs" on an undefined value at Y:/In/FileReport.pl line 183."

and make: *** [fun] error 9

Because of security reasons I am "forced" to get it to work on basic user rights.

I have also done some sort of fault tree analisis and it would come to some possibilities :

1. Restricted acces to excel services (over-ruled because batch still works)
2. Make environment somehow incompatible with basic user rights security policies (50% over-ruled because other makefiles still work under basic user rights)
3. Perl version now adequate for this such situation (20% over-ruled because it does work along with upscaling the user rights)

Can someone give me a hand with this, I am not an expert in these environments

Do you understand what the error means?

"Can't call method "SaveAs" on an undefined value at Y:/In/FileReport.pl line 183."

You have created an object in the perl script at some point that did not return a true value, something like:

my $object = FOO->new;

then you are trying to use a method of $object:

my $something = $object->SaveAs();

but because $object was never initialized you can't call any of its methods. You need to find out why the object is not being created properly.

Do you understand what the error means?

"Can't call method "SaveAs" on an undefined value at Y:/In/FileReport.pl line 183."

You have created an object in the perl script at some point that did not return a true value, something like:
[...]

Thanks for your reply, actually I do understand what the error means, but it makes no sense to me why this error occur under basic user rights when called with make. Also if I am calling perl from a batch file under basic user rights it works fine.

Thank you for the tip, I did that.

Does anyone else have an ideea?

Ok, I have an update, I've done some tests on different computers, that had same windows xp on all of them and with basic user rights on 3 computers worked and on the other 4 didn't. I checked just about everything. the only thing thing I didn't do is to run a folder compare on the hard drives :|

This article has been dead for over six months. Start a new discussion instead.