Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: OO design: returning string and/or special value

by pwagyi (Monk)
on Oct 10, 2019 at 08:12 UTC ( [id://11107285]=note: print w/replies, xml ) Need Help??


in reply to OO design: returning string and/or special value

If you have a method that returns SCALAR, in this case, I assume it should also be an object. Converting that object to string format should be responsibility of that object's class. not method() that returns that SCALAR responsibility.

  • Comment on Re: OO design: returning string and/or special value

Replies are listed 'Best First'.
Re^2: OO design: returning string and/or special value
by Anonymous Monk on Oct 10, 2019 at 08:28 UTC
    Scalars should be objects because?
      Since OP does not specify anything, I'm making assumption, anything non-simple SCALAR (number/string) should be already objectified if OP is using OOD approach.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-24 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found