Skip to content

Instantly share code, notes, and snippets.

@perlDreamer
Created May 31, 2010 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perlDreamer/420020 to your computer and use it in GitHub Desktop.
Save perlDreamer/420020 to your computer and use it in GitHub Desktop.
It should be used like this:
my $productIterator = WebGUI::Asset::Product->getIsa($session);
ASSET: while (1) {
my $product = eval { $productIterator->() };
if (my $e = Exception::Class->caught()) {
$session->log->error($@);
next ASSET;
}
last ASSET unless $product;
##Do something useful with $product
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment