1. cperl mode formatting of attributed subs
2. Idea: 'throws' attribute for subs
Greetings, colleagues!
I'm going to begin working on an extension, that would introduce an
attribute for subroutines, somewhat similar to Java's 'throws'.
It could like something like <<'__THE_FOLLOWING__':
use <TheModule>;
use Exception::Class (
'Danger',
'Danger::Avalanche' => { isa => 'Danger' },
'Danger::Tornado' => { isa => 'Danger' },
);
sub dangerous : throws(Danger'Avalanche,Danger'Tornado) { }
__THE_FOLLOWING__
If 'dangerous' is called from somewhere else and Danger::Avalanche and
Danger::Tornado (or any ancestor exception class, i. e. Danger or
Exception::Class) are not being caught,
then an exception like <<'__THIS__' will be thrown:
Exceptions 'Danger::Avalanche', 'Danger::Tornado' are not being caught
at badcode.pl line 8
__THIS__
I've got a couple of questions:
1. Is there something like this already available?
2. What name for 'TheModule' can you suggest?
3. Any ideas how to make 'exception not being caught' exception be
thrown during the compilation phase, to make sure all thrown
exceptions are caught in the code, even if some subroutines are not
called afterwards during the execution? In other words, do you see a
way how to get the stack of subroutine calls during the compilation
phase, not waiting for subroutines are really executed?
Regards,
Ivan
3. Add attributes to Hyperlinks in HyperLinkColumn
4. control.Attributes.Add() not working properly
Hello,
I have a textbox in a datagrid row which has autopostback. When it posts
back, it updates a prop on an object in a session variable.
In order to update the right object, in the ItemDataBound of the grid, i was
adding the objects ID property as a
MyTextbox.Attributes.Add("recid",rowDataItemObj.RecID)
along with several other attributes.
For some reason these attributes are not being added the first time through.
But when do a postback, then they get added properly. The code adding the
attributes is not enclosed in any IsPostback checks.
anyone ever had this problem before, or can help?
Thanks in advance,
- ArthurDent
5. properly adding multiple javascript attributes - Microsoft .NET Framework
6. adding attributes to a database handle
Two questions:
1. Is it possible to add/store "user defined" attributes in a database handle.
I'd like to do something like this:
my $dbh = DBI->connect(...);
$dbh->{important_info} = ...;
...
print "the important info was: ", $dbh->{important_info}, "\n";
2. Is there anything preventing the sub-classing of database handles
(i.e. reblessing into a sub-class after creation)?
7. Adding attributes to xml root element. - Perl
8. Net::LDAP - adding value to an existing attribute
Although the manpage for NET::LDAP::Entry states that using add method
would add to the values of an existing entry, LDAP server refuses to
add the entry on calling update method stating "Already exists"
(message code 68, ldap_error_text given below). How do I overcome
this?
TIA
--------
Net::LDAP::Entry manpage excerpt:
--------
add ( ATTR => VALUE [, ATTR2 => VALUE2 ... ] )
Add one or more new attributes to the entry. Each value must be a
scalar variable or a reference to an array. The values given will be
added to the values which already exist for the given attributes.
--------
ldap_error_text
--------
The client attempted to add an entry that already exists. This can
occur as
a result of
* An add request was submitted with a DN that already exists
* A modify DN requested was submitted, where the requested new DN
already exist
s
* The request is adding an attribute to the schema and an attribute
with the
given OID or name already exists