The green hills surrounding this old, gray market city on the Shannon River are dotted with evidence of the new Ireland that Pope John Paul II will visit next weekend.

Along the country roads of western Ireland are the shiny cars and California-style ranch houses of Irish farmers who have been made millionaires overnight by high Common Market food prices and rapidly rising land values.

In towns big and small are the new factories of Ireland's belated but rapid and technologically sophisticated industrial revolution. Nearby are growing subdivisions of substantial suburban homes for the newly prosperous and remarkably young work force.

For several generations before theirs, it was necessary to leave Ireland to find work. Now they are staying and increasingly are being joined by others returning home from Britain and even America. Ireland's population, which had been cut by famine and emigration from 8 million in 1850 to just 2.8 million in the Republic of Ireland in 1961, has risen to 3.5 million people, more than half of them under 25.

Across the country from Limerick, James Joyce's Dublin on the River Liffey, virtually unchanged in his time from a century before, has become a bustling, sprawling city of a million people. Its narrow streets are choked with cars and its venerable pubs and trendy shops and discos are filled with young people, who spend much more time there than in church.

What had been an ancient, isolated, pastoral, very poor and pervasively religious society is becoming a young, worldly, industrial, urban, materialistic and increasingly secular nation. Although its countryside is still predominantly unspoiled, its economic boom has slowed somewhat this year, and a quarter of its people still live at or below the poverty line, Ireland is growing and changing more rapidly than any other country in Europe.

"The most obvious and important fact of Irish life in the last 20 years has been change," explained the Rev. Liam Ryan, an eminent professor of sociology at Maynooth University, the leading Catholic college in Ireland, where the pope will speak during his visit here.

"Everything has changed rapidly, making it a trying time for the church. There has been a sharp drop in attendance at mass and involvement in the church among the young, the urban and the industrialized -- the three areas of most rapid growth and change in Ireland."

Irish historian Roman Fanning explained that "no outsider can really understand how dramatic the change has been in the last 15 to 20 years. Ireland was no different in the late 1950s than it had been in the 1920s," when it gained its independence from Britain.

"The 1960s were the key," Fanning said. "I remember in 1963 seeing the very first new office building go up in Dublin." Now, new glass, concrete and steel buildings are sprouting everywhere in Dublin and the old Georgian city center is pockmarked with holes for new construction projects.

Ireland had no television and comparatively few automobiles before 1961. It had almost no industry and relatively little foreign trade. The Catholic Church and the family were the most important institutions in society. Traditional sex roles, straitlaced sexual morality and censorship were strictly observed.

Then Ireland turned to the outside world for help in taking its economic leap forward. It entered into an Anglo-Irish free trade agreement with Britain in 1965 and joined the European Common Market in 1973. Shannon Airport, 14 miles from Limerick on the west coast of Ireland, created a traffic-free industrial zone to recover business it lost when transatlantic flights no longer needed to stop there for refueling. The Irish Industrial Development Authority lured foreign industry to the rest of Ireland with generous grants and tax breaks.

These schemes already have attracted more than 700 foreign-owned factories since 1960, nearly half of them American, and encouraged new Irish-owned businesses. They have created tens of thousands of new jobs for Irish workers, increased Ireland's exports by 25 percent a year and helped it achieve an annual growth rate of 7 percent, the highest in Europe, before a slight downturn this year.

Because of the youth and inexperience of the Irish work force, the government also is paying for training in the technical skills needed for making computer components, automobiles, household appliances, medical instruments, synthetic fabrics and other high technology products, and the new firms are quickly moving young people into managerial positions.

At the Dublin plant of the American-owned Data Terminal Systems, which is making the newest generation of computerized cash registers for European stores, industrial relations manager John McGlinn said the average age of the 110 employes is about 22 and they are "very ambitious because they have seen so many other young people move quickly into supervisory jobs in fast-growing plants like ours elsewhere here."

Ireland's dairy, cattle, hog, poultry and sheep farmers are able to earn as much as 10 times more inside the Common Market than they did selling at much lower prices to Britain. They have seen the value of their land soar to as much as $10,000 an acre -- two or three times more than comparable agricultural land in Britain. A farm family uncertain of having enough to eat a decade ago now may be sitting on a million dollars' worth of land, buying new equipment, house and car and, in a historic turnabout, investing in land in England.

Irish farmers now serve on Common Market committees on the continent. Irish businessmen jet all over the world and mix with American and European colleagues in factories, shops, pubs, and suburban neighborhoods here. Returning workers from Britain and America bring with them new cultural perspectives, while the cars crowding the roads have shrunk an already small country.

The economic boom and equal opportunity employment and pay practices of American and Common Market companies have greatly increased the number of working women, the responsibilities they are given and the salaries they receive. Although most women still drop out of the work force when they marry, there is growing interest in returning later, urging the government to pay for child care, and achieving other changes in the role of women in Irish society, according to Mary Tuohy of the Irish Industrial Development Authority.

