# Make sure $img doesn't get released. # Only define new object the first time around. state $img; if (! defined $img) { $img = $MW->Photo(); }