Changeset 23456
- Timestamp:
- Mar 20, 2009, 10:46:27 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
r23185 r23456 388 388 } 389 389 390 return 1if defined $self->{nebulous}; # Already started390 return $self->{nebulous} if defined $self->{nebulous}; # Already started 391 391 392 392 my $server = metadataLookupStr( $self->{_siteConfig}, 'NEB_SERVER' ); # Nebulous server … … 404 404 $self->{nebulous} = $neb; 405 405 406 return 1; 406 return $neb; 407 } 408 409 sub nebulous 410 { 411 my $self = shift; 412 carp "no parameters are allowed" if @_; 413 414 # check to see if we already have a live nebulous object 415 return $self->{nebulous} if defined $self->{nebulous}; 416 417 # if not, call _neb_start() and return the new object 418 return _neb_start(); 407 419 } 408 420 … … 421 433 422 434 if ($scheme eq 'neb') { 423 $self->_neb_start() or ( carp "Can't start Nebulous" and return undef ); 424 my $neb = $self->{nebulous}; # Nebulous handle 435 my $neb = $self->nebulous; # Nebulous handle 425 436 if ($create_if_doesnt_exist) { 426 437 my $status = eval { $neb->stat( $name ); }; … … 485 496 $scheme = lc($scheme); 486 497 if ($scheme eq 'neb') { 487 $self->_neb_start() or ( carp "Unable to start Nebulous" and return undef ); 488 my $fh = eval { $self->{nebulous}->open_create( $name ); }; 498 my $fh = eval { $self->nebulous->open_create( $name ); }; 489 499 if ($@ or not defined $fh) { 490 500 carp "Unable to open/create Nebulous handle $name"; … … 524 534 $scheme = lc($scheme); 525 535 if ($scheme eq 'neb') { 526 $self->_neb_start() or ( carp "Unable to start Nebulous" and return undef ); 527 my $fh = eval { $self->{nebulous}->open_create( $name ) }; 536 my $fh = eval { $self->nebulous->open_create( $name ) }; 528 537 if ($@ or not defined $fh) { 529 538 carp "Unable to open/create Nebulous handle $name"; … … 556 565 my $scheme = file_scheme($name); # The scheme, e.g., file://, path:// 557 566 if (defined $scheme and lc($scheme) eq 'neb') { 558 $self->_neb_start() or ( carp "Unable to start Nebulous" and return undef ); 559 $name = eval { $self->{nebulous}->create( $name ) }; 567 $name = eval { $self->nebulous->create( $name ) }; 560 568 if ($@ or not defined $name) { 561 569 carp "Unable to create Nebulous handle $name"; … … 575 583 my $scheme = file_scheme($name); # The scheme, e.g., file://, path:// 576 584 if (defined $scheme and lc($scheme) eq 'neb') { 577 $self->_neb_start() or ( carp "Unable to start Nebulous" and return undef ); 578 my $found = eval { $self->{nebulous}->find_instances( $name ); }; 585 my $found = eval { $self->nebulous->find_instances( $name ); }; 579 586 ( carp "Unable to find instances of Nebulous handle $name" and return undef ) if $@; 580 587 return (defined $found ? 1 : 0); … … 595 602 my $scheme = file_scheme($target); # The scheme, e.g., file://, path:// 596 603 if (defined $scheme and lc($scheme) eq 'neb') { 597 $self->_neb_start() or ( carp "Unable to start Nebulous" and return undef ); 598 $target = eval { $self->{nebulous}->create( $target ); }; 604 $target = eval { $self->nebulous->create( $target ); }; 599 605 if ($@ or not defined $target) { 600 606 carp "Unable to create Nebulous handle"; … … 646 652 my $scheme = file_scheme($name); # The scheme, e.g., file://, path:// 647 653 if (defined $scheme and lc($scheme) eq 'neb') { 648 $self->_neb_start() or ( carp "Unable to start Nebulous" and return undef ); 649 $status = eval { $self->{nebulous}->delete( $name ); }; 654 $status = eval { $self->nebulous->delete( $name ); }; 650 655 ( carp "Unable to delete Nebulous handle $name" and return undef ) if $@; 651 656 } else {
Note:
See TracChangeset
for help on using the changeset viewer.
