Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Safe / @ISA Problem

by dragonchild (Archbishop)
on Mar 18, 2002 at 14:07 UTC ( #152476=note: print w/replies, xml ) Need Help??


in reply to Safe / @ISA Problem

I cut'n'pasted your code, added a print within A::new(), and ran it. It ran just fine for me. *shrugs* Maybe it's your system/setup?

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Replies are listed 'Best First'.
Re: Re: Safe / @ISA Problem
by rdw (Curate) on Mar 19, 2002 at 17:35 UTC

    Ok, that works for me as well if I add a print just after the bless inside A::new - but that's no use - because now A::new doesn't work any more (it returns '1', not a blessed reference).

    Have fun,

    rdw

      Try having a return $self; as the last line in the function instead of depending on an explicit return. *wink*

      ------
      We are the carpenters and bricklayers of the Information Age.

      Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

        And then the problem re-appears - the print has nothing to do with it - it works if you put a print in instead of bless as the last thing in A::new, because then the code does something completely different.

        Anyway, never mind - I've worked out what's going on now - I'll reply higher up.

        Have fun,

        rdw

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://152476]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (1)
As of 2023-03-30 04:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (73 votes). Check out past polls.

    Notices?