Guest User

Untitled

a guest
May 26th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. It should be used like this:
  2.  
  3. my $productIterator = WebGUI::Asset::Product->getIsa($session);
  4. ASSET: while (1) {
  5. my $product = eval { $productIterator->() };
  6. if (my $e = Exception::Class->caught()) {
  7. $session->log->error($@);
  8. next ASSET;
  9. }
  10. last ASSET unless $product;
  11. ##Do something useful with $product
  12. }
Add Comment
Please, Sign In to add comment