PApp
view release on metacpan or search on metacpan
sub _SURL_STYLE_GET () { 2 }
sub _SURL_STYLE_STATIC() { 3 }
sub SURL_STYLE_URL () { SURL_STYLE(_SURL_STYLE_URL ) }
sub SURL_STYLE_GET () { SURL_STYLE(_SURL_STYLE_GET ) }
sub SURL_STYLE_STATIC () { SURL_STYLE(_SURL_STYLE_STATIC ) }
sub CHARSET (){ "utf-8" } # the charset used internally by PApp
# we might be slow, but we are rarely being called ;)
sub __($) {
$translator
? $translator->get_table($langs)->gettext($_[0])
: $_[0]
}
sub N_($) { $_[0] }
# constant
our $xmlnspapp = "http://www.plan9.de/xmlns/papp";
=head1 Global Variables
Some global variables are free to use and even free to change (yes, we
still are about speed, not abstraction). In addition to these variables,
the globs C<*state>, C<*S> and C<*A> (and in future versions C<*L>)
are reserved. This means that you cannot define a scalar, sub, hash,
PApp/DataRef.pm view on Meta::CPAN
exists $f{lc $field};
};
}
=item @key = $hd->id
Returns the key value(s) for the selected row, creating it if necessary.
=cut
sub id($) {
my $self = shift;
$self->_sequence;
wantarray ? @{$self->{id}} : $self->{id}[0];
}
=item $hd->flush
Flush all pending store operations. See HOW FLUSHES ARE IMPLEMENTED below
to see how, well, flushes are implemented on the SQL-level.
PApp/ECMAScript.pm view on Meta::CPAN
=item $layer->id([newid])
Return the current object id (optionally setting it).
=item $layer->content([newcontent])
Return the current object content (optionally setting it).
=cut
sub id($;$) {
$_[0]->{id} = $_[1] if $#_;
$_[0]->{id};
}
sub content($;$) {
$_[0]->{content} = $_[1] if $#_;
$_[0]->{content};
}
=item $layer->code
PApp/Event.pm view on Meta::CPAN
for (0 .. $#handlers) {
if ($handlers[$_] == $_[0][1]) {
splice @$handlers, $_, 1;
return;
}
}
}
sub on($&) {
my $handler = [$_[1], $PApp::SQL::Database];
push @{$handler{$_[0]}}, $handler;
no warnings;
return bless [ $_[0], $handler ], PApp::Event::handler:: if defined wantarray;
}
=item broadcast "event_type" => $data[, $data...]
Broadcast an event of the named type, together with any number of scalars
PApp/Exception.pm view on Meta::CPAN
use PApp::HTML;
use utf8;
$VERSION = 2.4;
@EXPORT = qw(fancydie try catch);
no warnings;
# let's try to be careful, but brutale ausnahmefehler just rock!
sub __($) {
eval { &PApp::__ } || $_[0];
}
use overload
'bool' => sub { 1 },
'""' => sub { $_[0]{compatible} || $_[0]->as_string },
fallback => 1,
;
=item local $SIG{__DIE__} = \&PApp::Exception::diehandler
( run in 3.955 seconds using v1.01-cache-2.11-cpan-524268b4103 )