Apache-Wyrd
view release on metacpan or search on metacpan
Wyrd/Input/Condenser.pm view on Meta::CPAN
=head1 SYNOPSIS
NONE
=head1 DESCRIPTION
The Condenser Input is so called because it condenses the results of
several enclosed Inputs into a single value. It is meant to be an
abstract class from which Inputs can be derived which are used primarily
in editing multiple whole related records along with a reference record,
for example in relating track information to a CD on the same page/form
as the CD information.
=head2 HTML ATTRIBUTES
see C<Apache::Wyrd::Input::Complex>
=head2 PERL METHODS
I<(format: (returns) name (arguments after self))>
Wyrd/SQLForm.pm view on Meta::CPAN
our $VERSION = '0.98';
use base qw(Apache::Wyrd::Form);
use Apache::Wyrd::Services::SAK qw(:db);
use warnings qw(all);
no warnings qw(uninitialized);
=pod
=head1 NAME
Apache::Wyrd::SQLForm - General Form Wyrd for editing data in SQL
=head1 SYNOPSIS
<BASENAME::SQLForm index="user_id" table="users">
<BASENAME::Form::Template name="password">
<BASENAME::Form::Preload>
<BASENAME::Defaults>
select 'root' as user_id;
</BASENAME::Defaults>
<BASENAME::Query>
Wyrd/SQLForm.pm view on Meta::CPAN
<BASENAME::Form::Template name="result">
<H1>Status: $:_status</H1>
<HR>
<P>$:_message</P>
</BASENAME::Form::Template>
</BASENAME::SQLForm>
=head1 DESCRIPTION
The SQLForm is a subclass of Apache::Wyrd::Form. It is meant to simplify
the creation of forms that are used to edit data within a database connected
to via the C<Apache::Wyrd::DBL>.
The SQLForm makes the assumption that there is a primary table on which the
edit is operating and that other tables will, if necessary, have elements
inserted, changed or deleted from them as they relate to the primary table.
This module is meant to be subclassed, so a large number of its methods are
only defined in order to be overridden. Any changes to secondary tables,
for example, need to be handled by subclassing C<_prep_secondary>,
C<_submit_secondary>, and C<_perform_secondary_deletes>, all of which do
nothing by default.
=head2 HTML ATTRIBUTES
Wyrd/SQLForm.pm view on Meta::CPAN
=cut
sub default_update_ok {
my ($self) = @_;
return "<BR>The record was successfully updated";
}
=item (scalar) C<primary_delete_error> (void)
Format the log entry that occurs when the edited record cannot be
deleted. The error is the argument.
=cut
sub primary_delete_error {
my ($self, $err) = @_;
return "Falied to delete the record: $err";
}
=item (scalar) C<deleted> (void)
Wyrd/Site/Page.pm view on Meta::CPAN
The error message to be returned when no UnauthURL is set.
=cut
sub _unauthorized_text {
my ($self) = @_;
return '<h1>Unauthorized</h1><hr>You are not authorized to view this document';
}
=item (void) C<_page_edit> (void)
A hook method for pages which interact with some sort of content management editing facility.
=cut
sub _page_edit {
my ($self) = @_;
return;
}
=item (void) C<_process_template> (void)
A hook method for how to assemble the body section of the page from the
template. Defaults to replacing the string _INSERT_TEXT_HERE_ with the
enclosed text.
Wyrd/Site/Page.pm view on Meta::CPAN
Reserves the _format_output and _generate_output methods.
=cut
sub _setup {
my ($self) = @_;
$self->_init_state;
$self->_check_auth;
$self->_init_index;
$self->_page_edit;
unless ($self->_flags->nofail) {
my $name = $self->index_name;
if ($name eq $self->{'original'}) {
if ($name =~ m/^\//) {
unless (-f $self->dbl->req->document_root . $name) {
$self->_raise_exception("Original file doesn't exist ($name). Use the nofail flag to override this error.");
}
}
}
}
( run in 0.648 second using v1.01-cache-2.11-cpan-de7293f3b23 )