Howdy List!
Quick question about Packages and an Error Variable.
I have a little package I made and can do;
use MyGoodies;
and can export the $MyGoodies::Error from it as well as a function.
What I'm trying to figure out is the best way to have a function return 0 on failure
and set the
Howdy List!
Quick question about Packages and an Error Variable.
I have a little package I made and can do;
use MyGoodies;
and can export the $MyGoodies::Error from it as well as a function.
What I'm trying to figure out is the best way to have a
function return 0 on failure
Message -
From: Dan Muey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 12:58 AM
Subject: Error Variable in Package
Howdy List!
Quick question about Packages and an Error Variable.
I have a little package I made and can do;
use MyGoodies;
and can export the $MyGoodies
Thanks for the reply!
Sorry I don't understand your question well, but from
overall, I guess that's all about what you want...
I'll try to make it simpler, I have a tendency to ramble!
I've seen packages that have a variable like $Package::Error or $Package::errstr
I want a funtion
On Jul 28, Dan Muey said:
What I'm trying to figure out is the best way to have a function return 0
on failure and set the Error Variable for me to use.
package MyGoodies;
...
my $MyGoodies::Error; # declare the variable in the package and Export it and
function().
Dan Muey wrote:
Thanks for the reply!
Sorry I don't understand your question well, but from
overall, I guess that's all about what you want...
I'll try to make it simpler, I have a tendency to ramble!
I've seen packages that have a variable like $Package::Error or
$Package::errstr
No. You should't export it. Exporting means making an
alias to the variable in the package that issues the use.
If you refer to the variable as $Package::Error, you don't
need to export it. If you export it, you would refer to it as
simply $Error. But that might interfere with the main