My first Perl one-line script

Once I found cool articles about using Perl in command line. Today I created my own one line script. By some reason Apache 2 escape \n and \t in its log: tail -f /var/log/httpd/videoguide-error_log [Tue Dec 13 23:46:26 2005] [error] [4401]ERR: 24: Error in Perl code: VG::Users can’t SELECT id\nFROM Users\nWHERE login = ?\n: DBD::mysql::st execute failed: Unknown column ‘login’ in ‘where clause’ [for Statement […]

Read Me 4 Comments

Store procedures on favourite language

I already knew PostgreSQL allows to develop store procedures on Java and Perl. But now it’s possible to create them on PHP. Hope it’ll be interesting for PHP developers who use PostgreSQL or are just planning do to that.

Read Me Leave comment

Dropdown list in the report filters

Yesterday I wrote a tip how to add your fields in the report filters and display columns when a custom report is created. Today I discovered another interesting thing. If the field definition has a type ‘enum’ and as options it contains existing dropdown list this list will be displayed in the report filters instead of plain text field: ‘status’ => array( ‘name’ => ‘status’, […]

Read Me Leave comment

SugarCRM: custom reports

SugarCRM provides a tool to build custom reports. If you add some new yourown fields in some module and want to include them in reports you have to add their definitions in vardefs.php which is placed in the module directory. To allow to specify logic operation in the report files you need to specify data type for added fields: … ‘my_new_field’ => array( ‘name’ => […]

Read Me 1 Comment

ZendStudio Plugin For Firefox

As PHP programmers know it’s very easy to profile and debug PHP applications using Zend Studio. When I saw it first time I decided to buy it if I’ll develop on PHP seriously. Recently I’ve found an extension for Firefox to communicate with Zend Studio from the browser. It’s useful when it’s needed to debug site with an authentication of users . You can easily […]

Read Me Leave comment

Update Date.pm in RT2

During implementing an integration between RT2 and SugarCRM I improved date module – RT::Date. I’ve added possibility to display dates according to predefined format. Currently there is a method AsString() which simple returns scalar from localtime(): scalar(localtime()); #Thu Nov 24 10:13:54 2005 for now, for example I’ve added a new method – AsFormattedString() which get the format as parameter and returns a date according format […]

Read Me Leave comment

Problem With trigger_error() In PHP4

As SugarCRM developer I have to use PHP although I don’t like it. Today I decided to add a custome error handler to hide actual errors from users. I found a good explanation how to do it but I faced with following problem. To catch critical errors I replaced die() by trigger_error() and specify error_type as E_USER_ERROR (I didn’t find Perl analog eval). It works […]

Read Me 4 Comments

AnnoCPAN: New Perl Project

Today I was surprised when I went to CPAN to chek release of WWW::Yahoo::Movies. There is a new link on the module document page – Annotate this POD. I tried to follow by this link and I found oneself in the new Perl project site – AnnoCPAN. This project contains all POD documentation from CPAN modules and allows to registered users add some notice there. […]

Read Me Leave comment