Created
May 31, 2010 17:05
-
-
Save perlDreamer/420020 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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