Wednesday, December 1, 2010

Re: What's the best way to name your triggers and trigger files?


Posts: 280
Registered: Sep 04, 2008 05:41:32 PM What's the best way to name your triggers and trigger files?
Posted: Nov 24, 2010 04:20:50 PM I have a dozen of triggers for all different purposes so I want to give good names for both the triggers and perl files. Hope that will be easier for people come in to maintenance it.

I have two choices:
1. Name the trigger as "tr_mkelem_postop", pointing to a script called tr_mkelem_postop.pl.
2. Name the trigger as "CHG_OWNER", pointing to a script called tr_CHG_OWNER.pl.

Which way you guys prefer?

Thanks
Jirong


Posts: 419
Registered: Mar 15, 2005 04:40:07 AM Re: What's the best way to name your triggers and trigger files?
Posted: Nov 25, 2010 05:45:42 AM   in response to: Jirong_Hu in response to: Jirong_Hu's post Jirong_Hu wrote:
> Which way you guys prefer?

No triggers: triggers are evil. Use them at most only temporarily.
Use wrappers instead: more powerful, more portable, easier to debug and to get right, easier to maintain (once, not once per vob), less surprising: the end user is aware of running a wrapper, and able to not use it in case of problem.

This is essential to grow SCM and ClearCase credibility, or rather to avoid jeopardizing it.

Do your triggers work in cygwin environment? My wrappers do.
What perl do your triggers use? My wrapper use the one maintained in my perl vob.

Marc


Posts: 280
Registered: Sep 04, 2008 05:41:32 PM Re: What's the best way to name your triggers and trigger files?
Posted: Nov 25, 2010 10:51:35 AM   in response to: 314 in response to: 314's post Hi Marc

Thanks for your reply. Regarding the wrapper, I only find this: http://search.cpan.org/~dsb/ClearCase-Wrapper-1.16/Wrapper.pm

Can you give more details?

Thanks
Jirong


Posts: 419
Registered: Mar 15, 2005 04:40:07 AM Re: What's the best way to name your triggers and trigger files?
Posted: Nov 26, 2010 10:27:25 AM   in response to: Jirong_Hu in response to: Jirong_Hu's post Jirong_Hu wrote:
> I only find this: http://search.cpan.org/~dsb/ClearCase-Wrapper-1.16/Wrapper.pm
This is actually an infrastructure for writing your own wrappers, although it comes with good examples.

The author, David Boyce, wrote his own wrapper on top of this: ClearCase::Wrapper::DSB
and I wrote mine, following his example: ClearCase::Wrapper::MGi.
I didn't want to reinvent the wheel, so that I looked for what best was to be found.

I found David's work and I can only praise it!
It accounts for a high percentage in the value of ClearCase.

At least I am still writing additions and enhancements (so beware the versions: they'll keep growing).
I try not to discourage people who want to contribute (I am working on integrating one contribution).

Marc

Help

Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular type of content or application that you're viewing.

My tags shows your tags for this particular type of content or application that you're viewing.

Use the search field to find all types of content in My developerWorks with that tag. Use the slider bar to see more or fewer tags. Popular tags shows the top tags for this particular type of content or application that you're viewing. My tags shows your tags for this particular type of content or application that you're viewing.MoreLess 
Point your RSS reader here for a feed of the latest messages in all forums

View the original article here

No comments:

Post a Comment