Apache-Sling

 view release on metacpan or  search on metacpan

lib/Apache/Sling/LDAPSynch.pm  view on Meta::CPAN

    my $synch_cache;
    my $success = eval ${ $class->{'Content'} }->{'Message'};
    if ( !defined $success ) {
        croak q{Error parsing synchronized cache dump.};
    }
    return $synch_cache;
}

#}}}

#{{{sub update_synch_cache

sub update_synch_cache {
    my ( $class, $synch_cache ) = @_;
    my ( $tmp_cache_file_handle, $tmp_cache_file_name ) =
      File::Temp::tempfile();
    print {$tmp_cache_file_handle}
      Data::Dumper->Dump( [$synch_cache], [qw( synch_cache )] )
      or croak q(Unable to print data dump of synch cache to file!);
    close $tmp_cache_file_handle
      or croak
      q(Problem closing temporary file handle when updating synch cache);
    ${ $class->{'Content'} }

lib/Apache/Sling/UserUtil.pm  view on Meta::CPAN


#{{{sub exists_eval

sub exists_eval {
    my ($res) = @_;
    return ( ${$res}->code eq '200' );
}

#}}}

#{{{sub update_setup

sub update_setup {
    my ( $base_url, $act_on_user, $properties ) = @_;
    if ( !defined $base_url ) {
        croak 'No base url defined to update against!';
    }
    if ( !defined $act_on_user ) { croak 'No user name defined to update!'; }
    my $property_post_vars =
      Apache::Sling::URL::properties_array_to_string($properties);
    my $post_variables = '$post_variables = [';
    if ( $property_post_vars ne q{} ) {
        $post_variables .= "$property_post_vars";
    }
    $post_variables .= ']';
    return
"post $base_url/system/userManager/user/$act_on_user.update.html $post_variables";
}

#}}}

#{{{sub update_eval

sub update_eval {
    my ($res) = @_;
    return ( ${$res}->code eq '200' );
}

#}}}

1;

__END__

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.485 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )