Re: 'Tie::StdScalar' - perl tells me it can't find it



tom arnall am Sonntag, 30. April 2006 01.04:
On Saturday 29 April 2006 10:43 am, Mr. Shawn H. Corey wrote:
On Sat, 2006-29-04 at 10:28 -0700, tom arnall wrote:
i'm try to use 'Tie::StdScalar' but perl tells me it can't find it.
I've pushed '/usr/share/perl/5.8.7' onto @INC. the error is:

Can't locate Tie/StdScalar.pm in @INC

in '/usr/share/perl/5.8.7/Tie/Scalar.pm' there is 'package
Tie::StdScalar' etc.

thanks,

tom arnall
north spit, ca

Is the module Tie::Scalar? See `perldoc Tie::Scalar` for details.

the main module is Tie::Scalar but within that file the StdScalar package
is defined.

No - the Tie::StdScalar package is defined therein (note the Tie:: prefix)
:-)

i dealt actually with the 'can't locate' problem by putting the
def' in a separate file: StdScalar.pm. but now i get a 'can't locate
method' error when i try to tie a variable to the package, i.e.:
[...]

use Tie::Scalar;
tie my $f,'Tie::StdScalar';

(The last two lines in the man page SYNOPSYS show tie'ing subclasses which
don't have 'Tie::' in their package name).

Dani
.



Relevant Pages