AcePerl
view release on metacpan or search on metacpan
$query .= " -b $start" if defined $start;
$query .= " -c $count" if defined $count;
$self->{database}->query($query);
while (my @objects = $self->_fetch_chunk) {
push (@result,@objects);
}
# copy tag into a portion of the tree
if ($tag) {
for my $tree (@result) {
my $obj = $self->class_for($tree->class,$tree->name)->new($tree->class,$tree->name,$self,1);
$obj->_attach_subtree($tag=>$tree);
$tree = $obj;
}
}
# now recache 'em
for (@result) {
if (my $obj = $self->memory_cache_store($_)) {
%$obj = %$_ unless $obj->filled; # contents copy -- replace partial object with full object
$_ = $obj;
} else {
$self->memory_cache_store($_);
Ace/Browser/AceSubs.pm view on Meta::CPAN
}
=item $url = Url($display,$params)
Given a symbolic display name, such as "tree" and a set of parameters,
this function looks up its URL and then calls ResolveUrl() to create a
single Url.
When hard-coding relative URLs into AceBrowser scripts, it is
important to pass them through Url(). The reason for this is that
AceBrowser may need to attach the database name to the URL in order to
identify it.
Example:
my $url = Url('../sequence_dump',"name=$name;long_dump=yes");
print a({-href=>$url},'Dump this sequence');
=cut
sub Url {
Ace/Object.pm view on Meta::CPAN
# acedb's query mechanism to fetch the subobject. This is a
# big win for large objects. ...However, we have to disable
# this feature if timestamps are active.
unless ($self->filled) {
my $subobject = $self->newFromText(
$self->db->show($self->class,$self->name,$tag),
$self->db
);
if ($subobject) {
$subobject->{'.nocache'}++;
$self->_attach_subtree($lctag => $subobject);
} else {
$self->{'.PATHS'}{$lctag} = undef;
}
$self->_dirty(1);
last TRY;
}
my @col = $self->col;
foreach (@col) {
next unless $_->isTag;
Ace/Object.pm view on Meta::CPAN
return defined $pos ? $t->right($pos) : $t unless wantarray;
# We do something verrrry interesting in an array context.
# If no position is defined, we return the column to the right.
# If a position is defined, we return everything $POS tags
# to the right (so-called tag[2] system).
return $t->col($pos);
}
# utility routine used in partial tree caching
sub _attach_subtree {
my $self = shift;
my ($tag,$subobject) = @_;
my $lctag = lc($tag);
my $obj;
if (lc($subobject->right) eq $lctag) { # new version of aceserver as of 11/30/98
$obj = $subobject->right;
} else { # old version of aceserver
$obj = $self->new('tag',$tag,$self->db);
$obj->{'.right'} = $subobject->right;
}
Ace/Object.pm view on Meta::CPAN
B<timestamp()> will return undef.
The returned timestamp is actually a UserSession object which can be
printed and explored like any other object. However, there is
currently no useful information in UserSession other than its name.
=head2 comment() method
$comment = $object->comment;
This returns the comment attached to an object or object subtree, if
any. Comments are I<Comment> objects and have the interesting
property that a single comment can refer to multiple objects. If
there is no comment attached to the current subtree, this method will
return undef.
Currently you cannot create a new comment in AcePerl or edit an old
one.
=head2 error() method
$error = $object->error;
Returns the error from the previous operation, if any. As in
Ace/Sequence/Feature.pm view on Meta::CPAN
Most methods are inherited from I<Ace::Sequence>. The following
methods are also supported:
=over 4
=item seqname()
$object = $feature->seqname;
Return the ACeDB Sequence object that this feature is attached to.
The return value is an I<Ace::Object> of the Sequence class. This
corresponds to the first field of the GFF format and does not
necessarily correspond to the I<Ace::Sequence> object from which the
feature was obtained (use source_seq() for that).
=item source()
=item method()
=item subtype()
acelib/arraysub.c view on Meta::CPAN
}
memset(a->base,0,(mysize_t)(a->dim*size)) ;
a->max = 0 ;
return a ;
}
/**************/
void uArrayDestroy (Array a)
/* Note that the finalisation code attached to the memory does the work,
see below */
{
if (!a) return;
if (a->magic != ARRAY_MAGIC)
messcrash ("uArrayDestroy received corrupt array->magic");
messfree(a);
}
acelib/freesubs.c view on Meta::CPAN
#ifdef JUNK
/* we want a more direct reciprocal to free protect */
char* freeunprotect (char *text)
{ int level ; char *cp ;
static Stack s = 0 ;
if (!text || !*text) return 0 ;
s = stackReCreate (s, 80) ;
level = freesettext (text,"") ;
freespecial ("\t\\") ; /* No \n, no subshells, No attach, No %, Nothing */
freecard(level) ;
while ((cp = freeword()))
{ if (stackMark(s)) catText (s, " ") ;
catText (s, cp);
}
freeclose (level) ;
return stackMark (s) ? stackText (s, 0) : "" ; /* is text is not 0, do not return 0 */
}
#endif
char* freeunprotect (char *text)
acelib/memsubs.c view on Meta::CPAN
--numMessAlloc ;
totMessAlloc -= unit->size ;
free (unit) ;
}
/************** create and destroy handles **************/
/* NOTE: handleDestroy is #defined in regular.h to be messfree */
/* The actual work is done by handleFinalise, which is the finalisation */
/* routine attached to all STORE_HANDLEs. This allows multiple levels */
/* of free-ing by allocating new STORE_HANDLES on old ones, using */
/* handleHandleCreate. handleCreate is simply defined as handleHandleCreate(0) */
static void handleFinalise (void *p)
{
STORE_HANDLE handle = (STORE_HANDLE)p;
STORE_HANDLE next, unit = handle->next ;
/* do handle finalisation first */
if (handle->final)
acelib/texthelp.c view on Meta::CPAN
break ;
case HTML_HREF:
if (node->link)
{
MODE_HREF = TRUE ;
currentLink = node->link ;
}
/* we have to check for leftnode, in case we have a thing
like <A HREF=...></A>. The HREF-node doesn't have a TEXT
node attached, and it would crash otherwise */
if (node->left)printTextSection (node->left) ;
if (node->link)
{
MODE_HREF = FALSE ;
currentLink = 0 ;
}
break ;
case HTML_TEXT:
cp = node->text ;
( run in 1.200 second using v1.01-cache-2.11-cpan-88abd93f124 )