On Saturday 29 April 2006 10:43 am, you 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.


as i read the doc' for Tie::Scalar, the package 'Salar' is not actually 
implemented but is only a base class for an implementation. but their is 
another package in Scalar.pm: 'StdScalar'. This - again, as i reach the 
doc' - is implemented. that is why i am trying to use it and not 'Scalar'. 
but is solved the initial problem ('Can't locate etc') by creating a separate 
file - StdScalar.pm - and then doing a 'use' on it. but when i try to tie 
is - 'tie $f,'StdScalar' - i get:

        Can't locate object method "TIESCALAR" via  package "StdScalar"
        
but TIESCALAR is defined in the code:

        sub TIESCALAR {
         my $class = shift;
         my $instance = shift || undef;
         return bless \$instance => $class;
        }

why the 'Can't locate' message?

tom arnall
north spit, ca



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to