CGI-Kwiki

 view release on metacpan or  search on metacpan

lib/CGI/Kwiki/Backup/Rcs.pm  view on Meta::CPAN

    RCS_DIR . '/' . $self->escape($page_id) . ',v';
}

my $user_name = '';
sub new {
    my ($class) = shift;
    my $self = $class->SUPER::new(@_);
    unless (-d RCS_DIR) {
        mkdir RCS_DIR;
        umask 0000;
        chmod 0777, RCS_DIR;
        $user_name = 'kwiki-install';
        for my $page_id ($self->database->pages) {
            $self->commit($page_id);
        }
    }
    return $self;
}
    
sub commit {
    my ($self, $page_id) = @_;

lib/CGI/Kwiki/Backup/SVN.pm  view on Meta::CPAN

my $user_name = '';
sub new {
    my ($class) = shift;
    my $self = $class->SUPER::new(@_);

    return $self if $class ne __PACKAGE__;
    return $self if -d SVN_DIR;

    $self->shell("$svnadmin create " . SVN_DIR);
    umask 0000;
    chmod 0777, SVN_DIR;
    my $url = File::Spec->rel2abs( SVN_DIR );
    $url =~ s{\\}{/}g;
    $url =~ s{\w:}{};
    $self->shell("$svn co -q file://$url " . $self->database->file_path(''));
    $user_name = 'kwiki-install';
    for my $page_id ($self->database->pages) {
	$self->add($page_id);
    }
    $self->commit_all;

lib/CGI/Kwiki/Privacy.pm  view on Meta::CPAN

    return if $self->$is_method($page_id);
    for (qw(private protected public)) {
        $is_method = "is_$_";
        my $privacy_file = "metabase/$_/" . $self->escape($page_id);
        if ($_ eq $privacy) {
            open PRIVACY, "> $privacy_file"
              or die "Can't open $privacy_file:\n$!";
            print PRIVACY ' ';
            close PRIVACY;
            my $umask = umask 0000;
            chmod(0666, $privacy_file);
            umask $umask;
        }
        elsif ($self->$is_method($page_id)) {
            unlink "$privacy_file"
              or die "Can't unlink $privacy_file";
        }
    }
}

# Name of the current script

lib/CGI/Kwiki/Scripts.pm  view on Meta::CPAN

sub suffix { '.cgi' }

sub render_template {
    my ($self, $template) = @_;
    return $self->driver->template->render($template,
        start_perl => $Config::Config{startperl},
    );
}
sub perms {
    my ($self, $file) = @_;
    chmod(0755, $file) or die $!;
}

1;

__DATA__

=head1 NAME 

CGI::Kwiki::Scripts - Script container for CGI::Kwiki



( run in 0.289 second using v1.01-cache-2.11-cpan-496ff517765 )