However reading online this is different from the stuff I had and the code doesn't print out anything when running and testing it. From what I gathered it's supposed to print "I am a duck" but it does nothing at all. The code you posted here is not supposed to print anything, it makes no animal objects, it invokes no methods on those objects Duck->new->speak Animal->new->speak
Your class Duck inherits from Animal a Duck is a type of animal Patka je vrsta Životinje Patka nasljeđuje od Životinja http://translate.google.com/translate?sl=auto&tl=hr&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fperldoc.perl.org%2Fperlobj.html&edit-text=&act=url, perlobj
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|