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

Re: advice about animated gif.

by RMGir (Prior)
on Dec 24, 2013 at 11:16 UTC ( [id://1068305]=note: print w/replies, xml ) Need Help??


in reply to advice about animated gif.

You should definitely start your script with
use strict; use warnings;
to help you catch misnamed variables.

But the main thing that's going to help you clarify this script is a subroutine or 2.

It looks like you're doing the same work several times, just changing the angle.

Why not wrap that repeated work into a subroutine that takes the angle as an argument and returns the result of $gif->animend?

Then, your mainline will look much simpler:

$data.=buildCircle(0); $data.=buildCircle($pi/6); # ....

Mike

Log In?
Username:
Password:

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

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

    No recent polls found