in reply to $class name not pass in the new()
for the stuff you say is "Non working code".Use of uninitialized value $class in concatenation (.) or string at An +imal.pl line 7. Cow goes moooo! Use of uninitialized value $class in concatenation (.) or string at An +imal.pl line 13. Horse goes neigh! Use of uninitialized value $class in concatenation (.) or string at An +imal.pl line 19. Sheep goes baaaah!
This gives a clear hint on what $class is set to when invoked that way, and why it "does not work".
All great truths begin as blasphemies.
― George Bernard Shaw, writer, Nobel laureate (1856-1950)
|
|---|