"Five or 10 years ago, you seldom saw women in pubs here," said Irish Times journalist Dick Walsh, sitting in a Dublin pub. "Now they often outnumber the men, and a lot of men are having trouble adjusting to it."

Young women now dress and behave as freely in public in Dublin as in London. The Irish Parliament recently enacted a watered-down but symbolic law allowing contraceptives to be sold over the counter to married women with a physician's approval, and there already are demands that the law be liberalized much further. And increasing numbers of Irish women have been flying to Britain each year to have abortions there.

"One of the great liberalizing forces in Ireland has been the media, both newspapers and television," observed Fr. Ryan, the Maynooth University sociologist. "They have taken an almost adolescent delight in showing that things are no longer the way they used to be, that people are not going to mass so much and morals are lower. They helped create an atmosphere of anticlericalism."

"Television has really opened things up," said historian Fanning, a professor at the University College Dublin, recently relocated onto a new campus of modernistic modular buildings set into rolling green hills southeast of the city.

"On Irish television's late-night talk show, people have been discussing subjects that previously were seldom mentioned anywhere in public, including people's attitudes on religion or sexuality."

In Dublin and elsewhere in Ireland, where half the population lives, everyone also can tune in all three British television channels and witness even franker discussions and drama, occasional profanity and displays of nudity that would not be allowed on American, much less Irish, television.

"The younger generation now is Ireland's first television generation," Fanning said, "and many of their attitudes are being shaped by British television. The boys, for example, watch Match of the Day [British television's coverage of the most important soccer games each Saturday night] and they root for Liverpool, the champions of England's top division.

"So when Liverpool came to Dublin for a friendly exhibition game, the Irish kids were all wearing Liverpool scarves and wildly cheering the Liverpool players. They booed their own Dublin team.

"These kids are not concerned with Irish nationalism. That's why, contrary to what people abroad may think, I find very minimal support on campus here for the IRA," the Irish Republican Army terrorists fighting to unify Ireland with the six British-ruled counties of Northern Ireland. "They don't pay any attention to the IRA."

These same young people, Fanning said, have become the pivotal political force in the country. They helped elect the present Fianna Fail party government of Prime Minister Jack Lynch because he promised to spend more government money to create more new jobs for the burgeoning number of young people entering the job market each year. And they have indicated in recent public opinion polls that they may throw Lynch out because the job targets are not being met and the economy is no longer growing as rapidly as before, although it is still expanding faster than elsewhere in Europe.

They also are unhappy about the high taxes they pay -- an average of 45 percent of their salaries, including 60 percent on everything over the equivalent of about $15,000 -- while most of the wealthy farmers are still able to escape taxation altogether through traditional loopholes left from the relatively recent days of peasant poverty.

The tax money pays for the incentives to attract new industry, free health care for lower income people, social security and the schools. All primary schools are now entirely government-run, with the influence of the church on each school's administration steadily declining. The government also helps support secondary schools, many of which are still private and church-controlled.

Secondary school graduates no longer have to pass an examination in the Irish language, which is now the first language of only about 55,000 people living along the western coast and older people living in isolated pockets elsewhere. Road signs on the west coast are only in Gaelic, as are bus and train destination signs, while road signs in the rest of the country are bilingual. There also are Irish language news and cultural programs on the national radio network, but there is relatively little interest in the language among young people.

Instead, they are producing a new culture of their own, much as young people did in Britain and the United States in the 1960s. With Irish bands -- including Thin Lizzy and the Boomtown Rats -- gaining international recognition, the booming pop music industry here has given birth to a number of unauthorized "pirate" pop radio stations and forced government-run Irish Radio to give over much of its time on both channels to pop music.

The biggest change, in the opinion of Finn Gallen of the Irish Industrial Development Authority, who was echoed by others, is a new-found national confidence.

"We are finding out that we can hold our own in dealing with people from all over the world," Gallen said. "Our young people are able to stay here to work, learn new skills and make money."

Beneath that confidence, however, are the still fresh memories of what life was like before the boom.

"People are spending money like there is no tomorrow," said journalist Dick Walsh, "first on a new house [70 percent of Ireland's homes are owner-occupied], then a car, then a second car. And a lot of money is spent on the horses and dogs [thoroughbred and greyhound racing]. I think it's because they still don't really believe it will last."

There also is still a dark side to the Irish economy and society. Because the government's job creation schemes can barely keep pace with the birth rate, also Europe's highest unemployment stays stubbornly around 10 percent of the labor force.

For those working, the pursuit of the good life has resulted in higher wage demands and an inflation rate that has bounced between 7 and 20 percent. Government employes seeking to have their pay match that of workers in private industry have staged crippling strikes like the one that cut off postal and telephone service for 16 weeks earlier this year.

There are still hundreds of thousands of poor, personified by the women and children who beg for money on the O'Connell Bridge in the heart of Dublin and by the squalid slums not that many blocks north, where Dubliners fear to go. Alcoholism and physical abuse of wives and children remain major problems, particularly among poor and jobless families.