"1;" in the RT_SiteConfig.pm file

Hi, folks.

Below is an excerpt (located at the end of my RT_SiteConfig.pm file):

My ‘easy’ question is: what this “1;” does at the final? What is its
utility? I don’t remember if I had put it there or RT came with it by
default.

this has no effect for the SQLite case, the first Set() wins

end /etc/request-tracker3.6/RT_SiteConfig.d/51-dbconfig-common

end /etc/request-tracker3.6/RT_SiteConfig.d/50-debconf

1;

Thanks in advance.

Att,

Wagner Pereira

PoP-SP/RNP - Ponto de Presen�a da RNP em S�o Paulo
CCE/USP - Centro de Computa��o Eletr�nica da Universidade de S�o Paulo
http://www.pop-sp.rnp.br
Tel. (11) 3091-8901

Wagner Pereira wrote:

Hi, folks.

Below is an excerpt (located at the end of my RT_SiteConfig.pm file):

My ‘easy’ question is: what this “1;” does at the final? What is its
utility? I don’t remember if I had put it there or RT came with it by
default.


this has no effect for the SQLite case, the first Set() wins

end /etc/request-tracker3.6/RT_SiteConfig.d/51-dbconfig-common

end /etc/request-tracker3.6/RT_SiteConfig.d/50-debconf

1;

All “good” Perl modules have this as the exit code/value at the end.

\||/
Rod

Wagner Pereira wrote:

My ‘easy’ question is: what this “1;” does at the final? What is its
utility? I don’t remember if I had put it there or RT came with it by
default.

1;

All “good” Perl modules have this as the exit code/value at the end.

More specifically, if I may quote from Wikipedia…

A Perl module must end with a true value or else it is considered not to

have loaded. By convention this value is usually 1 though it can be

any true value. A module can end with false to indicate failure but

this is rarely used and it would instead die() (exit with an error).

John

Thank Roderick and John very much to clarify this “exit code 1;” Perl’s
stuff to me.

My best wishes.

Att,

Wagner Pereira

PoP-SP/RNP - Ponto de Presen�a da RNP em S�o Paulo
CCE/USP - Centro de Computa��o Eletr�nica da Universidade de S�o Paulo

Tel. (11) 3091-8901Em 18/5/2010 22:49, John Hascall escreveu:

Wagner Pereira wrote:

My ‘easy’ question is: what this “1;” does at the final? What is its
utility? I don’t remember if I had put it there or RT came with it by
default.

1;

All “good” Perl modules have this as the exit code/value at the end.

More specifically, if I may quote from Wikipedia…

A Perl module must end with a true value or else it is considered not to

have loaded. By convention this value is usually 1 though it can be

any true value. A module can end with false to indicate failure but

this is rarely used and it would instead die() (exit with an error).

John

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com